public class PersistenceState extends Object
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.
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
PersistenceState() |
Modifier and Type | Method and Description |
---|---|
static String |
persistenceStateName(int persistenceState)
Returns String label for persistence state.
|
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
public static String persistenceStateName(int persistenceState)
Copyright © 2001–2019 Apache Cayenne. All rights reserved.