org.nakedobjects.plugins.hibernate.objectstore.persistence.hibspi.usertype
Class MoneyType

java.lang.Object
  extended by org.nakedobjects.plugins.hibernate.objectstore.persistence.hibspi.usertype.ImmutableType
      extended by org.nakedobjects.plugins.hibernate.objectstore.persistence.hibspi.usertype.ImmutableCompositeType
          extended by org.nakedobjects.plugins.hibernate.objectstore.persistence.hibspi.usertype.MoneyType
All Implemented Interfaces:
org.hibernate.usertype.CompositeUserType

public class MoneyType
extends ImmutableCompositeType

A user type that maps an SQL BIG_DECIMAL and String to a NOF Money value.


Constructor Summary
MoneyType()
           
 
Method Summary
 java.lang.String[] getPropertyNames()
           
 org.hibernate.type.Type[] getPropertyTypes()
           
 java.lang.Object getPropertyValue(java.lang.Object component, int property)
           
 java.lang.Object nullSafeGet(java.sql.ResultSet resultSet, java.lang.String[] names, org.hibernate.engine.SessionImplementor session, java.lang.Object owner)
           
 void nullSafeSet(java.sql.PreparedStatement statement, java.lang.Object value, int index, org.hibernate.engine.SessionImplementor session)
           
 java.lang.Class<Money> returnedClass()
           
 void setPropertyValue(java.lang.Object component, int property, java.lang.Object value)
           
 
Methods inherited from class org.nakedobjects.plugins.hibernate.objectstore.persistence.hibspi.usertype.ImmutableCompositeType
assemble, disassemble, replace
 
Methods inherited from class org.nakedobjects.plugins.hibernate.objectstore.persistence.hibspi.usertype.ImmutableType
deepCopy, equals, hashCode, isMutable
 
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.CompositeUserType
deepCopy, equals, hashCode, isMutable
 

Constructor Detail

MoneyType

public MoneyType()
Method Detail

returnedClass

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

nullSafeGet

public java.lang.Object nullSafeGet(java.sql.ResultSet resultSet,
                                    java.lang.String[] names,
                                    org.hibernate.engine.SessionImplementor session,
                                    java.lang.Object owner)
                             throws java.sql.SQLException
Throws:
java.sql.SQLException

nullSafeSet

public void nullSafeSet(java.sql.PreparedStatement statement,
                        java.lang.Object value,
                        int index,
                        org.hibernate.engine.SessionImplementor session)
                 throws java.sql.SQLException
Throws:
java.sql.SQLException

getPropertyNames

public java.lang.String[] getPropertyNames()

getPropertyTypes

public org.hibernate.type.Type[] getPropertyTypes()

getPropertyValue

public java.lang.Object getPropertyValue(java.lang.Object component,
                                         int property)

setPropertyValue

public void setPropertyValue(java.lang.Object component,
                             int property,
                             java.lang.Object value)


Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.