Package org.firebirdsql.jdbc
Class FBResultSetMetaData
- java.lang.Object
- 
- org.firebirdsql.jdbc.AbstractFieldMetaData
- 
- org.firebirdsql.jdbc.FBResultSetMetaData
 
 
- 
- All Implemented Interfaces:
- java.sql.ResultSetMetaData,- java.sql.Wrapper,- FirebirdResultSetMetaData
 
 public class FBResultSetMetaData extends AbstractFieldMetaData implements FirebirdResultSetMetaData An object that can be used to get information about the types and properties of the columns in aResultSetobject.- Author:
- David Jencks, Mark Rotteveel
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class org.firebirdsql.jdbc.AbstractFieldMetaDataAbstractFieldMetaData.ExtendedFieldInfo, AbstractFieldMetaData.FieldKey
 
- 
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedFBResultSetMetaData(RowDescriptor rowDescriptor, FBConnection connection)Creates a newFBResultSetMetaDatainstance.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetCatalogName(int column)java.lang.StringgetColumnClassName(int column)intgetColumnCount()intgetColumnDisplaySize(int column)java.lang.StringgetColumnLabel(int column)java.lang.StringgetColumnName(int column)intgetColumnType(int column)java.lang.StringgetColumnTypeName(int column)protected java.util.Map<AbstractFieldMetaData.FieldKey,AbstractFieldMetaData.ExtendedFieldInfo>getExtendedFieldInfo(FBConnection connection)This method retrieves extended information from the system tables in a database.intgetPrecision(int column)intgetScale(int column)java.lang.StringgetSchemaName(int column)java.lang.StringgetTableAlias(int column)Gets the designated column's table alias.java.lang.StringgetTableName(int column)booleanisAutoIncrement(int column)booleanisCaseSensitive(int column)booleanisCurrency(int column)booleanisDefinitelyWritable(int column)intisNullable(int column)booleanisReadOnly(int column)booleanisSearchable(int column)booleanisSigned(int column)booleanisWritable(int column)- 
Methods inherited from class org.firebirdsql.jdbc.AbstractFieldMetaDataestimateFixedPrecision, getExtFieldInfo, getFieldClassName, getFieldCount, getFieldDescriptor, getFieldType, getFieldTypeName, getPrecisionInternal, getRowDescriptor, getScaleInternal, isSignedInternal, isWrapperFor, unwrap
 
- 
 
- 
- 
- 
Constructor Detail- 
FBResultSetMetaDataprotected FBResultSetMetaData(RowDescriptor rowDescriptor, FBConnection connection) throws java.sql.SQLException Creates a newFBResultSetMetaDatainstance.- Parameters:
- rowDescriptor- a row descriptor
- connection- a- FBConnectionvalue
- Throws:
- java.sql.SQLException- if an error occurs TODO Need another constructor for metadata from constructed result set, where we supply the ext field info.
 
 
- 
 - 
Method Detail- 
getColumnCountpublic int getColumnCount() throws java.sql.SQLException- Specified by:
- getColumnCountin interface- java.sql.ResultSetMetaData
- Throws:
- java.sql.SQLException
 
 - 
isAutoIncrementpublic boolean isAutoIncrement(int column) throws java.sql.SQLExceptionThe current implementation always returns false.- Specified by:
- isAutoIncrementin interface- java.sql.ResultSetMetaData
- Throws:
- java.sql.SQLException
 
 - 
isCaseSensitivepublic boolean isCaseSensitive(int column) throws java.sql.SQLExceptionThe current implementation always returns true.- Specified by:
- isCaseSensitivein interface- java.sql.ResultSetMetaData
- Throws:
- java.sql.SQLException
 
 - 
isSearchablepublic boolean isSearchable(int column) throws java.sql.SQLException- Specified by:
- isSearchablein interface- java.sql.ResultSetMetaData
- Throws:
- java.sql.SQLException
 
 - 
isCurrencypublic boolean isCurrency(int column) throws java.sql.SQLException- Specified by:
- isCurrencyin interface- java.sql.ResultSetMetaData
- Throws:
- java.sql.SQLException
 
 - 
isNullablepublic int isNullable(int column) throws java.sql.SQLException- Specified by:
- isNullablein interface- java.sql.ResultSetMetaData
- Throws:
- java.sql.SQLException
 
 - 
isSignedpublic boolean isSigned(int column) throws java.sql.SQLException- Specified by:
- isSignedin interface- java.sql.ResultSetMetaData
- Throws:
- java.sql.SQLException
 
 - 
