com.opnworks.timesheet.domain
Class HoursPerDayType

java.lang.Object
  extended bycom.opnworks.timesheet.domain.HoursPerDayType
All Implemented Interfaces:
net.sf.hibernate.CompositeUserType

public class HoursPerDayType
extends java.lang.Object
implements net.sf.hibernate.CompositeUserType

This class is used to map an array of type float[7] holding hours per day for one week to columns in a a relational table

Author:
Laurent

Constructor Summary
HoursPerDayType()
           
 
Method Summary
 java.lang.Object assemble(java.io.Serializable cached, net.sf.hibernate.engine.SessionImplementor session, java.lang.Object owner)
          Description of the Method
 java.lang.Object deepCopy(java.lang.Object x)
          Description of the Method
 java.io.Serializable disassemble(java.lang.Object value, net.sf.hibernate.engine.SessionImplementor session)
          Description of the Method
 boolean equals(java.lang.Object x, java.lang.Object y)
          Description of the Method
 java.lang.String[] getPropertyNames()
          Gets the PropertyNames attribute of the HoursPerDayType object
 net.sf.hibernate.type.Type[] getPropertyTypes()
          Gets the PropertyTypes attribute of the HoursPerDayType object
 java.lang.Object getPropertyValue(java.lang.Object component, int property)
          Gets the PropertyValue attribute of the HoursPerDayType object
 boolean isMutable()
          Gets the Mutable attribute of the HoursPerDayType object
 java.lang.Object nullSafeGet(java.sql.ResultSet rs, java.lang.String[] names, net.sf.hibernate.engine.SessionImplementor session, java.lang.Object owner)
          Description of the Method
 void nullSafeSet(java.sql.PreparedStatement st, java.lang.Object value, int index, net.sf.hibernate.engine.SessionImplementor session)
          Description of the Method
 java.lang.Class returnedClass()
          Description of the Method
 void setPropertyValue(java.lang.Object component, int property, java.lang.Object value)
          Sets the PropertyValue attribute of the HoursPerDayType object
 int[] sqlTypes()
          Description of the Method
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HoursPerDayType

public HoursPerDayType()
Method Detail

setPropertyValue

public void setPropertyValue(java.lang.Object component,
                             int property,
                             java.lang.Object value)
                      throws net.sf.hibernate.HibernateException
Sets the PropertyValue attribute of the HoursPerDayType object

Specified by:
setPropertyValue in interface net.sf.hibernate.CompositeUserType
Parameters:
component - The new PropertyValue value
property - The new PropertyValue value
value - The new PropertyValue value
Throws:
net.sf.hibernate.HibernateException - Description of Exception

isMutable

public boolean isMutable()
Gets the Mutable attribute of the HoursPerDayType object

Specified by:
isMutable in interface net.sf.hibernate.CompositeUserType
Returns:
The Mutable value

getPropertyNames

public java.lang.String[] getPropertyNames()
Gets the PropertyNames attribute of the HoursPerDayType object

Specified by:
getPropertyNames in interface net.sf.hibernate.CompositeUserType
Returns:
The PropertyNames value

getPropertyTypes

public net.sf.hibernate.type.Type[] getPropertyTypes()
Gets the PropertyTypes attribute of the HoursPerDayType object

Specified by:
getPropertyTypes in interface net.sf.hibernate.CompositeUserType
Returns:
The PropertyTypes value

getPropertyValue

public java.lang.Object getPropertyValue(java.lang.Object component,
                                         int property)
                                  throws net.sf.hibernate.HibernateException
Gets the PropertyValue attribute of the HoursPerDayType object

Specified by:
getPropertyValue in interface net.sf.hibernate.CompositeUserType
Parameters:
component - Description of Parameter
property - Description of Parameter
Returns:
The PropertyValue value
Throws:
net.sf.hibernate.HibernateException - Description of Exception

sqlTypes

public int[] sqlTypes()
Description of the Method

Returns:
Description of the Returned Value

returnedClass

public java.lang.Class returnedClass()
Description of the Method

Specified by:
returnedClass in interface net.sf.hibernate.CompositeUserType
Returns:
Description of the Returned Value

equals

public boolean equals(java.lang.Object x,
                      java.lang.Object y)
               throws net.sf.hibernate.HibernateException
Description of the Method

Specified by:
equals in interface net.sf.hibernate.CompositeUserType
Parameters:
x - Description of Parameter
y - Description of Parameter
Returns:
Description of the Returned Value
Throws:
net.sf.hibernate.HibernateException - Description of Exception

deepCopy

public java.lang.Object deepCopy(java.lang.Object x)
                          throws net.sf.hibernate.HibernateException
Description of the Method

Specified by:
deepCopy in interface net.sf.hibernate.CompositeUserType
Parameters:
x - Description of Parameter
Returns:
Description of the Returned Value
Throws:
net.sf.hibernate.HibernateException - Description of Exception

nullSafeGet

public java.lang.Object nullSafeGet(java.sql.ResultSet rs,
                                    java.lang.String[] names,
                                    net.sf.hibernate.engine.SessionImplementor session,
                                    java.lang.Object owner)
                             throws net.sf.hibernate.HibernateException,
                                    java.sql.SQLException
Description of the Method

Specified by:
nullSafeGet in interface net.sf.hibernate.CompositeUserType
Parameters:
rs - Description of Parameter
names - Description of Parameter
session - Description of Parameter
owner - Description of Parameter
Returns:
Description of the Returned Value
Throws:
net.sf.hibernate.HibernateException - Description of Exception
java.sql.SQLException - Description of Exception

nullSafeSet

public void nullSafeSet(java.sql.PreparedStatement st,
                        java.lang.Object value,
                        int index,
                        net.sf.hibernate.engine.SessionImplementor session)
                 throws net.sf.hibernate.HibernateException,
                        java.sql.SQLException
Description of the Method

Specified by:
nullSafeSet in interface net.sf.hibernate.CompositeUserType
Parameters:
st - Description of Parameter
value - Description of Parameter
index - Description of Parameter
session - Description of Parameter
Throws:
net.sf.hibernate.HibernateException - Description of Exception
java.sql.SQLException - Description of Exception

disassemble

public java.io.Serializable disassemble(java.lang.Object value,
                                        net.sf.hibernate.engine.SessionImplementor session)
                                 throws net.sf.hibernate.HibernateException
Description of the Method

Specified by:
disassemble in interface net.sf.hibernate.CompositeUserType
Parameters:
value - Description of Parameter
session - Description of Parameter
Returns:
Description of the Returned Value
Throws:
net.sf.hibernate.HibernateException - Description of Exception

assemble

public java.lang.Object assemble(java.io.Serializable cached,
                                 net.sf.hibernate.engine.SessionImplementor session,
                                 java.lang.Object owner)
                          throws net.sf.hibernate.HibernateException
Description of the Method

Specified by:
assemble in interface net.sf.hibernate.CompositeUserType
Parameters:
cached - Description of Parameter
session - Description of Parameter
owner - Description of Parameter
Returns:
Description of the Returned Value
Throws:
net.sf.hibernate.HibernateException - Description of Exception