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 | COMMITTEDDescribes a state of an object registered with DataContext/ObjectContext, whose
 fields exactly match the state of a corresponding database row. | 
| static int | DELETEDDescribes a state of an object registered with DataContext/ObjectContext, that will
 be deleted from the database on the next commit. | 
| static int | HOLLOWDescribes a state of an object registered with DataContext/ObjectContext, and
 having a corresponding database row. | 
| static int | MODIFIEDDescribes a state of an object registered with DataContext/ObjectContext, and
 having a corresponding database row. | 
| static int | NEWDescribes a state of an object freshly registered with DataContext/ObjectContext,
 but not committed to the database yet. | 
| static int | TRANSIENTDescribes 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–2023 Apache Cayenne. All rights reserved.