站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Hibernate 2.1.8 正式版 API 英文文档

Versioning (Hibernate API Documentation) - Hibernate 2.1.8 正式版 API 英文文档


net.sf.hibernate.engine
Class Versioning

java.lang.Object
  extended bynet.sf.hibernate.engine.Versioning

public final class Versioning
extends Object

Utility methods for managing versions and timestamps

Author:
Gavin King

Field Summary
static int OPTIMISTIC_LOCK_ALL
           
static int OPTIMISTIC_LOCK_DIRTY
           
static int OPTIMISTIC_LOCK_NONE
           
static int OPTIMISTIC_LOCK_VERSION
           
 
Method Summary
static Object getVersion(Object[] fields, ClassPersister persister)
          Get the version number of the given instance state snapshot
static Object increment(Object version, VersionType versionType)
          Increment the given version number
static boolean seedVersion(Object[] fields, int versionProperty, VersionType versionType)
          Seed the given instance state snapshot with an initial version number
static void setVersion(Object[] fields, Object version, ClassPersister persister)
          Set the version number of the given instance state snapshot
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OPTIMISTIC_LOCK_NONE

public static final int OPTIMISTIC_LOCK_NONE
See Also:
Constant Field Values

OPTIMISTIC_LOCK_ALL

public static final int OPTIMISTIC_LOCK_ALL
See Also:
Constant Field Values

OPTIMISTIC_LOCK_DIRTY

public static final int OPTIMISTIC_LOCK_DIRTY
See Also:
Constant Field Values

OPTIMISTIC_LOCK_VERSION

public static final int OPTIMISTIC_LOCK_VERSION
See Also:
Constant Field Values
Method Detail

increment

public static Object increment(Object version,
                               VersionType versionType)
Increment the given version number


seedVersion

public static boolean seedVersion(Object[] fields,
                                  int versionProperty,
                                  VersionType versionType)
Seed the given instance state snapshot with an initial version number


setVersion

public static void setVersion(Object[] fields,
                              Object version,
                              ClassPersister persister)
Set the version number of the given instance state snapshot


getVersion

public static Object getVersion(Object[] fields,
                                ClassPersister persister)
                         throws HibernateException
Get the version number of the given instance state snapshot

Throws:
HibernateException