Package org.firebirdsql.jdbc
Class AbstractFieldMetaData
- java.lang.Object
- 
- org.firebirdsql.jdbc.AbstractFieldMetaData
 
- 
- All Implemented Interfaces:
- java.sql.Wrapper
 - Direct Known Subclasses:
- FBParameterMetaData,- FBResultSetMetaData
 
 public abstract class AbstractFieldMetaData extends java.lang.Object implements java.sql.WrapperBase class forFBResultSetMetaDataandFBParameterMetaDatafor methods common to both implementations.- Since:
- 3.0
- Author:
- David Jencks, Nickolay Samofatov, Mark Rotteveel
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description protected static classAbstractFieldMetaData.ExtendedFieldInfoThis class is an old-fashion data structure that stores additional information about fields in a database.protected static classAbstractFieldMetaData.FieldKeyThis class should be used as a composite key in an internal field mapping structures.
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedAbstractFieldMetaData(RowDescriptor rowDescriptor, FBConnection connection)
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected intestimateFixedPrecision(int fieldIndex)protected abstract java.util.Map<AbstractFieldMetaData.FieldKey,AbstractFieldMetaData.ExtendedFieldInfo>getExtendedFieldInfo(FBConnection connection)This method retrieves extended information from the system tables in a database.protected AbstractFieldMetaData.ExtendedFieldInfogetExtFieldInfo(int columnIndex)protected java.lang.StringgetFieldClassName(int field)protected intgetFieldCount()Retrieves the number of fields in the object for which thisAbstractFieldMetaDataobject contains information.protected FieldDescriptorgetFieldDescriptor(int fieldIndex)TheFieldDescriptorof the field with indexfieldIndex.protected intgetFieldType(int field)protected java.lang.StringgetFieldTypeName(int field)protected intgetPrecisionInternal(int field)Retrieves the designated parameter's specified column size.protected RowDescriptorgetRowDescriptor()protected intgetScaleInternal(int field)Retrieves the designated field's number of digits to right of the decimal point.protected booleanisSignedInternal(int field)Retrieves whether values for the designated field can be signed numbers.booleanisWrapperFor(java.lang.Class<?> iface)<T> Tunwrap(java.lang.Class<T> iface)
 
- 
- 
- 
Constructor Detail- 
AbstractFieldMetaDataprotected AbstractFieldMetaData(RowDescriptor rowDescriptor, FBConnection connection) 
 
- 
 - 
Method Detail- 
isWrapperForpublic boolean isWrapperFor(java.lang.Class<?> iface) throws java.sql.SQLException- Specified by:
- isWrapperForin interface- java.sql.Wrapper
- Throws:
- java.sql.SQLException
 
 - 
unwrappublic <T> T unwrap(java.lang.Class<T> iface) throws java.sql.SQLException- Specified by:
- unwrapin interface- java.sql.Wrapper
- Throws:
- java.sql.SQLException
 
 - 
getRowDescriptorprotected final RowDescriptor getRowDescriptor() - Returns:
- The row descriptor.
 
 - 
getFieldCountprotected final int getFieldCount() Retrieves the number of fields in the object for which thisAbstractFieldMetaDataobject contains information.- Returns:
- the number of fields
 
 - 
getFieldDescriptorprotected final FieldDescriptor getFieldDescriptor(int fieldIndex) TheFieldDescriptorof the field with indexfieldIndex.- Parameters:
- fieldIndex- 1-based index of a field in this metadata object
- Returns:
- field descriptor
 
 - 
isSignedInternalprotected final boolean isSignedInternal(int field) Retrieves whether values for the designated field can be signed numbers.- Parameters:
- field- the first field is 1, the second is 2, ...
- Returns:
- trueif so;- falseotherwise
 
 - 
getScaleInternalprotected final int getScaleInternal(int field) Retrieves the designated field's number of digits to right of the decimal point. 0 is returned for data types where the scale is not applicable.- Parameters:
- field- the first field is 1, the second is 2, ...
- Returns:
- scale
 
 - 
getFieldClassNameprotected final java.lang.String getFieldClassName(int field) throws java.sql.SQLException- Throws:
- java.sql.SQLException
 
 - 
getFieldTypeNameprotected final java.lang.String getFieldTypeName(int field) 
 - 
getFieldTypeprotected int getFieldType(int field) 
 - 
getPrecisionInternalprotected final int getPrecisionInternal(int field) throws java.sql.SQLExceptionRetrieves the designated parameter's specified column size.The returned value represents the maximum column size for the given parameter. For numeric data, this is the maximum precision. For character data, this is the length in characters. For datetime datatypes, this is the length in characters of the String representation (assuming the maximum allowed precision of the fractional seconds component). For binary data, this is the length in bytes. For the ROWID datatype, this is the length in bytes. 0 is returned for data types where the column size is not applicable. - Parameters:
- field- the first field is 1, the second is 2, ...
- Returns:
- precision
- Throws:
- java.sql.SQLException- if a database access error occurs
 
 - 
estimateFixedPrecisionprotected final int estimateFixedPrecision(int fieldIndex) 
 - 
getExtFieldInfoprotected final AbstractFieldMetaData.ExtendedFieldInfo getExtFieldInfo(int columnIndex) throws java.sql.SQLException - Throws:
- java.sql.SQLException
 
 - 
getExtendedFieldInfoprotected abstract java.util.Map<AbstractFieldMetaData.FieldKey,AbstractFieldMetaData.ExtendedFieldInfo> getExtendedFieldInfo(FBConnection connection) throws java.sql.SQLException This method retrieves extended information from the system tables in a database. Since this method is expensive, use it with care.- Returns:
- mapping between AbstractFieldMetaData.FieldKeyinstances andAbstractFieldMetaData.ExtendedFieldInfoinstances, or an empty Map if the metadata implementation does not support extended info.
- Throws:
- java.sql.SQLException- if a database error occurs while obtaining extended field information.
 
 
- 
 
-