FileDocCategorySizeDatePackage
ReplicationMode.javaAPI DocHibernate 3.2.52400Thu Dec 23 20:11:06 GMT 2004org.hibernate

ReplicationMode

public abstract class ReplicationMode extends Object implements Serializable
Represents a replication strategy.
see
Session#replicate(Object, ReplicationMode)
author
Gavin King

Fields Summary
private final String
name
private static final Map
INSTANCES
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
OVERWRITE
Overwrite existing rows when a row already exists.
public static final ReplicationMode
LATEST_VERSION
When a row already exists, choose the latest version.
Constructors Summary
public ReplicationMode(String name)


	   
		this.name=name;
	
Methods Summary
private java.lang.ObjectreadResolve()


	 
		INSTANCES.put( LATEST_VERSION.name, LATEST_VERSION );
		INSTANCES.put( IGNORE.name, IGNORE );
		INSTANCES.put( OVERWRITE.name, OVERWRITE );
		INSTANCES.put( EXCEPTION.name, EXCEPTION );
	
		return INSTANCES.get(name);
	
public abstract booleanshouldOverwriteCurrentVersion(java.lang.Object entity, java.lang.Object currentVersion, java.lang.Object newVersion, org.hibernate.type.VersionType versionType)

public java.lang.StringtoString()

		return name;