Package org.hibernate.dialect
Class PostgreSQLOrdinalEnumJdbcType
- java.lang.Object
-
- org.hibernate.dialect.PostgreSQLEnumJdbcType
-
- org.hibernate.dialect.PostgreSQLOrdinalEnumJdbcType
-
- All Implemented Interfaces:
Serializable
,JdbcType
public class PostgreSQLOrdinalEnumJdbcType extends PostgreSQLEnumJdbcType
Represents a namedenum
type on PostgreSQL.Hibernate does not automatically use this for enums mapped as
EnumType.ORDINAL
, and instead this type must be explicitly requested using:@JdbcTypeCode(SqlTypes.NAMED_ORDINAL_ENUM)
-
-
Field Summary
Fields Modifier and Type Field Description static PostgreSQLOrdinalEnumJdbcType
INSTANCE
-
Constructor Summary
Constructors Constructor Description PostgreSQLOrdinalEnumJdbcType()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAuxiliaryDatabaseObjects(JavaType<?> javaType, Size columnSize, Database database, JdbcTypeIndicators context)
void
addAuxiliaryDatabaseObjects(JavaType<?> javaType, Size columnSize, Database database, TypeConfiguration typeConfiguration)
int
getDefaultSqlTypeCode()
A JDBC type code that identifies the SQL column type.-
Methods inherited from class org.hibernate.dialect.PostgreSQLEnumJdbcType
addAuxiliaryDatabaseObjects, getBinder, getExtractor, getFriendlyName, getJdbcLiteralFormatter, 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
appendWriteExpression, getCastType, getCheckCondition, getDdlTypeCode, getExtraCreateTableInfo, getJdbcRecommendedJavaTypeMapping, getPreferredJavaTypeClass, isBinary, isDecimal, isDuration, isFloat, isInteger, isInterval, isLob, isLobOrLong, isNationalized, isNumber, isString, isStringLike, isTemporal, registerOutParameter, registerOutParameter, wrapTopLevelSelectionExpression, wrapWriteExpression
-
-
-
-
Field Detail
-
INSTANCE
public static final PostgreSQLOrdinalEnumJdbcType INSTANCE
-
-
Method Detail
-
getDefaultSqlTypeCode
public int getDefaultSqlTypeCode()
Description copied from interface:JdbcType
A JDBC type code that identifies the SQL column type.This value might be different from
JdbcType.getDdlTypeCode()
if the actual type e.g. JSON is emulated through a type like CLOB.- Specified by:
getDefaultSqlTypeCode
in interfaceJdbcType
- Overrides:
getDefaultSqlTypeCode
in classPostgreSQLEnumJdbcType
- Returns:
- a JDBC type code
-
addAuxiliaryDatabaseObjects
public void addAuxiliaryDatabaseObjects(JavaType<?> javaType, Size columnSize, Database database, JdbcTypeIndicators context)
Description copied from interface:JdbcType
- Specified by:
addAuxiliaryDatabaseObjects
in interfaceJdbcType
- Overrides:
addAuxiliaryDatabaseObjects
in classPostgreSQLEnumJdbcType
-
addAuxiliaryDatabaseObjects
public void addAuxiliaryDatabaseObjects(JavaType<?> javaType, Size columnSize, Database database, TypeConfiguration typeConfiguration)
- Specified by:
addAuxiliaryDatabaseObjects
in interfaceJdbcType
- Overrides:
addAuxiliaryDatabaseObjects
in classPostgreSQLEnumJdbcType
-
-