|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Persistent
A callback informs objects about changes to their state.
| Method Summary | |
|---|---|
void |
jdoAfterCreate()
Called to indicate that an object has been created in persistent storage. |
void |
jdoAfterRemove()
Called to indicate that an object has been removed from persistent storage. |
void |
jdoBeforeCreate(Database db)
Called to indicate that an object is to be created in persistent storage. |
void |
jdoBeforeRemove()
Called to indicate that an object is to be removed from persistent storage. |
Class |
jdoLoad(AccessMode accessMode)
Called to indicate that the object has been loaded from persistent storage. |
void |
jdoPersistent(Database db)
Called to set the database to which this object belongs when this object becomes persistent. |
void |
jdoStore(boolean modified)
Called to indicate that an object is to be stored in persistent storage. |
void |
jdoTransient()
Called to indicate the object is now transient. |
void |
jdoUpdate()
Called to indicate that an object has been included to the current transaction by means of db.update() method (at the end of a "long " transaction). |
| Method Detail |
|---|
void jdoPersistent(Database db)
Called when the object is first created as the result of a
query, perior to calling jdoLoad(org.exolab.castor.mapping.AccessMode), or after Database.create(java.lang.Object) has been called on the object, prior to
calling jdoStore(boolean).
db - The database to which this object belongsvoid jdoTransient()
Called when the object #setFacetscompletes following any
call to jdoStore(boolean) or when the object is deleted from
the database.
Class jdoLoad(AccessMode accessMode)
throws Exception
accessMode - The access mode that was specified for this object
either in Query.execute(AccessMode accessMode), or in
Database.load(Class type, Object identity, AccessMode accessMode).
The constants are defined in Database.
Exception - An exception occured, the object cannot be loaded
void jdoStore(boolean modified)
throws Exception
modified - Is the object modified?
Exception - An exception occured, the object cannot be stored
void jdoBeforeCreate(Database db)
throws Exception
db - The database in which this object will be created
Exception
void jdoAfterCreate()
throws Exception
Exception
void jdoBeforeRemove()
throws Exception
Exception
void jdoAfterRemove()
throws Exception
Exception
void jdoUpdate()
throws Exception
Exception - An exception occured, the object cannot be stored
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||