net.sourceforge.xconf.toolbox.hibernate3
Class EnumType
java.lang.Object
net.sourceforge.xconf.toolbox.hibernate3.ImmutableUserType
net.sourceforge.xconf.toolbox.hibernate3.EnumType
- All Implemented Interfaces:
- UserType
public class EnumType
- extends ImmutableUserType
Base class for Hibernate types that persist Enum
subclasses as VARCHAR fields.
- Author:
- Tom Czarniecki
|
Constructor Summary |
EnumType(Enum prototype)
Requires an instance of the Enum subclass to resolve rather than the
subclass' Class element to avoid bizzare uninitialised errors that
occur on JDK 1.5 with Commons-Lang 2.1 EnumUtils utility methods. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EnumType
public EnumType(Enum prototype)
- Requires an instance of the Enum subclass to resolve rather than the
subclass' Class element to avoid bizzare uninitialised errors that
occur on JDK 1.5 with Commons-Lang 2.1 EnumUtils utility methods.
sqlTypes
public int[] sqlTypes()
returnedClass
public Class returnedClass()
nullSafeGet
public Object nullSafeGet(ResultSet rs,
String[] names,
Object owner)
throws HibernateException,
SQLException
- Throws:
HibernateException
SQLException
nullSafeSet
public void nullSafeSet(PreparedStatement st,
Object value,
int index)
throws HibernateException,
SQLException
- Throws:
HibernateException
SQLException
Copyright © 2007 Thomas Czarniecki. All Rights Reserved.