|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cayenne.PersistenceState
public class PersistenceState
Defines a set of object states from the point of view of persistence. I.e. PersistenceState is the state of data stored in an object relative to the external persistence store. If an object's state matches the state of the persistence store, the object is COMMITTED. If object is not intended to be persistent or is not explicitly made persistent, the state is TRANSIENT, and so on.
Object persistence states should not be modified directly. Rather it is a responsibility of a ObjectContext/DataContext to maintain correct state of the managed objects.
Field Summary | |
---|---|
static int |
COMMITTED
Describes a state of an object registered with DataContext/ObjectContext, whose fields exactly match the state of a corresponding database row. |
static int |
DELETED
Describes a state of an object registered with DataContext/ObjectContext, that will be deleted from the database on the next commit. |
static int |
HOLLOW
Describes a state of an object registered with DataContext/ObjectContext, and having a corresponding database row. |
static int |
MODIFIED
Describes a state of an object registered with DataContext/ObjectContext, and having a corresponding database row. |
static int |
NEW
Describes a state of an object freshly registered with DataContext/ObjectContext, but not committed to the database yet. |
static int |
TRANSIENT
Describes a state of an object not registered with DataContext/ObjectContext, and therefore having no persistence features. |
Constructor Summary | |
---|---|
PersistenceState()
|
Method Summary | |
---|---|
static java.lang.String |
persistenceStateName(int persistenceState)
Returns String label for persistence state. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int TRANSIENT
public static final int NEW
public static final int COMMITTED
public static final int MODIFIED
public static final int HOLLOW
public static final int DELETED
Constructor Detail |
---|
public PersistenceState()
Method Detail |
---|
public static java.lang.String persistenceStateName(int persistenceState)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |