org.hl7.hibernate
Class XMLPersistedDataTypeUserType

java.lang.Object
  extended by org.hl7.hibernate.AbstractDataTypeUserType
      extended by org.hl7.hibernate.XMLPersistedDataTypeUserType

public class XMLPersistedDataTypeUserType
extends AbstractDataTypeUserType

A Hibernate UserType that persists HL7 data type values through their XML serialization. This is a generic approach, where one mapper class does it all. It uses the ParameterizedType interface of hibernate QSET<TS>

Version:
$Id: XMLPersistedDataTypeUserType.java 6473 2007-06-20 17:55:23Z crosenthal $
Author:
Gunther Schadow

Field Summary
static javax.xml.transform.TransformerFactory _transformerFactory
           
 
Constructor Summary
XMLPersistedDataTypeUserType()
           
 
Method Summary
 java.lang.Object nullSafeGet(java.sql.ResultSet rs, java.lang.String[] names, java.lang.Object owner)
          Retrieve an instance of the mapped class from a JDBC resultset.
 void nullSafeSet(java.sql.PreparedStatement st, java.lang.Object rawValue, int index)
          Write an instance of the mapped class to a prepared statement.
 java.lang.Class returnedClass()
          The class returned by nullSafeGet().
 void setParameterValues(java.util.Properties parameters)
          Gets called by Hibernate to pass the configured type parameters to the implementation.
 int[] sqlTypes()
          Return the SQL type codes for the columns mapped by this type.
 
Methods inherited from class org.hl7.hibernate.AbstractDataTypeUserType
assemble, deepCopy, disassemble, equals, hashCode, isMutable, replace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_transformerFactory

public static final javax.xml.transform.TransformerFactory _transformerFactory
Constructor Detail

XMLPersistedDataTypeUserType

public XMLPersistedDataTypeUserType()
Method Detail

setParameterValues

public void setParameterValues(java.util.Properties parameters)
Gets called by Hibernate to pass the configured type parameters to the implementation.


returnedClass

public java.lang.Class returnedClass()
The class returned by nullSafeGet().

Specified by:
returnedClass in class AbstractDataTypeUserType

sqlTypes

public int[] sqlTypes()
Return the SQL type codes for the columns mapped by this type.

Specified by:
sqlTypes in class AbstractDataTypeUserType

nullSafeGet

public java.lang.Object nullSafeGet(java.sql.ResultSet rs,
                                    java.lang.String[] names,
                                    java.lang.Object owner)
                             throws HibernateException
Retrieve an instance of the mapped class from a JDBC resultset.

Specified by:
nullSafeGet in class AbstractDataTypeUserType
Throws:
HibernateException

nullSafeSet

public void nullSafeSet(java.sql.PreparedStatement st,
                        java.lang.Object rawValue,
                        int index)
                 throws HibernateException
Write an instance of the mapped class to a prepared statement.

Specified by:
nullSafeSet in class AbstractDataTypeUserType
Throws:
HibernateException