public class EnumType extends java.lang.Object implements EnhancedUserType, DynamicParameterizedType, LoggableUserType, java.io.Serializable
EnumType is used).
| Modifier and Type | Class and Description |
|---|---|
class |
EnumType.EnumValueMapperSupport |
DynamicParameterizedType.ParameterType| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ENUM |
static java.lang.String |
NAMED |
static java.lang.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 |
|---|---|
java.lang.Object |
assemble(java.io.Serializable cached,
java.lang.Object owner)
Reconstruct an object from the cacheable representation.
|
java.lang.Object |
deepCopy(java.lang.Object value)
Return a deep copy of the persistent state, stopping at entities and at
collections.
|
java.io.Serializable |
disassemble(java.lang.Object value)
Transform the object into its cacheable representation.
|
boolean |
equals(java.lang.Object x,
java.lang.Object y)
Compare two instances of the class mapped by this type for persistence "equality".
|
java.lang.Object |
fromXMLString(java.lang.String xmlValue)
Parse a string representation of this value, as it appears in an XML document
|
int |
hashCode(java.lang.Object x)
Get a hashcode for the instance, consistent with persistence "equality"
|
boolean |
isMutable()
Are objects of this type mutable?
|
boolean |
isOrdinal() |
java.lang.Object |
nullSafeGet(java.sql.ResultSet rs,
java.lang.String[] names,
SharedSessionContractImplementor session,
java.lang.Object owner)
Retrieve an instance of the mapped class from a JDBC resultset.
|
void |
nullSafeSet(java.sql.PreparedStatement st,
java.lang.Object value,
int index,
SharedSessionContractImplementor session)
Write an instance of the mapped class to a prepared statement.
|
java.lang.String |
objectToSQLString(java.lang.Object value)
Return an SQL literal representation of the value
|
java.lang.Object |
replace(java.lang.Object original,
java.lang.Object target,
java.lang.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.
|
java.lang.Class<? extends java.lang.Enum> |
returnedClass()
The class returned by nullSafeGet().
|
void |
setParameterValues(java.util.Properties parameters)
Gets called by Hibernate to pass the configured type parameters to
the implementation.
|
int[] |
sqlTypes()
Return the SQL type codes for the columns mapped by this type.
|
java.lang.String |
toLoggableString(java.lang.Object value,
SessionFactoryImplementor factory)
Generate a loggable string representation of the collection (value).
|
java.lang.String |
toXMLString(java.lang.Object value)
Return a string representation of this value, as it should appear in an XML document
|
public static final java.lang.String ENUM
public static final java.lang.String NAMED
public static final java.lang.String TYPE
public void setParameterValues(java.util.Properties parameters)
ParameterizedTypesetParameterValues in interface ParameterizedTypepublic int[] sqlTypes()
UserTypepublic java.lang.Class<? extends java.lang.Enum> returnedClass()
UserTypereturnedClass in interface UserTypepublic boolean equals(java.lang.Object x,
java.lang.Object y)
throws HibernateException
UserTypeequals in interface UserTypeHibernateExceptionpublic int hashCode(java.lang.Object x)
throws HibernateException
UserTypehashCode in interface UserTypeHibernateExceptionpublic java.lang.Object nullSafeGet(java.sql.ResultSet rs,
java.lang.String[] names,
SharedSessionContractImplementor session,
java.lang.Object owner)
throws java.sql.SQLException
UserTypenullSafeGet in interface UserTypers - a JDBC result setnames - the column namesowner - the containing entity @return Objectjava.sql.SQLExceptionpublic void nullSafeSet(java.sql.PreparedStatement st,
java.lang.Object value,
int index,
SharedSessionContractImplementor session)
throws HibernateException,
java.sql.SQLException
UserTypenullSafeSet in interface UserTypest - a JDBC prepared statementvalue - the object to writeindex - statement parameter indexHibernateExceptionjava.sql.SQLExceptionpublic java.lang.Object deepCopy(java.lang.Object value)
throws HibernateException
UserTypedeepCopy in interface UserTypevalue - the object to be cloned, which may be nullHibernateExceptionpublic boolean isMutable()
UserTypepublic java.io.Serializable disassemble(java.lang.Object value)
throws HibernateException
UserTypedisassemble in interface UserTypevalue - the object to be cachedHibernateExceptionpublic java.lang.Object assemble(java.io.Serializable cached,
java.lang.Object owner)
throws HibernateException
UserTypeassemble in interface UserTypecached - the object to be cachedowner - the owner of the cached objectHibernateExceptionpublic java.lang.Object replace(java.lang.Object original,
java.lang.Object target,
java.lang.Object owner)
throws HibernateException
UserTypereplace in interface UserTypeoriginal - the value from the detached entity being mergedtarget - the value in the managed entityHibernateExceptionpublic java.lang.String objectToSQLString(java.lang.Object value)
EnhancedUserTypeobjectToSQLString in interface EnhancedUserTypepublic java.lang.String toXMLString(java.lang.Object value)
EnhancedUserTypetoXMLString in interface EnhancedUserTypepublic java.lang.Object fromXMLString(java.lang.String xmlValue)
EnhancedUserTypefromXMLString in interface EnhancedUserTypepublic java.lang.String toLoggableString(java.lang.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.