com.is.jrf
Class PersistentObject
java.lang.Object
|
+--com.is.jrf.PersistentObject
- All Implemented Interfaces:
- java.io.Serializable
- public abstract class PersistentObject
- extends java.lang.Object
- implements java.io.Serializable
This is an abstract superclass for those objects wishing to participate
in the domain-object SQL framework. When naming a variable for this, the
shortcut of aPO is often used.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PersistentObject
public PersistentObject()
getPersistentState
public PersistentState getPersistentState()
setPersistentState
public void setPersistentState(PersistentState state)
hasNewPersistentState
public boolean hasNewPersistentState()
- When true, this object is not in the database yet. This method name is
somewhat cumbersome, however it is consistent, makes sense when you
think about it, and it won't conflict with business methods like
'isNew()' or something similar would.
- Returns:
- a value of type 'boolean'
hasModifiedPersistentState
public boolean hasModifiedPersistentState()
- When true, this objects attributes do not match the database values.
This method name is somewhat cumbersome, however it is consistent,
makes sense when you think about it, and it won't conflict with
business methods like 'isModified()' or something similar would.
- Returns:
- a value of type 'boolean'
hasCurrentPersistentState
public boolean hasCurrentPersistentState()
- When true, this object's attributes match the database values. This
method name is somewhat cumbersome, however it is consistent, makes
sense when you think about it, and it won't conflict with business
methods like 'isCurrent()' or something similar would.
- Returns:
- a value of type 'boolean'
hasDeadPersistentState
public boolean hasDeadPersistentState()
- When true, this object has already been saved to the database once while
ReturnSavedObject on the domain was set to true. In this case, the
returned instance should replace the instance that was an argument to
save() to avoid saving old information to the database (columns can
change during the insert or update via triggers, optimistic locks,
timestamps, etc...).
- Returns:
- a value of type 'boolean'
markNewPersistentState
public void markNewPersistentState()
markModifiedPersistentState
public void markModifiedPersistentState()
- State change will only occur if state is "Current"
markCurrentPersistentState
public void markCurrentPersistentState()
markDeadPersistentState
public void markDeadPersistentState()
forceNewPersistentState
public void forceNewPersistentState()
forceModifiedPersistentState
public void forceModifiedPersistentState()
forceCurrentPersistentState
public void forceCurrentPersistentState()
forceDeadPersistentState
public void forceDeadPersistentState()