Top Description Fields Constructors Methods
org.hibernate

public sealed Enum ReplicationMode

extends Enum<ReplicationMode>
Class Inheritance
Annotations
@Deprecated
since:6.2
Imports
org.hibernate.type.BasicType

Deprecated

since 6.2.

since Session#replicate(Object, ReplicationMode) is deprecated

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

Field Summary

Modifier and TypeField and Description
public static final ReplicationMode
EXCEPTION

Throw an exception when a row already exists.

public static final ReplicationMode
IGNORE

Ignore replicated entities when a row already exists.

public static final ReplicationMode
LATEST_VERSION

When a row already exists, choose the latest version.

public static final ReplicationMode
OVERWRITE

Overwrite existing rows when a row already exists.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public abstract boolean

Returns:

true indicates the data should be overwritten; false indicates it should not.
shouldOverwriteCurrentVersion
(Object
The entity being replicated
entity
,
Object
The version currently on the target database table.
currentVersion
,
Object
The replicating version
newVersion
,
BasicType<Object>
The version type
versionType
)

Determine whether the mode dictates that the data being replicated should overwrite the data found.

public static ReplicationMode
valueOf(String name)

Deprecated as a consequence of ReplicationMode being deprecated.
public static ReplicationMode[]
values()

Deprecated as a consequence of ReplicationMode being deprecated.
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

EXCEPTIONback to summary
public static final ReplicationMode EXCEPTION

Deprecated

as a consequence of ReplicationMode being deprecated. See corresponding docs for further information.

Throw an exception when a row already exists.

IGNOREback to summary
public static final ReplicationMode IGNORE

Deprecated

as a consequence of ReplicationMode being deprecated. See corresponding docs for further information.

Ignore replicated entities when a row already exists.

LATEST_VERSIONback to summary
public static final ReplicationMode LATEST_VERSION

Deprecated

as a consequence of ReplicationMode being deprecated. See corresponding docs for further information.

When a row already exists, choose the latest version.

OVERWRITEback to summary
public static final ReplicationMode OVERWRITE

Deprecated

as a consequence of ReplicationMode being deprecated. See corresponding docs for further information.

Overwrite existing rows when a row already exists.

Constructor Detail

ReplicationModeback to summary
private ReplicationMode()

Method Detail

shouldOverwriteCurrentVersionback to summary
public abstract boolean shouldOverwriteCurrentVersion(Object entity, Object currentVersion, Object newVersion, BasicType<Object> versionType)

Determine whether the mode dictates that the data being replicated should overwrite the data found.

Parameters
entity:Object

The entity being replicated

currentVersion:Object

The version currently on the target database table.

newVersion:Object

The replicating version

versionType:BasicType<Object>

The version type

Returns:boolean

true indicates the data should be overwritten; false indicates it should not.

valueOfback to summary
public static ReplicationMode valueOf(String name)

Deprecated

as a consequence of ReplicationMode being deprecated. See corresponding docs for further information.

valuesback to summary
public static ReplicationMode[] values()

Deprecated

as a consequence of ReplicationMode being deprecated. See corresponding docs for further information.