Package org.firebirdsql.jdbc.field
Class JdbcTypeConverter
- java.lang.Object
- 
- org.firebirdsql.jdbc.field.JdbcTypeConverter
 
- 
 @InternalApi public final class JdbcTypeConverter extends java.lang.Object Helper class to convert from Firebird and metadata type information to JDBC type information.- Since:
- 3.0
- Author:
- Mark Rotteveel
 
- 
- 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static intfromFirebirdToJdbcType(int firebirdType, int subtype, int scale)Converts from the Firebird type, subtype and scale to the JDBC type value fromTypes.static intfromMetaDataToFirebirdType(int metaDataType)Converts the metadata type value to the Firebird type value (null bit not set).static intfromMetaDataToJdbcType(int metaDataType, int subtype, int scale)Converts from the metadata type (as used in the system tables) to JDBC type values fromTypes.static booleanisJdbcType(FieldDescriptor fieldDescriptor, int jdbcType)Determines if a field descriptor matches a JDBC type value fromTypes.static inttoJdbcType(FieldDescriptor fieldDescriptor)Gets the JDBC type value fromTypesfor the field descriptor.
 
- 
- 
- 
Method Detail- 
toJdbcTypepublic static int toJdbcType(FieldDescriptor fieldDescriptor) Gets the JDBC type value fromTypesfor the field descriptor.- Parameters:
- fieldDescriptor- Field descriptor
- Returns:
- JDBC type, or Types.OTHERfor unknown types
 
 - 
isJdbcTypepublic static boolean isJdbcType(FieldDescriptor fieldDescriptor, int jdbcType) Determines if a field descriptor matches a JDBC type value fromTypes.- Parameters:
- fieldDescriptor- Field descritpor
- jdbcType- JDBC type
- Returns:
- trueif the field descriptor and JDBC type are equivalent (using- toJdbcType(FieldDescriptor))
 
 - 
fromFirebirdToJdbcTypepublic static int fromFirebirdToJdbcType(int firebirdType, int subtype, int scale)Converts from the Firebird type, subtype and scale to the JDBC type value fromTypes.This method is not capable of identifying Types.ROWID; this will be identified asTypes.BINARYinstead.- Parameters:
- firebirdType- Firebird type value (from- ISCConstants- SQL_*with or without nullable bit set
- subtype- Subtype
- scale- Scale
- Returns:
- JDBC type, or Types.OTHERfor unknown types
 
 - 
fromMetaDataToJdbcTypepublic static int fromMetaDataToJdbcType(int metaDataType, int subtype, int scale)Converts from the metadata type (as used in the system tables) to JDBC type values fromTypes.- Parameters:
- metaDataType- Metadata type value
- subtype- Subtype
- scale- Scale
- Returns:
- JDBC type, or Types.OTHERfor unknown types
 
 - 
fromMetaDataToFirebirdTypepublic static int fromMetaDataToFirebirdType(int metaDataType) Converts the metadata type value to the Firebird type value (null bit not set).- Parameters:
- metaDataType- Metadata type value
- Returns:
- Firebird type value
 
 
- 
 
-