public class PostgreSQLEnumType
extends org.hibernate.type.EnumType
Enum
to a PostgreSQL ENUM column type.
For more details about how to use it, check out this article on vladmihalcea.com.
Modifier and Type | Field and Description |
---|---|
static PostgreSQLEnumType |
INSTANCE |
Constructor and Description |
---|
PostgreSQLEnumType()
Initialization constructor taking the default
Configuration object. |
PostgreSQLEnumType(Class<? extends Enum> enumClass)
Initialization constructor taking the
Class . |
PostgreSQLEnumType(Configuration configuration)
Initialization constructor taking a custom
Configuration object. |
Modifier and Type | Method and Description |
---|---|
void |
nullSafeSet(PreparedStatement st,
Object value,
int index,
org.hibernate.engine.spi.SharedSessionContractImplementor session) |
int[] |
sqlTypes() |
public static final PostgreSQLEnumType INSTANCE
public PostgreSQLEnumType()
Configuration
object.public PostgreSQLEnumType(Configuration configuration)
Configuration
object.configuration
- custom Configuration
object.public void nullSafeSet(PreparedStatement st, Object value, int index, org.hibernate.engine.spi.SharedSessionContractImplementor session) throws org.hibernate.HibernateException, SQLException
nullSafeSet
in interface org.hibernate.usertype.UserType
nullSafeSet
in class org.hibernate.type.EnumType
org.hibernate.HibernateException
SQLException
public int[] sqlTypes()
sqlTypes
in interface org.hibernate.usertype.UserType
sqlTypes
in class org.hibernate.type.EnumType
Copyright © 2022. All rights reserved.