org.jspresso.framework.application.backend.session
Enum EMergeMode

java.lang.Object
  extended by java.lang.Enum<EMergeMode>
      extended by org.jspresso.framework.application.backend.session.EMergeMode
All Implemented Interfaces:
Serializable, Comparable<EMergeMode>

public enum EMergeMode
extends Enum<EMergeMode>

This enumeration defines all the supported merge modes of a session.

Version:
$LastChangedRevision: 5621 $
Author:
Vincent Vandenschrick

Enum Constant Summary
MERGE_CLEAN_EAGER
          MERGE_CLEAN_EAGER merge mode should be used to override the state of the target object graph whatever its current in-memory state is.
MERGE_CLEAN_LAZY
          MERGE_CLEAN_LAZY merge mode should be used to override the state of the target object graph for nodes whose version is either obsolete or whose in-memory state is dirty.
MERGE_EAGER
          MERGE_EAGER should be used to update the target object graph state eagerly while keeping its dirty state.
MERGE_KEEP
          MERGE_KEEP merge mode is used to only register non-existing graph object nodes.
MERGE_LAZY
          MERGE_LAZY merge mode should be used to override the state of the target object graph for nodes whose version is obsolete.
 
Method Summary
static EMergeMode valueOf(String name)
          Returns the enum constant of this type with the specified name.
static EMergeMode[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

MERGE_CLEAN_EAGER

public static final EMergeMode MERGE_CLEAN_EAGER
MERGE_CLEAN_EAGER merge mode should be used to override the state of the target object graph whatever its current in-memory state is. The target object graph is completely traversed, and each graph object dirty state is cleaned. This merge mode implements a "deep reload" semantics.


MERGE_CLEAN_LAZY

public static final EMergeMode MERGE_CLEAN_LAZY
MERGE_CLEAN_LAZY merge mode should be used to override the state of the target object graph for nodes whose version is either obsolete or whose in-memory state is dirty. The graph traversal is stopped whenever a clean node in same version is met. Each traversed graph node dirty state is cleaned. This merge mode is typically used when committing an save or update transaction.


MERGE_EAGER

public static final EMergeMode MERGE_EAGER
MERGE_EAGER should be used to update the target object graph state eagerly while keeping its dirty state. It merge mode is typically used when implementing an in-memory transaction, like editting an object grph in a unit of work thus allowing the user to commit ar cancel the edition.


MERGE_LAZY

public static final EMergeMode MERGE_LAZY
MERGE_LAZY merge mode should be used to override the state of the target object graph for nodes whose version is obsolete. The graph traversal is stopped whenever a clean node in same version is met. Each traversed graph node dirty state is cleaned if and only if its version is newer. This merge mode is typically used when reading from database in a QBE query.


MERGE_KEEP

public static final EMergeMode MERGE_KEEP
MERGE_KEEP merge mode is used to only register non-existing graph object nodes. Existing nodes will simply be returned independently of their state (even if they are obsolete).

Method Detail

values

public static EMergeMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (EMergeMode c : EMergeMode.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static EMergeMode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null


Copyright © 2005-2012 Jspresso. All Rights Reserved.