Inherits org::hibernate::type::StringClobType, org::hibernate::usertype::UserType, and java::io::Serializable.
Public Member Functions | |
Object | nullSafeGet (ResultSet rs, String[] names, Object owner) throws HibernateException, SQLException |
void | nullSafeSet (PreparedStatement st, Object value, int index) throws HibernateException, SQLException |
A hibernate UserType that supports the Oracle XMLTYPE.
Because we store the XMLTYPE as a String in our domain class it seems adequate to inherit StringClobType's implementation of everything except: nullSafeGet() and nullSafeSet()
To use this class in your domain class add the following above the class declaration (where the @Entity is):
@TypeDef(name = "xmltype", typeClass = HibernateXmlType.class)
Then add this to the Java Strings that map Oracle XMLTYPEs in the DB:
@Type(type = "xmltype")
NOTE(rtobar): When we integrated Robert's class into ACS, we modified it to use reflection so that we get no errors if the Oracle jars are not on the classpath. Reflection is also used for inspecting for C3P0 classes. If classes are not found, then simply the old CLOB behavior will be used.
Object alma.hibernate.util.HibernateXmlType.nullSafeGet | ( | ResultSet | rs, | |
String[] | names, | |||
Object | owner | |||
) | throws HibernateException, SQLException |
void alma.hibernate.util.HibernateXmlType.nullSafeSet | ( | PreparedStatement | st, | |
Object | value, | |||
int | index | |||
) | throws HibernateException, SQLException |