Class TinyIntAsSmallIntJdbcType
- java.lang.Object
-
- org.hibernate.type.descriptor.jdbc.TinyIntJdbcType
-
- org.hibernate.type.descriptor.jdbc.TinyIntAsSmallIntJdbcType
-
- All Implemented Interfaces:
Serializable,JdbcType
public class TinyIntAsSmallIntJdbcType extends TinyIntJdbcType
Descriptor forTINYINThandling, when theSMALLINTDDL type code is used. This type binds and extractsShortinstead ofBytethrough JDBC, because it is not specified whether the conversion fromBytetoShortis signed or unsigned, yet we need the conversion to be signed, which is properly handled by theJavaType.unwrap(Object, Class, WrapperOptions)implementations.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static TinyIntAsSmallIntJdbcTypeINSTANCE
-
Constructor Summary
Constructors Constructor Description TinyIntAsSmallIntJdbcType()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <X> ValueBinder<X>getBinder(JavaType<X> javaType)Obtain a binder object capable of binding values of the given Java type to parameters of a JDBCPreparedStatement.intgetDdlTypeCode()A JDBC type code that identifies the SQL column type to be used for schema generation.<X> ValueExtractor<X>getExtractor(JavaType<X> javaType)Class<?>getPreferredJavaTypeClass(WrapperOptions options)The Java type class that is preferred by the binder or null.-
Methods inherited from class org.hibernate.type.descriptor.jdbc.TinyIntJdbcType
getFriendlyName, getJdbcLiteralFormatter, getJdbcRecommendedJavaTypeMapping, getJdbcTypeCode, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.hibernate.type.descriptor.jdbc.JdbcType
addAuxiliaryDatabaseObjects, appendWriteExpression, getCastType, getCheckCondition, getDefaultSqlTypeCode, getExtraCreateTableInfo, isBinary, isDecimal, isDuration, isFloat, isInteger, isInterval, isLob, isLobOrLong, isNationalized, isNumber, isString, isStringLike, isTemporal, registerOutParameter, registerOutParameter, wrapTopLevelSelectionExpression, wrapWriteExpression
-
-
-
-
Field Detail
-
INSTANCE
public static final TinyIntAsSmallIntJdbcType INSTANCE
-
-
Method Detail
-
getDdlTypeCode
public int getDdlTypeCode()
Description copied from interface:JdbcTypeA JDBC type code that identifies the SQL column type to be used for schema generation.This value is passed to
DdlTypeRegistry.getTypeName(int, Size, Type)to obtain the SQL column type.- Returns:
- a JDBC type code
-
getPreferredJavaTypeClass
public Class<?> getPreferredJavaTypeClass(WrapperOptions options)
Description copied from interface:JdbcTypeThe Java type class that is preferred by the binder or null.- Specified by:
getPreferredJavaTypeClassin interfaceJdbcType- Overrides:
getPreferredJavaTypeClassin classTinyIntJdbcType
-
getBinder
public <X> ValueBinder<X> getBinder(JavaType<X> javaType)
Description copied from interface:JdbcTypeObtain a binder object capable of binding values of the given Java type to parameters of a JDBCPreparedStatement.- Specified by:
getBinderin interfaceJdbcType- Overrides:
getBinderin classTinyIntJdbcType- Parameters:
javaType- The descriptor describing the types of Java values to be bound- Returns:
- The appropriate binder.
-
getExtractor
public <X> ValueExtractor<X> getExtractor(JavaType<X> javaType)
Description copied from interface:JdbcTypeObtain an extractor object capable of extracting values of the given Java type from a JDBCResultSet.- Specified by:
getExtractorin interfaceJdbcType- Overrides:
getExtractorin classTinyIntJdbcType- Parameters:
javaType- The descriptor describing the types of Java values to be extracted- Returns:
- The appropriate extractor
-
-