public class MappedEnumType extends Object implements org.hibernate.usertype.UserType, org.hibernate.usertype.ParameterizedType
IDatabaseCodeEnum to map between database values and enum labels. This
version works on varchar fields only.
This code works only when HibernateChecker.enhanceMappings() is called before use, or when the type of the property is uselessly repeated in Hibernate's config!!
| Constructor and Description |
|---|
MappedEnumType() |
| Modifier and Type | Method and Description |
|---|---|
Object |
assemble(Serializable cached,
Object owner) |
Object |
deepCopy(Object value) |
Serializable |
disassemble(Object value) |
boolean |
equals(Object x,
Object y) |
int |
hashCode(Object x) |
boolean |
isMutable() |
Object |
nullSafeGet(ResultSet rs,
String[] names,
Object owner) |
void |
nullSafeSet(PreparedStatement st,
Object value,
int index) |
Object |
replace(Object original,
Object target,
Object owner) |
Class<?> |
returnedClass() |
void |
setParameterValues(Properties parameters)
Called with the typedef for this type.
|
int[] |
sqlTypes() |
public int[] sqlTypes()
sqlTypes in interface org.hibernate.usertype.UserTypepublic boolean isMutable()
isMutable in interface org.hibernate.usertype.UserTypepublic Class<?> returnedClass()
returnedClass in interface org.hibernate.usertype.UserTypepublic void setParameterValues(Properties parameters)
setParameterValues in interface org.hibernate.usertype.ParameterizedTypeParameterizedType.setParameterValues(java.util.Properties)public boolean equals(Object x, Object y) throws org.hibernate.HibernateException
equals in interface org.hibernate.usertype.UserTypeorg.hibernate.HibernateExceptionpublic int hashCode(Object x) throws org.hibernate.HibernateException
hashCode in interface org.hibernate.usertype.UserTypeorg.hibernate.HibernateExceptionpublic Object assemble(Serializable cached, Object owner) throws org.hibernate.HibernateException
assemble in interface org.hibernate.usertype.UserTypeorg.hibernate.HibernateExceptionpublic Object deepCopy(Object value) throws org.hibernate.HibernateException
deepCopy in interface org.hibernate.usertype.UserTypeorg.hibernate.HibernateExceptionpublic Serializable disassemble(Object value) throws org.hibernate.HibernateException
disassemble in interface org.hibernate.usertype.UserTypeorg.hibernate.HibernateExceptionpublic Object nullSafeGet(ResultSet rs, String[] names, Object owner) throws org.hibernate.HibernateException, SQLException
nullSafeGet in interface org.hibernate.usertype.UserTypeorg.hibernate.HibernateExceptionSQLExceptionpublic void nullSafeSet(PreparedStatement st, Object value, int index) throws org.hibernate.HibernateException, SQLException
nullSafeSet in interface org.hibernate.usertype.UserTypeorg.hibernate.HibernateExceptionSQLExceptionCopyright © 2017 etc.to. All rights reserved.