org.hibernate.annotations.SourceType Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hibernate-core Show documentation
Show all versions of hibernate-core Show documentation
The core O/RM functionality as provided by Hibernate
The newest version!
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or .
*/
package org.hibernate.annotations;
/**
* Where should Hibernate retrieve the value from? From the database, or from the current JVM?
*
* @author Hardy Ferentschik
*/
public enum SourceType {
/**
* Get the timestamp from the current VM.
*/
VM( "timestamp" ),
/**
* Get the timestamp from the database.
*/
DB( "dbtimestamp" );
private final String typeName;
private SourceType(String typeName ) {
this.typeName = typeName;
}
/**
* Get the corresponding Hibernate {@link org.hibernate.type.VersionType} name.
*
* @return The corresponding type name.
*/
public String typeName() {
return typeName;
}
}