org.hibernate.type

Class DbTimestampType

Implemented Interfaces:
Serializable, LiteralType, Type, VersionType

public class DbTimestampType
extends TimestampType
implements VersionType

dbtimestamp: An extension of TimestampType which maps to the database's current timestamp, rather than the jvm's current timestamp.

Note: May/may-not cause issues on dialects which do not properly support a true notion of timestamp (Oracle <328, for example, where only its DATE datatype is supported). Depends on the frequency of DML operations...

Author:
Steve Ebersole

Method Summary

String
getName()
Object
seed(SessionImplementor session)
Generate an initial version.

Methods inherited from class org.hibernate.type.TimestampType

deepCopyNotNull, fromStringValue, get, getComparator, getHashCode, getName, getReturnedClass, isEqual, next, objectToSQLString, seed, set, sqlType, toString

Methods inherited from class org.hibernate.type.MutableType

deepCopy, deepCopyNotNull, isMutable, replace

Methods inherited from class org.hibernate.type.NullableType

fromStringValue, fromXMLNode, fromXMLString, get, getColumnSpan, isDirty, isEqual, isEqual, nullSafeGet, nullSafeGet, nullSafeGet, nullSafeGet, nullSafeSet, nullSafeSet, nullSafeSet, nullSafeToString, set, setToXMLNode, sqlType, sqlTypes, toColumnNullness, toLoggableString, toString, toXMLString

Methods inherited from class org.hibernate.type.AbstractType

assemble, beforeAssemble, compare, disassemble, getHashCode, getHashCode, getSemiResolvedType, hydrate, isAnyType, isAssociationType, isCollectionType, isComponentType, isDirty, isEntityType, isEqual, isEqual, isModified, isSame, isXMLElement, replace, replaceNode, resolve, semiResolve

Method Details

getName

public String getName()
Specified by:
getName in interface Type
Overrides:
getName in interface TimestampType

seed

public Object seed(SessionImplementor session)
Generate an initial version.
Specified by:
seed in interface VersionType
Overrides:
seed in interface TimestampType
Parameters:
session - The session from which this request originates.
Returns:
an instance of the type