Public Member Functions

alma.hibernate.util.HibernateXmlType Class Reference

Inherits org::hibernate::type::StringClobType, org::hibernate::usertype::UserType, and java::io::Serializable.

List of all members.

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

Detailed Description

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.

Author:
rkurowsk, Jan 22, 2010

Member Function Documentation

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

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties