com.anasoft.os.daofusion.bitemporal
Class PersistentDateTime

java.lang.Object
  extended by com.anasoft.os.daofusion.bitemporal.PersistentDateTime
All Implemented Interfaces:
org.hibernate.usertype.EnhancedUserType, org.hibernate.usertype.UserType

public class PersistentDateTime
extends java.lang.Object
implements org.hibernate.usertype.EnhancedUserType

Persist DateTime via Hibernate.

Author:
Mario Ivankovits (mario@ops.co.at)

Field Summary
static PersistentDateTime INSTANCE
           
static java.lang.String TYPE
           
 
Constructor Summary
PersistentDateTime()
           
 
Method Summary
 java.lang.Object assemble(java.io.Serializable cached, java.lang.Object value)
           
 java.lang.Object deepCopy(java.lang.Object value)
           
 java.io.Serializable disassemble(java.lang.Object value)
           
 boolean equals(java.lang.Object x, java.lang.Object y)
           
 java.lang.Object fromXMLString(java.lang.String string)
           
 int hashCode(java.lang.Object object)
           
 boolean isMutable()
           
 java.lang.Object nullSafeGet(java.sql.ResultSet resultSet, java.lang.String string)
           
 java.lang.Object nullSafeGet(java.sql.ResultSet resultSet, java.lang.String[] strings, java.lang.Object object)
           
 void nullSafeSet(java.sql.PreparedStatement preparedStatement, java.lang.Object value, int index)
           
 java.lang.String objectToSQLString(java.lang.Object object)
           
 java.lang.Object replace(java.lang.Object original, java.lang.Object target, java.lang.Object owner)
           
 java.lang.Class<org.joda.time.DateTime> returnedClass()
           
 int[] sqlTypes()
           
 java.lang.String toXMLString(java.lang.Object object)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE

public static final java.lang.String TYPE
See Also:
Constant Field Values

INSTANCE

public static final PersistentDateTime INSTANCE
Constructor Detail

PersistentDateTime

public PersistentDateTime()
Method Detail

sqlTypes

public int[] sqlTypes()
Specified by:
sqlTypes in interface org.hibernate.usertype.UserType

returnedClass

public java.lang.Class<org.joda.time.DateTime> returnedClass()
Specified by:
returnedClass in interface org.hibernate.usertype.UserType

equals

public boolean equals(java.lang.Object x,
                      java.lang.Object y)
               throws org.hibernate.HibernateException
Specified by:
equals in interface org.hibernate.usertype.UserType
Throws:
org.hibernate.HibernateException

hashCode

public int hashCode(java.lang.Object object)
             throws org.hibernate.HibernateException
Specified by:
hashCode in interface org.hibernate.usertype.UserType
Throws:
org.hibernate.HibernateException

nullSafeGet

public java.lang.Object nullSafeGet(java.sql.ResultSet resultSet,
                                    java.lang.String[] strings,
                                    java.lang.Object object)
                             throws org.hibernate.HibernateException,
                                    java.sql.SQLException
Specified by:
nullSafeGet in interface org.hibernate.usertype.UserType
Throws:
org.hibernate.HibernateException
java.sql.SQLException

nullSafeGet

public java.lang.Object nullSafeGet(java.sql.ResultSet resultSet,
                                    java.lang.String string)
                             throws java.sql.SQLException
Throws:
java.sql.SQLException

nullSafeSet

public void nullSafeSet(java.sql.PreparedStatement preparedStatement,
                        java.lang.Object value,
                        int index)
                 throws org.hibernate.HibernateException,
                        java.sql.SQLException
Specified by:
nullSafeSet in interface org.hibernate.usertype.UserType
Throws:
org.hibernate.HibernateException
java.sql.SQLException

deepCopy

public java.lang.Object deepCopy(java.lang.Object value)
                          throws org.hibernate.HibernateException
Specified by:
deepCopy in interface org.hibernate.usertype.UserType
Throws:
org.hibernate.HibernateException

isMutable

public boolean isMutable()
Specified by:
isMutable in interface org.hibernate.usertype.UserType

disassemble

public java.io.Serializable disassemble(java.lang.Object value)
                                 throws org.hibernate.HibernateException
Specified by:
disassemble in interface org.hibernate.usertype.UserType
Throws:
org.hibernate.HibernateException

assemble

public java.lang.Object assemble(java.io.Serializable cached,
                                 java.lang.Object value)
                          throws org.hibernate.HibernateException
Specified by:
assemble in interface org.hibernate.usertype.UserType
Throws:
org.hibernate.HibernateException

replace

public java.lang.Object replace(java.lang.Object original,
                                java.lang.Object target,
                                java.lang.Object owner)
                         throws org.hibernate.HibernateException
Specified by:
replace in interface org.hibernate.usertype.UserType
Throws:
org.hibernate.HibernateException

objectToSQLString

public java.lang.String objectToSQLString(java.lang.Object object)
Specified by:
objectToSQLString in interface org.hibernate.usertype.EnhancedUserType

toXMLString

public java.lang.String toXMLString(java.lang.Object object)
Specified by:
toXMLString in interface org.hibernate.usertype.EnhancedUserType

fromXMLString

public java.lang.Object fromXMLString(java.lang.String string)
Specified by:
fromXMLString in interface org.hibernate.usertype.EnhancedUserType


Copyright © 2008-2009 ANASOFT and contributors. All Rights Reserved.