- All Implemented Interfaces:
- Serializable, Comparator, org.hibernate.usertype.EnhancedUserType, org.hibernate.usertype.ParameterizedType, org.hibernate.usertype.UserType, org.hibernate.usertype.UserVersionType, IntegratorConfiguredType
public class PersistentDateTime
extends AbstractVersionableUserType<org.joda.time.DateTime,Timestamp,TimestampColumnDateTimeMapper>
implements org.hibernate.usertype.ParameterizedType, IntegratorConfiguredType
Persist DateTime
via Hibernate. This type is
mostly compatible with org.joda.time.contrib.hibernate.PersistentDateTime however
you should note that JodaTime's DateTime
has only millisecond precision,
whilst JSR 310 offers nanosecond precision. When interpreting nanosecond values, Joda time will
round down to the nearest millisecond. The type is stored using UTC timezone and presented in the
JVM using the JVM's default zone.
Alternatively provide the 'databaseZone' parameter in the DateTimeZone.forID(String)
format
to indicate the zone of the database. The 'javaZone' can be used to similarly configure the zone of the
value on return from the database.
N.B. To use the zone of the JVM supply 'jvm'
- See Also:
- Serialized Form