|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A callback interceptor informs objects about changes to their state. Different callbacks can cause different methods to be called on the objects.
Method Summary | |
void |
created(java.lang.Object object)
Called to indicate that an object has been created. |
void |
creating(java.lang.Object object,
Database db)
Called to indicate that an object is to be created in persistent storage. |
java.lang.Class |
loaded(java.lang.Object object,
short accessMode)
Called to indicate that the object has been loaded from persistent storage. |
void |
releasing(java.lang.Object object,
boolean committed)
Called to indicate that an object has been made transient. |
void |
removed(java.lang.Object object)
Called to indicate that an object has been deleted. |
void |
removing(java.lang.Object object)
Called to indicate that an object is to be deleted. |
void |
storing(java.lang.Object object,
boolean modified)
Called to indicate that an object is to be stored in persistent storage. |
void |
updated(java.lang.Object object)
Called to indicate that an object has been updated at the end of a "long" transaction. |
void |
using(java.lang.Object object,
Database db)
Called to indicate that an object has been made persistent. |
Method Detail |
public java.lang.Class loaded(java.lang.Object object, short accessMode) throws java.lang.Exception
object
- The object
java.lang.Exception
- An exception occured, the object cannot be loadedpublic void storing(java.lang.Object object, boolean modified) throws java.lang.Exception
object
- The objectmodified
- Is the object modified?
java.lang.Exception
- An exception occured, the object cannot be storedpublic void creating(java.lang.Object object, Database db) throws java.lang.Exception
object
- The objectdb
- The database in which this object will be created
java.lang.Exception
public void created(java.lang.Object object) throws java.lang.Exception
object
- The object
java.lang.Exception
public void removing(java.lang.Object object) throws java.lang.Exception
This method is made at commit time on objects deleted during the transaction before setting their fields to null.
object
- The object
java.lang.Exception
public void removed(java.lang.Object object) throws java.lang.Exception
This method is called during db.remove().
object
- The object
java.lang.Exception
public void releasing(java.lang.Object object, boolean committed)
This method is made at commit or rollback time on all objects that were presistent during the life time of the transaction.
object
- The objectcommitted
- True if the object has been commited, false
if rollback or otherwise cancelledpublic void using(java.lang.Object object, Database db)
object
- The objectdb
- The database to which this object belongspublic void updated(java.lang.Object object) throws java.lang.Exception
object
- The object
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |