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

ReplicationMode (Hibernate API Documentation) - Hibernate 3.2.3 正式版 API 英文文档


org.hibernate
Class ReplicationMode

java.lang.Object
  extended byorg.hibernate.ReplicationMode
All Implemented Interfaces:
Serializable

public abstract class ReplicationMode
extends Object
implements Serializable

Represents a replication strategy.

Author:
Gavin King
See Also:
Session.replicate(Object, ReplicationMode), Serialized Form

Field Summary
static ReplicationMode EXCEPTION
          Throw an exception when a row already exists.
static ReplicationMode IGNORE
          Ignore replicated entities when a row already exists.
static ReplicationMode LATEST_VERSION
          When a row already exists, choose the latest version.
static ReplicationMode OVERWRITE
          Overwrite existing rows when a row already exists.
 
Constructor Summary
ReplicationMode(String name)
           
 
Method Summary
abstract  boolean shouldOverwriteCurrentVersion(Object entity, Object currentVersion, Object newVersion, VersionType versionType)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EXCEPTION

public static final ReplicationMode EXCEPTION
Throw an exception when a row already exists.


IGNORE

public static final ReplicationMode IGNORE
Ignore replicated entities when a row already exists.


OVERWRITE

public static final ReplicationMode OVERWRITE
Overwrite existing rows when a row already exists.


LATEST_VERSION

public static final ReplicationMode LATEST_VERSION
When a row already exists, choose the latest version.

Constructor Detail

ReplicationMode

public ReplicationMode(String name)
Method Detail

toString

public String toString()

shouldOverwriteCurrentVersion

public abstract boolean shouldOverwriteCurrentVersion(Object entity,
                                                      Object currentVersion,
                                                      Object newVersion,
                                                      VersionType versionType)