gov.nih.nci.caarray.util
Class URIUserType

java.lang.Object
  extended by gov.nih.nci.caarray.util.URIUserType
All Implemented Interfaces:
org.hibernate.usertype.UserType

public class URIUserType
extends java.lang.Object
implements org.hibernate.usertype.UserType

Custom Hibernate Type for URIs. simply stores the URI in a varchar column using its string representation.

Author:
dkokotov

Constructor Summary
URIUserType()
           
 
Method Summary
 java.lang.Object assemble(java.io.Serializable cached, java.lang.Object owner)
          
 java.lang.Object deepCopy(java.lang.Object o)
          
 java.io.Serializable disassemble(java.lang.Object value)
          
 boolean equals(java.lang.Object x, java.lang.Object y)
          
 int hashCode(java.lang.Object x)
          
 boolean isMutable()
          
 java.lang.Object nullSafeGet(java.sql.ResultSet inResultSet, java.lang.String[] names, java.lang.Object o)
          
 void nullSafeSet(java.sql.PreparedStatement inPreparedStatement, java.lang.Object o, int i)
          
 java.lang.Object replace(java.lang.Object original, java.lang.Object target, java.lang.Object owner)
          
 java.lang.Class<?> returnedClass()
          
 int[] sqlTypes()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URIUserType

public URIUserType()
Method Detail

sqlTypes

public int[] sqlTypes()

Specified by:
sqlTypes in interface org.hibernate.usertype.UserType

returnedClass

public java.lang.Class<?> returnedClass()

Specified by:
returnedClass in interface org.hibernate.usertype.UserType

equals

public boolean equals(java.lang.Object x,
                      java.lang.Object y)

Specified by:
equals in interface org.hibernate.usertype.UserType

nullSafeGet

public java.lang.Object nullSafeGet(java.sql.ResultSet inResultSet,
                                    java.lang.String[] names,
                                    java.lang.Object o)
                             throws java.sql.SQLException

Specified by:
nullSafeGet in interface org.hibernate.usertype.UserType
Throws:
java.sql.SQLException

nullSafeSet

public void nullSafeSet(java.sql.PreparedStatement inPreparedStatement,
                        java.lang.Object o,
                        int i)
                 throws java.sql.SQLException

Specified by:
nullSafeSet in interface org.hibernate.usertype.UserType
Throws:
java.sql.SQLException

deepCopy

public java.lang.Object deepCopy(java.lang.Object o)

Specified by:
deepCopy in interface org.hibernate.usertype.UserType

isMutable

public boolean isMutable()

Specified by:
isMutable in interface org.hibernate.usertype.UserType

assemble

public java.lang.Object assemble(java.io.Serializable cached,
                                 java.lang.Object owner)

Specified by:
assemble in interface org.hibernate.usertype.UserType

disassemble

public java.io.Serializable disassemble(java.lang.Object value)

Specified by:
disassemble in interface org.hibernate.usertype.UserType

replace

public java.lang.Object replace(java.lang.Object original,
                                java.lang.Object target,
                                java.lang.Object owner)

Specified by:
replace in interface org.hibernate.usertype.UserType

hashCode

public int hashCode(java.lang.Object x)

Specified by:
hashCode in interface org.hibernate.usertype.UserType