org.exolab.castor.jdo.engine
Class JDOCallback

java.lang.Object
  extended by org.exolab.castor.jdo.engine.JDOCallback
All Implemented Interfaces:
CallbackInterceptor

public class JDOCallback
extends java.lang.Object
implements CallbackInterceptor

Version:
$Revision: 1.3 $ $Date: 2005/04/17 10:29:25 $
Author:
Assaf Arkin

Constructor Summary
JDOCallback()
           
 
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, AccessMode 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDOCallback

public JDOCallback()
Method Detail

using

public void using(java.lang.Object object,
                  Database db)
Description copied from interface: CallbackInterceptor
Called to indicate that an object has been made persistent.

Specified by:
using in interface CallbackInterceptor
Parameters:
object - The object
db - The database to which this object belongs

loaded

public java.lang.Class loaded(java.lang.Object object,
                              AccessMode accessMode)
                       throws java.lang.Exception
Description copied from interface: CallbackInterceptor
Called to indicate that the object has been loaded from persistent storage.

Specified by:
loaded in interface CallbackInterceptor
Parameters:
object - The object
Returns:
null or the extending Class. In the latter case Castor will reload the object of the given class with the same identity.
Throws:
java.lang.Exception - An exception occured, the object cannot be loaded

storing

public void storing(java.lang.Object object,
                    boolean modified)
             throws java.lang.Exception
Description copied from interface: CallbackInterceptor
Called to indicate that an object is to be stored in persistent storage.

Specified by:
storing in interface CallbackInterceptor
Parameters:
object - The object
modified - Is the object modified?
Throws:
java.lang.Exception - An exception occured, the object cannot be stored

creating

public void creating(java.lang.Object object,
                     Database db)
              throws java.lang.Exception
Description copied from interface: CallbackInterceptor
Called to indicate that an object is to be created in persistent storage.

Specified by:
creating in interface CallbackInterceptor
Parameters:
object - The object
db - The database in which this object will be created
Throws:
java.lang.Exception

created

public void created(java.lang.Object object)
             throws java.lang.Exception
Description copied from interface: CallbackInterceptor
Called to indicate that an object has been created.

Specified by:
created in interface CallbackInterceptor
Parameters:
object - The object
Throws:
java.lang.Exception

removing

public void removing(java.lang.Object object)
              throws java.lang.Exception
Description copied from interface: CallbackInterceptor
Called to indicate that an object is to be deleted.

This method is made at commit time on objects deleted during the transaction before setting their fields to null.

Specified by:
removing in interface CallbackInterceptor
Parameters:
object - The object
Throws:
java.lang.Exception

removed

public void removed(java.lang.Object object)
             throws java.lang.Exception
Description copied from interface: CallbackInterceptor
Called to indicate that an object has been deleted.

This method is called during db.remove().

Specified by:
removed in interface CallbackInterceptor
Parameters:
object - The object
Throws:
java.lang.Exception

releasing

public void releasing(java.lang.Object object,
                      boolean committed)
Description copied from interface: CallbackInterceptor
Called to indicate that an object has been made transient.

This method is made at commit or rollback time on all objects that were presistent during the life time of the transaction.

Specified by:
releasing in interface CallbackInterceptor
Parameters:
object - The object
committed - True if the object has been commited, false if rollback or otherwise cancelled

updated

public void updated(java.lang.Object object)
             throws java.lang.Exception
Description copied from interface: CallbackInterceptor
Called to indicate that an object has been updated at the end of a "long" transaction.

Specified by:
updated in interface CallbackInterceptor
Parameters:
object - The object
Throws:
java.lang.Exception


Intalio Inc. (C) 1999-2004. All rights reserved http://www.intalio.com