org.hl7.hibernate
Class AbstractDataTypeUserType

java.lang.Object
  extended by org.hl7.hibernate.AbstractDataTypeUserType
Direct Known Subclasses:
StringLiteralPersistedDataTypeUserType, XMLPersistedDataTypeUserType

public abstract class AbstractDataTypeUserType
extends java.lang.Object

An abstract Hibernate UserType that minimally implements the UserType interface appropriate for all HL7 data types.

Version:
$Id: AbstractDataTypeUserType.java 5652 2007-03-30 15:35:44Z crosenthal $
Author:
Gunther Schadow

Constructor Summary
AbstractDataTypeUserType()
           
 
Method Summary
 java.lang.Object assemble(java.io.Serializable cached, java.lang.Object owner)
          Deprecated. this operation is currently not supported
 java.lang.Object deepCopy(java.lang.Object value)
          Return a deep copy of the persistent state, stopping at entities and at collections.
 java.io.Serializable disassemble(java.lang.Object value)
          Deprecated. this operation is currently not supported
 boolean equals(java.lang.Object x, java.lang.Object y)
          Compare two instances of the class mapped by this type for persistence "equality".
 int hashCode(java.lang.Object x)
          Get a hashcode for the instance, consistent with persistence "equality".
 boolean isMutable()
          Are objects of this type mutable? No never!
abstract  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.
abstract  void nullSafeSet(java.sql.PreparedStatement st, java.lang.Object value, int index)
          Write an instance of the mapped class to a prepared statement.
 java.lang.Object replace(java.lang.Object original, java.lang.Object target, java.lang.Object owner)
          Deprecated. not implemented yet
abstract  java.lang.Class returnedClass()
          The class returned by nullSafeGet().
abstract  int[] sqlTypes()
          Return the SQL type codes for the columns mapped by this type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractDataTypeUserType

public AbstractDataTypeUserType()
Method Detail

returnedClass

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


sqlTypes

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


nullSafeGet

public abstract 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.

Throws:
HibernateException

nullSafeSet

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

Throws:
HibernateException

assemble

public java.lang.Object assemble(java.io.Serializable cached,
                                 java.lang.Object owner)
Deprecated. this operation is currently not supported

Reconstruct an object from the cacheable representation,


disassemble

public java.io.Serializable disassemble(java.lang.Object value)
Deprecated. this operation is currently not supported

Transform the object into its cacheable representation.


deepCopy

public java.lang.Object deepCopy(java.lang.Object value)
                          throws HibernateException
Return a deep copy of the persistent state, stopping at entities and at collections.

Throws:
HibernateException

equals

public boolean equals(java.lang.Object x,
                      java.lang.Object y)
               throws HibernateException
Compare two instances of the class mapped by this type for persistence "equality".

Throws:
HibernateException

hashCode

public int hashCode(java.lang.Object x)
             throws HibernateException
Get a hashcode for the instance, consistent with persistence "equality".

Throws:
HibernateException

isMutable

public boolean isMutable()
Are objects of this type mutable? No never!


replace

public java.lang.Object replace(java.lang.Object original,
                                java.lang.Object target,
                                java.lang.Object owner)
                         throws HibernateException
Deprecated. not implemented yet

What does this do?

Throws:
HibernateException