public class GenericEnumUserType
extends java.lang.Object
implements org.hibernate.usertype.UserType, org.hibernate.usertype.ParameterizedType
<hibernate-mapping> <typedef name="documentTypeEnum" class="com.jalios.jcms.db.GenericEnumUserType"> <param name="enumClass">com.jalios.jcmsplugin.myplugin.DocumentType</param> <!--<param name="identifierMethod">toInt</param>--> <!--default: name--> <!--<param name="valueOfMethod">fromInt</param>--> <!--default: valueOf--> </typedef> ... <property name="documentType" type="documentTypeEnum" /> <hibernate-mapping>
Constructor and Description |
---|
GenericEnumUserType() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
assemble(java.io.Serializable cached,
java.lang.Object owner) |
java.lang.Object |
deepCopy(java.lang.Object value) |
java.io.Serializable |
disassemble(java.lang.Object value) |
boolean |
equals(java.lang.Object x,
java.lang.Object y) |
int |
hashCode(java.lang.Object x) |
boolean |
isMutable() |
java.lang.Object |
nullSafeGet(java.sql.ResultSet rs,
java.lang.String[] names,
java.lang.Object owner) |
void |
nullSafeSet(java.sql.PreparedStatement st,
java.lang.Object value,
int index) |
java.lang.Object |
replace(java.lang.Object original,
java.lang.Object target,
java.lang.Object owner) |
java.lang.Class |
returnedClass() |
void |
setParameterValues(java.util.Properties parameters) |
int[] |
sqlTypes() |
public void setParameterValues(java.util.Properties parameters)
setParameterValues
in interface org.hibernate.usertype.ParameterizedType
public java.lang.Class returnedClass()
returnedClass
in interface org.hibernate.usertype.UserType
public java.lang.Object nullSafeGet(java.sql.ResultSet rs, java.lang.String[] names, java.lang.Object owner) throws org.hibernate.HibernateException, java.sql.SQLException
nullSafeGet
in interface org.hibernate.usertype.UserType
org.hibernate.HibernateException
java.sql.SQLException
public void nullSafeSet(java.sql.PreparedStatement st, java.lang.Object value, int index) throws org.hibernate.HibernateException, java.sql.SQLException
nullSafeSet
in interface org.hibernate.usertype.UserType
org.hibernate.HibernateException
java.sql.SQLException
public int[] sqlTypes()
sqlTypes
in interface org.hibernate.usertype.UserType
public java.lang.Object assemble(java.io.Serializable cached, java.lang.Object owner) throws org.hibernate.HibernateException
assemble
in interface org.hibernate.usertype.UserType
org.hibernate.HibernateException
public java.lang.Object deepCopy(java.lang.Object value) throws org.hibernate.HibernateException
deepCopy
in interface org.hibernate.usertype.UserType
org.hibernate.HibernateException
public java.io.Serializable disassemble(java.lang.Object value) throws org.hibernate.HibernateException
disassemble
in interface org.hibernate.usertype.UserType
org.hibernate.HibernateException
public boolean equals(java.lang.Object x, java.lang.Object y) throws org.hibernate.HibernateException
equals
in interface org.hibernate.usertype.UserType
org.hibernate.HibernateException
public int hashCode(java.lang.Object x) throws org.hibernate.HibernateException
hashCode
in interface org.hibernate.usertype.UserType
org.hibernate.HibernateException
public boolean isMutable()
isMutable
in interface org.hibernate.usertype.UserType
public java.lang.Object replace(java.lang.Object original, java.lang.Object target, java.lang.Object owner) throws org.hibernate.HibernateException
replace
in interface org.hibernate.usertype.UserType
org.hibernate.HibernateException
Copyright © 2001-2010 Jalios SA. All Rights Reserved.