it.amattioli.dominate.hibernate.types
Class FixedStringUserType

Show UML class diagram
java.lang.Object
  extended by it.amattioli.dominate.hibernate.types.FixedStringUserType
All Implemented Interfaces:
org.hibernate.usertype.UserType

public class FixedStringUserType
extends Object
implements org.hibernate.usertype.UserType

Custom class for trimming strings on the way out from the database, Hibernate 3 version

Author:
Paul Newport

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

Constructor Detail

FixedStringUserType

public FixedStringUserType()
default constructor

Method Detail

sqlTypes

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

returnedClass

public Class returnedClass()
Specified by:
returnedClass in interface org.hibernate.usertype.UserType
See Also:
UserType.returnedClass()

equals

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

nullSafeGet

public Object nullSafeGet(ResultSet inResultSet,
                          String[] names,
                          Object o)
                   throws SQLException
Specified by:
nullSafeGet in interface org.hibernate.usertype.UserType
Throws:
SQLException
See Also:
UserType.nullSafeGet(java.sql.ResultSet, java.lang.String[], java.lang.Object)

nullSafeSet

public void nullSafeSet(PreparedStatement inPreparedStatement,
                        Object o,
                        int i)
                 throws SQLException
Specified by:
nullSafeSet in interface org.hibernate.usertype.UserType
Throws:
SQLException
See Also:
UserType.nullSafeSet(java.sql.PreparedStatement, java.lang.Object, int)

deepCopy

public Object deepCopy(Object o)
Specified by:
deepCopy in interface org.hibernate.usertype.UserType
See Also:
UserType.deepCopy(java.lang.Object)

isMutable

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

assemble

public Object assemble(Serializable cached,
                       Object owner)
Specified by:
assemble in interface org.hibernate.usertype.UserType
See Also:
UserType.assemble(java.io.Serializable, java.lang.Object)

disassemble

public Serializable disassemble(Object value)
Specified by:
disassemble in interface org.hibernate.usertype.UserType
See Also:
UserType.disassemble(java.lang.Object)

replace

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

hashCode

public int hashCode(Object x)
Specified by:
hashCode in interface org.hibernate.usertype.UserType
See Also:
UserType.hashCode(java.lang.Object)


Copyright © 2011. All Rights Reserved.