org.jcoderz.commons.util
Class DateUserType
java.lang.Object
org.jcoderz.commons.util.UserTypeBase
org.jcoderz.commons.util.DateUserType
- All Implemented Interfaces:
- Serializable, org.hibernate.usertype.UserType
public class DateUserType
- extends UserTypeBase
This is the Hibernate user type that maps a Date to a
timestamp in the Database.
- Author:
- Andreas Mandel
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DateUserType
public DateUserType()
getType
public static org.hibernate.type.Type getType()
- Hibernate org.jcoderz.commons.types.Date type as mapped
from this UserType.
- Returns:
- this UserType as org.hibernate.type.Type.
nullSafeGet
public Object nullSafeGet(ResultSet resultSet,
String[] types,
Object owner)
throws org.hibernate.HibernateException,
SQLException
-
- Specified by:
nullSafeGet in interface org.hibernate.usertype.UserType- Specified by:
nullSafeGet in class UserTypeBase
- Throws:
org.hibernate.HibernateException
SQLException
nullSafeSet
public void nullSafeSet(PreparedStatement statement,
Object value,
int index)
throws org.hibernate.HibernateException,
SQLException
-
- Specified by:
nullSafeSet in interface org.hibernate.usertype.UserType- Specified by:
nullSafeSet in class UserTypeBase
- Throws:
org.hibernate.HibernateException
SQLException
returnedClass
public Class returnedClass()
-
- Specified by:
returnedClass in interface org.hibernate.usertype.UserType- Specified by:
returnedClass in class UserTypeBase
sqlTypes
public int[] sqlTypes()
-
- Specified by:
sqlTypes in interface org.hibernate.usertype.UserType- Specified by:
sqlTypes in class UserTypeBase
Copyright 2007 The jCoderZ Project.