org.kuali.rice.core.framework.persistence.jpa.type
Class HibernateKualiDecimalPercentageFieldType

java.lang.Object
  extended by org.kuali.rice.core.framework.persistence.jpa.type.HibernateImmutableValueUserType
      extended by org.kuali.rice.core.framework.persistence.jpa.type.HibernateKualiDecimalFieldType
          extended by org.kuali.rice.core.framework.persistence.jpa.type.HibernateKualiDecimalPercentageFieldType
All Implemented Interfaces:
org.hibernate.usertype.UserType
Direct Known Subclasses:
HibernateKualiIntegerPercentageFieldType

public class HibernateKualiDecimalPercentageFieldType
extends HibernateKualiDecimalFieldType
implements org.hibernate.usertype.UserType

map between kualidecimal percentage format and numeric field from db

Author:
Kuali Rice Team (rice.collab@kuali.org)

Constructor Summary
HibernateKualiDecimalPercentageFieldType()
           
 
Method Summary
 Object getConvertedPercentage(Object source)
           
 Object nullSafeGet(ResultSet rs, String[] names, Object owner)
          This overridden method ...
 void nullSafeSet(PreparedStatement st, Object value, int index)
          sets the hash value on the PreparedStatement
 Class returnedClass()
          Returns String.class
 int[] sqlTypes()
          Returns an array with the SQL VARCHAR type as the single member
 
Methods inherited from class org.kuali.rice.core.framework.persistence.jpa.type.HibernateKualiDecimalFieldType
getConverted, getConvertedToBigDecimal, getConvertedToKualiDecimal
 
Methods inherited from class org.kuali.rice.core.framework.persistence.jpa.type.HibernateImmutableValueUserType
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
 
Methods inherited from interface org.hibernate.usertype.UserType
assemble, deepCopy, disassemble, equals, hashCode, isMutable, replace
 

Constructor Detail

HibernateKualiDecimalPercentageFieldType

public HibernateKualiDecimalPercentageFieldType()
Method Detail

nullSafeGet

public Object nullSafeGet(ResultSet rs,
                          String[] names,
                          Object owner)
                   throws org.hibernate.HibernateException,
                          SQLException
Description copied from class: HibernateKualiDecimalFieldType
This overridden method ...

Specified by:
nullSafeGet in interface org.hibernate.usertype.UserType
Overrides:
nullSafeGet in class HibernateKualiDecimalFieldType
Throws:
org.hibernate.HibernateException
SQLException
See Also:
HibernateImmutableValueUserType.nullSafeGet(java.sql.ResultSet, java.lang.String[], java.lang.Object)

nullSafeSet

public void nullSafeSet(PreparedStatement st,
                        Object value,
                        int index)
                 throws org.hibernate.HibernateException,
                        SQLException
sets the hash value on the PreparedStatement

Specified by:
nullSafeSet in interface org.hibernate.usertype.UserType
Overrides:
nullSafeSet in class HibernateKualiDecimalFieldType
Throws:
org.hibernate.HibernateException
SQLException
See Also:
UserType.nullSafeSet(java.sql.PreparedStatement, java.lang.Object, int)

getConvertedPercentage

public Object getConvertedPercentage(Object source)

returnedClass

public Class returnedClass()
Returns String.class

Specified by:
returnedClass in interface org.hibernate.usertype.UserType
Overrides:
returnedClass in class HibernateKualiDecimalFieldType
See Also:
UserType.returnedClass()

sqlTypes

public int[] sqlTypes()
Returns an array with the SQL VARCHAR type as the single member

Specified by:
sqlTypes in interface org.hibernate.usertype.UserType
Overrides:
sqlTypes in class HibernateKualiDecimalFieldType
See Also:
UserType.sqlTypes()


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.