public class EnumType<T extends Enum> extends Object implements EnhancedUserType, DynamicParameterizedType, LoggableUserType, TypeConfigurationAware, Serializable
EnumType is used).
     DynamicParameterizedType.ParameterType| Modifier and Type | Field and Description | 
|---|---|
| static String | ENUM | 
| static String | NAMED | 
| static String | TYPE | 
ACCESS_TYPE, ENTITY, IS_DYNAMIC, IS_PRIMARY_KEY, PARAMETER_TYPE, PROPERTY, RETURNED_CLASS, XPROPERTY| Constructor and Description | 
|---|
| EnumType() | 
| Modifier and Type | Method and Description | 
|---|---|
| Object | assemble(Serializable cached,
        Object owner)Reconstruct an object from the cacheable representation. | 
| Object | deepCopy(Object value)Return a deep copy of the persistent state, stopping at entities and at
 collections. | 
| Serializable | disassemble(Object value)Transform the object into its cacheable representation. | 
| boolean | equals(Object x,
      Object y)Compare two instances of the class mapped by this type for persistence "equality". | 
| Object | fromXMLString(String xmlValue)Parse a string representation of this value, as it appears in an XML document | 
| TypeConfiguration | getTypeConfiguration() | 
| int | hashCode(Object x)Get a hashcode for the instance, consistent with persistence "equality" | 
| boolean | isMutable()Are objects of this type mutable? | 
| boolean | isOrdinal() | 
| Object | nullSafeGet(ResultSet rs,
           String[] names,
           SharedSessionContractImplementor session,
           Object owner)Retrieve an instance of the mapped class from a JDBC resultset. | 
| void | nullSafeSet(PreparedStatement st,
           Object value,
           int index,
           SharedSessionContractImplementor session)Write an instance of the mapped class to a prepared statement. | 
| String | objectToSQLString(Object value)Return an SQL literal representation of the value | 
| Object | replace(Object original,
       Object target,
       Object owner)During merge, replace the existing (target) value in the entity we are merging to
 with a new (original) value from the detached entity we are merging. | 
| Class<? extends Enum> | returnedClass()The class returned by nullSafeGet(). | 
| void | setParameterValues(Properties parameters)Gets called by Hibernate to pass the configured type parameters to
 the implementation. | 
| void | setTypeConfiguration(TypeConfiguration typeConfiguration) | 
| int[] | sqlTypes()Return the SQL type codes for the columns mapped by this type. | 
| String | toLoggableString(Object value,
                SessionFactoryImplementor factory)Generate a loggable string representation of the collection (value). | 
| String | toXMLString(Object value)Return a string representation of this value, as it should appear in an XML document | 
public static final String ENUM
public static final String NAMED
public static final String TYPE
public void setParameterValues(Properties parameters)
ParameterizedTypesetParameterValues in interface ParameterizedTypepublic int[] sqlTypes()
UserTypepublic Class<? extends Enum> returnedClass()
UserTypereturnedClass in interface UserTypepublic boolean equals(Object x, Object y) throws HibernateException
UserTypeequals in interface UserTypeHibernateExceptionpublic int hashCode(Object x) throws HibernateException
UserTypehashCode in interface UserTypeHibernateExceptionpublic Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner) throws SQLException
UserTypenullSafeGet in interface UserTypers - a JDBC result setnames - the column namesowner - the containing entity  @return ObjectSQLExceptionpublic void nullSafeSet(PreparedStatement st, Object value, int index, SharedSessionContractImplementor session) throws HibernateException, SQLException
UserTypenullSafeSet in interface UserTypest - a JDBC prepared statementvalue - the object to writeindex - statement parameter indexHibernateExceptionSQLExceptionpublic Object deepCopy(Object value) throws HibernateException
UserTypedeepCopy in interface UserTypevalue - the object to be cloned, which may be nullHibernateExceptionpublic boolean isMutable()
UserTypepublic Serializable disassemble(Object value) throws HibernateException
UserTypedisassemble in interface UserTypevalue - the object to be cachedHibernateExceptionpublic Object assemble(Serializable cached, Object owner) throws HibernateException
UserTypeassemble in interface UserTypecached - the object to be cachedowner - the owner of the cached objectHibernateExceptionpublic Object replace(Object original, Object target, Object owner) throws HibernateException
UserTypereplace in interface UserTypeoriginal - the value from the detached entity being mergedtarget - the value in the managed entityHibernateExceptionpublic TypeConfiguration getTypeConfiguration()
getTypeConfiguration in interface TypeConfigurationAwarepublic void setTypeConfiguration(TypeConfiguration typeConfiguration)
setTypeConfiguration in interface TypeConfigurationAwarepublic String objectToSQLString(Object value)
EnhancedUserTypeobjectToSQLString in interface EnhancedUserTypepublic String toXMLString(Object value)
EnhancedUserTypetoXMLString in interface EnhancedUserTypepublic Object fromXMLString(String xmlValue)
EnhancedUserTypefromXMLString in interface EnhancedUserTypepublic String toLoggableString(Object value, SessionFactoryImplementor factory)
LoggableUserTypetoLoggableString in interface LoggableUserTypevalue - The collection to be logged; guarenteed to be non-null and initialized.factory - The factory.public boolean isOrdinal()
Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.