getColumnDisplaySizepublic int getColumnDisplaySize(int column) throws java.sql.SQLException- Specified by:
- getColumnDisplaySizein interface- java.sql.ResultSetMetaData
- Throws:
- java.sql.SQLException
 
 - 
getColumnLabelpublic java.lang.String getColumnLabel(int column) throws java.sql.SQLException- Specified by:
- getColumnLabelin interface- java.sql.ResultSetMetaData
- Throws:
- java.sql.SQLException
 
 - 
getColumnNamepublic java.lang.String getColumnName(int column) throws java.sql.SQLException- Specified by:
- getColumnNamein interface- java.sql.ResultSetMetaData
- Throws:
- java.sql.SQLException
 
 - 
getSchemaNamepublic java.lang.String getSchemaName(int column) throws java.sql.SQLException- Specified by:
- getSchemaNamein interface- java.sql.ResultSetMetaData
- Returns:
- Always ""as schemas are not supported.
- Throws:
- java.sql.SQLException
 
 - 
getPrecisionpublic int getPrecision(int column) throws java.sql.SQLExceptionNOTE For NUMERICandDECIMALwe attempt to retrieve the exact precision from the metadata, if this is not possible (eg the column is dynamically defined in the query), the reported precision is the maximum precision allowed by the underlying storage data type.- Specified by:
- getPrecisionin interface- java.sql.ResultSetMetaData
- Throws:
- java.sql.SQLException
 
 - 
getScalepublic int getScale(int column) throws java.sql.SQLException- Specified by:
- getScalein interface- java.sql.ResultSetMetaData
- Throws:
- java.sql.SQLException
 
 - 
getTableNamepublic java.lang.String getTableName(int column) throws java.sql.SQLException- Specified by:
- getTableNamein interface- java.sql.ResultSetMetaData
- Throws:
- java.sql.SQLException
 
 - 
getTableAliaspublic java.lang.String getTableAlias(int column) throws java.sql.SQLExceptionDescription copied from interface:FirebirdResultSetMetaDataGets the designated column's table alias.- Specified by:
- getTableAliasin interface- FirebirdResultSetMetaData
- Parameters:
- column- the first column is 1, the second is 2, ...
- Returns:
- table alias or "" if not applicable
- Throws:
- java.sql.SQLException- if a database access error occurs
 
 - 
getCatalogNamepublic java.lang.String getCatalogName(int column) throws java.sql.SQLException- Specified by:
- getCatalogNamein interface- java.sql.ResultSetMetaData
- Returns:
- Always ""as catalogs are not supported
- Throws:
- java.sql.SQLException
 
 - 
getColumnTypepublic int getColumnType(int column) throws java.sql.SQLException- Specified by:
- getColumnTypein interface- java.sql.ResultSetMetaData
- Throws:
- java.sql.SQLException
 
 - 
getColumnTypeNamepublic java.lang.String getColumnTypeName(int column) throws java.sql.SQLException- Specified by:
- getColumnTypeNamein interface- java.sql.ResultSetMetaData
- Throws:
- java.sql.SQLException
 
 - 
isReadOnlypublic boolean isReadOnly(int column) throws java.sql.SQLExceptionThe current implementation always returns false, except for a DB_KEY column.- Specified by:
- isReadOnlyin interface- java.sql.ResultSetMetaData
- Throws:
- java.sql.SQLException
 
 - 
isWritablepublic boolean isWritable(int column) throws java.sql.SQLExceptionThe current implementation always returns true, except for a DB_KEY column.- Specified by:
- isWritablein interface- java.sql.ResultSetMetaData
- Throws:
- java.sql.SQLException
 
 - 
isDefinitelyWritablepublic boolean isDefinitelyWritable(int column) throws java.sql.SQLException- Specified by:
- isDefinitelyWritablein interface- java.sql.ResultSetMetaData
- Throws:
- java.sql.SQLException
 
 - 
getColumnClassNamepublic java.lang.String getColumnClassName(int column) throws java.sql.SQLException- Specified by:
- getColumnClassNamein interface- java.sql.ResultSetMetaData
- Throws:
- java.sql.SQLException
 
 - 
getExtendedFieldInfoprotected java.util.Map<AbstractFieldMetaData.FieldKey,AbstractFieldMetaData.ExtendedFieldInfo> getExtendedFieldInfo(FBConnection connection) throws java.sql.SQLException Description copied from class:AbstractFieldMetaDataThis method retrieves extended information from the system tables in a database. Since this method is expensive, use it with care.- Specified by:
- getExtendedFieldInfoin class- AbstractFieldMetaData
- 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.
 
 
- 
 
-