| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jaffa.persistence.Persistent
Base class for all persistent objects.
| Constructor Summary | |
| Persistent() | |
| Method Summary | |
| protected  IPersistent | actualInstance()This method simply returns the 'this' object. | 
| protected  void | addInitialValue(String fieldName,
                               Object initialValue)Adds an initial value for a field whenever it is modified. | 
|  Object | clone()Returns a clone of the object. | 
|  int | getLocking()Returns the locking strategy for this persistent object. | 
|  UOW | getUOW()Returns the UOW to which this object is associated. | 
|  boolean | isDatabaseOccurence()Returns a true value if the object was loaded from the database. | 
|  boolean | isLocked()Returns a true value if the underlying database row is locked. | 
|  boolean | isModified()Returns a true value if the object had any of its fields updated. | 
|  boolean | isModified(String fieldName)Returns a true value if the field has been updated. | 
|  boolean | isQueued()Returns a true value if this object has been added/updated/deleted and not yet been committed. | 
|  void | performForeignKeyValidations()This method ensures that the modified foreign-keys are valid. | 
|  void | performPreDeleteReferentialIntegrity()This method will perform referential integrity checks before this object is deleted. | 
|  void | postAdd()This method is triggered by the UOW, after adding this object to the Add-Store. | 
|  void | postDelete()This method is triggered by the UOW, after adding this object to the Delete-Store. | 
|  void | postLoad()This method is triggered by the UOW after a query loads this object. | 
|  void | postUpdate()This method is triggered by the UOW, after adding this object to the Update-Store. | 
|  void | preAdd()This method is triggered by the UOW, before adding this object to the Add-Store, but after a UOW has been associated to the object. | 
|  void | preDelete()This method is triggered by the UOW, before adding this object to the Delete-Store. | 
|  void | preUpdate()This method is triggered by the UOW, before adding this object to the Update-Store. | 
|  Object | returnInitialValue(String fieldName)Returns the initial value for a field; i.e. before it was modified. | 
|  void | setDatabaseOccurence(boolean databaseOccurence)Set the database status of this object. | 
|  void | setLocked(boolean locked)Set the locked status of this object. | 
|  void | setLocking(int locking)Set the locking strategy for this persistent object. | 
|  void | setModified(boolean modified)Set the modified status of this object. | 
|  void | setQueued(boolean queued)Set the queued status of this object. | 
|  void | setUOW(UOW uow)Associates this object to a UOW. | 
|  String | toString()This returns the state of the object for diagnostic purposes. | 
| protected  void | update()This method should be invoked by every updateXxx() method of the persistent class, before setting the value. | 
| Methods inherited from class java.lang.Object | 
| equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
public Persistent()
| Method Detail | 
public String toString()
public Object clone()
             throws CloneNotSupportedException
CloneNotSupportedException - if cloning is not supported. This should never happen.public UOW getUOW()
getUOW in interface IPersistentpublic void setUOW(UOW uow)
setUOW in interface IPersistentuow - The UOW.public boolean isModified()
isModified in interface IPersistentpublic void setModified(boolean modified)
setModified in interface IPersistentmodified - the modified status.public boolean isDatabaseOccurence()
isDatabaseOccurence in interface IPersistentpublic void setDatabaseOccurence(boolean databaseOccurence)
setDatabaseOccurence in interface IPersistentdatabaseOccurence - the database status.public int getLocking()
getLocking in interface IPersistentpublic void setLocking(int locking)
setLocking in interface IPersistentlocking - the locking strategy.public boolean isLocked()
isLocked in interface IPersistentpublic void setLocked(boolean locked)
setLocked in interface IPersistentlocked - the locked status.public boolean isQueued()
isQueued in interface IPersistentpublic void setQueued(boolean queued)
setQueued in interface IPersistentqueued - the queued status.public boolean isModified(String fieldName)
isModified in interface IPersistentfieldName - the field to check.
public Object returnInitialValue(String fieldName)
returnInitialValue in interface IPersistentfieldName - the field.
public void preAdd()
            throws PreAddFailedException
preAdd in interface IPersistentPreAddFailedException - if any error occurs during the process.
public void postAdd()
             throws PostAddFailedException
postAdd in interface IPersistentPostAddFailedException - if any error occurs during the process.
public void preUpdate()
               throws PreUpdateFailedException
preUpdate in interface IPersistentPreUpdateFailedException - if any error occurs during the process.
public void postUpdate()
                throws PostUpdateFailedException
postUpdate in interface IPersistentPostUpdateFailedException - if any error occurs during the process.
public void preDelete()
               throws PreDeleteFailedException
preDelete in interface IPersistentPreDeleteFailedException - if any error occurs during the process.
public void postDelete()
                throws PostDeleteFailedException
postDelete in interface IPersistentPostDeleteFailedException - if any error occurs during the process.
public void postLoad()
              throws PostLoadFailedException
postLoad in interface IPersistentPostLoadFailedException - if any error occurs during the process.
public void performForeignKeyValidations()
                                  throws ApplicationExceptions,
                                         FrameworkException
ApplicationExceptions - if an invalid foreign key is set.
FrameworkException - Indicates some system error
public void performPreDeleteReferentialIntegrity()
                                          throws PreDeleteFailedException
PreDeleteFailedException - if any error occurs during the process.
protected void update()
               throws ReadOnlyObjectException,
                      AlreadyLockedObjectException,
                      IllegalPersistentStateRuntimeException
ReadOnlyObjectException - if the object has been marked as ReadOnly, and hence cannot be updated.
AlreadyLockedObjectException - if the object has been locked by another process.
IllegalPersistentStateRuntimeException - this RuntimeException will be thrown if the domain object has been submitted to the UOW for an Add/Update/Delete and commit hasnt yet been performed.
protected void addInitialValue(String fieldName,
                               Object initialValue)
fieldName - the field.initialValue - the initial value.protected IPersistent actualInstance()
| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||