ome.tools.hibernate
Class ListAsSQLArrayUserType.ENUM<E extends Enum<E>>
java.lang.Object
ome.tools.hibernate.ListAsSQLArrayUserType<E>
ome.tools.hibernate.ListAsSQLArrayUserType.ENUM<E>
- All Implemented Interfaces:
- org.hibernate.usertype.ParameterizedType, org.hibernate.usertype.UserType
- Enclosing class:
- ListAsSQLArrayUserType<T>
public static class ListAsSQLArrayUserType.ENUM<E extends Enum<E>>
- extends ListAsSQLArrayUserType<E>
Warning, this one is special. You have to define a class that extends
ENUM_LIST<E> and that has a no arguments constructor. For example :
class MyEnumsList extends ENUM_LIST&<MyEnumType> { public
MyEnumList(){ super( MyEnum.values() ); } } Then, define :
hibernate.property type="com.myPackage.MyEnumsList" hibernate.column
name="fieldName" sql-type="int[]"
Methods inherited from class ome.tools.hibernate.ListAsSQLArrayUserType |
assemble, deepCopy, disassemble, equals, hashCode, isMutable, nullSafeGet, nullSafeSet, replace, returnedClass, setParameterValues, sqlTypes |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ListAsSQLArrayUserType.ENUM
protected ListAsSQLArrayUserType.ENUM(E[] theEnumValues)
- Parameters:
clazz
- the class of the enum.theEnumValues
- The values of enum (by invoking .values()).
getDataAsArray
protected Array getDataAsArray(Connection conn,
Object value)
throws SQLException
- Specified by:
getDataAsArray
in class ListAsSQLArrayUserType<E extends Enum<E>>
- Throws:
SQLException
getDataFromArray
protected List<E> getDataFromArray(Object array)
- Specified by:
getDataFromArray
in class ListAsSQLArrayUserType<E extends Enum<E>>
OmeroJava Api
Version: 4.3.3-00d1137e-b2894
Copyright © 2009 The University of Dundee. All Rights Reserved.