org.hibernate

Class ReplicationMode

Implemented Interfaces:
Serializable

public abstract class ReplicationMode
extends java.lang.Object
implements Serializable

Represents a replication strategy.
Author:
Gavin King
See Also:
Session.replicate(Object,ReplicationMode)

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()

Field Details

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.

LATEST_VERSION

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

OVERWRITE

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

Constructor Details

ReplicationMode

public ReplicationMode(String name)

Method Details

shouldOverwriteCurrentVersion

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

toString

public String toString()