org.hibernate.type
public class: DbTimestampType [javadoc |
source]
java.lang.Object
org.hibernate.type.AbstractType
org.hibernate.type.NullableType
org.hibernate.type.MutableType
org.hibernate.type.TimestampType
org.hibernate.type.DbTimestampType
All Implemented Interfaces:
VersionType, LiteralType, Type
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 < 8, for example, where only its DATE
datatype is supported). Depends on the frequency of DML operations...
| Method from org.hibernate.type.DbTimestampType Summary: |
|---|
|
getName, seed |
| Methods from org.hibernate.type.TimestampType: |
|---|
|
deepCopyNotNull, fromStringValue, get, getComparator, getHashCode, getName, getReturnedClass, isEqual, next, objectToSQLString, seed, set, sqlType, toString |
| Methods from 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 from 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 |
| Methods from java.lang.Object: |
|---|
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method from org.hibernate.type.DbTimestampType Detail: |
public String getName() {
return "dbtimestamp";
}
|
public Object seed(SessionImplementor session) {
if ( session == null ) {
log.trace( "incoming session was null; using current jvm time" );
return super.seed( session );
}
else if ( !session.getFactory().getDialect().supportsCurrentTimestampSelection() ) {
log.debug( "falling back to vm-based timestamp, as dialect does not support current timestamp selection" );
return super.seed( session );
}
else {
return getCurrentTimestamp( session );
}
}
|