Class NativeOrdinalEnumDdlTypeImpl
- java.lang.Object
-
- org.hibernate.type.descriptor.sql.internal.NativeOrdinalEnumDdlTypeImpl
-
- All Implemented Interfaces:
Serializable
,DdlType
public class NativeOrdinalEnumDdlTypeImpl extends Object implements DdlType
-
-
Constructor Summary
Constructors Constructor Description NativeOrdinalEnumDdlTypeImpl(Dialect dialect)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getCastTypeName(JdbcType jdbcType, JavaType<?> javaType)
String
getCastTypeName(JdbcType jdbcType, JavaType<?> javaType, Long length, Integer precision, Integer scale)
String
getRawTypeName()
Returns the default type name without precision/length and scale parameters.int
getSqlTypeCode()
The SQL type code of the descriptor.String
getTypeName(Long size, Integer precision, Integer scale)
Return a type with the given length, precision, and scale.String
getTypeName(Size columnSize, Type type, DdlTypeRegistry ddlTypeRegistry)
Return a type with length, precision, and scale specified by the given size object.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.type.descriptor.sql.DdlType
getCastTypeName, getCastTypeName, getRawTypeNames, getTypeName, isLob
-
-
-
-
Constructor Detail
-
NativeOrdinalEnumDdlTypeImpl
public NativeOrdinalEnumDdlTypeImpl(Dialect dialect)
-
-
Method Detail
-
getSqlTypeCode
public int getSqlTypeCode()
Description copied from interface:DdlType
The SQL type code of the descriptor.- Specified by:
getSqlTypeCode
in interfaceDdlType
- Returns:
- a SQL type code
-
getTypeName
public String getTypeName(Size columnSize, Type type, DdlTypeRegistry ddlTypeRegistry)
Description copied from interface:DdlType
Return a type with length, precision, and scale specified by the given size object. The given type may be used to determine additional aspects of the returned SQL type.- Specified by:
getTypeName
in interfaceDdlType
-
getRawTypeName
public String getRawTypeName()
Description copied from interface:DdlType
Returns the default type name without precision/length and scale parameters.- Specified by:
getRawTypeName
in interfaceDdlType
-
getTypeName
public String getTypeName(Long size, Integer precision, Integer scale)
Description copied from interface:DdlType
Return a type with the given length, precision, and scale.- Specified by:
getTypeName
in interfaceDdlType
-
getCastTypeName
public String getCastTypeName(JdbcType jdbcType, JavaType<?> javaType)
Description copied from interface:DdlType
Return the database type corresponding to the givenJdbcType
that may be used as a target type in casting operations using the SQLCAST()
function, using the givenJavaType
to help determine the appropriate precision and scale. The length is usually chosen to be the maximum possible length for the dialect.- Specified by:
getCastTypeName
in interfaceDdlType
- Returns:
- The SQL type name
- See Also:
JavaType.getDefaultSqlScale(Dialect, JdbcType)
,JavaType.getDefaultSqlPrecision(Dialect, JdbcType)
,Dialect.getMaxVarcharLength()
-
getCastTypeName
public String getCastTypeName(JdbcType jdbcType, JavaType<?> javaType, Long length, Integer precision, Integer scale)
Description copied from interface:DdlType
Return the database type with the given length, precision, and scale, if specified, corresponding to the givenJdbcType
, that may be used as a target type in casting operations using the SQLCAST()
function, using the givenJavaType
to help determine the appropriate precision and scale. The length, if not explicitly specified, is usually chosen to be the maximum possible length for the dialect.- Specified by:
getCastTypeName
in interfaceDdlType
- Returns:
- The SQL type name
- See Also:
JavaType.getDefaultSqlScale(Dialect, JdbcType)
,JavaType.getDefaultSqlPrecision(Dialect, JdbcType)
,Dialect.getMaxVarcharLength()
-
-