org.camunda.bpm.engine.impl.db.entitymanager.cache
Enum DbEntityState

java.lang.Object
  extended by java.lang.Enum<DbEntityState>
      extended by org.camunda.bpm.engine.impl.db.entitymanager.cache.DbEntityState
All Implemented Interfaces:
Serializable, Comparable<DbEntityState>

public enum DbEntityState
extends Enum<DbEntityState>

Author:
Daniel Meyer

Enum Constant Summary
DELETED_MERGED
          A MERGED object which may exists in the database and is set to be deleted by the current session.
DELETED_PERSISTENT
          A persistent object which has been loaded into this session and will be deleted with the next flush.
DELETED_TRANSIENT
          A transient object which does not exist in the database but has been created and deleted in the current session.
MERGED
          A persistent object which may exist in the database but which has not been loaded into the current session form the database.
PERSISTENT
          A persistent object has been loaded from the database by the current session.
TRANSIENT
          A transient object does not exist in the database and has been created by the current session.
 
Method Summary
static DbEntityState valueOf(String name)
          Returns the enum constant of this type with the specified name.
static DbEntityState[] 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

TRANSIENT

public static final DbEntityState TRANSIENT
A transient object does not exist in the database and has been created by the current session. It will be INSERTed to the database and marked PERSISTENT with the next flush.


PERSISTENT

public static final DbEntityState PERSISTENT
A persistent object has been loaded from the database by the current session. At the next flush, the session will perform dirty checking and flush an update if the object's persistent state changed. It will remain persistent after the next flush.


MERGED

public static final DbEntityState MERGED
A persistent object which may exist in the database but which has not been loaded into the current session form the database. A detached copy of the object has been modified offline and merged back into the session. At the next flush an update with optimistic locking check will be performed and after that, the object will be marked PERSISTENT.


DELETED_TRANSIENT

public static final DbEntityState DELETED_TRANSIENT
A transient object which does not exist in the database but has been created and deleted in the current session. It will not be flushed to the database and will be removed from the cache at the next flush.


DELETED_PERSISTENT

public static final DbEntityState DELETED_PERSISTENT
A persistent object which has been loaded into this session and will be deleted with the next flush. After the flush it will be removed from the cache.


DELETED_MERGED

public static final DbEntityState DELETED_MERGED
A MERGED object which may exists in the database and is set to be deleted by the current session. It will be removed from the cache at the next flush.

Method Detail

values

public static DbEntityState[] 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 (DbEntityState c : DbEntityState.values())
    System.out.println(c);

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

valueOf

public static DbEntityState 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 © 2015 camunda services GmbH. All rights reserved.