org.castor.persist.resolver
public interface ResolverStrategy
Since: 0.9.9
Method Summary | |
---|---|
Object | create(TransactionContext tx, Object object)
Create an object of the base class with specified identity into the
persistence storage.
|
void | expireCache(TransactionContext tx, Object field)
Inspect the fields stored in the object passed as an argument for
contained objects. |
void | load(TransactionContext tx, OID oid, ProposedObject proposedObject, AccessMode suggestedAccessMode, Object field)
Load an object with specified identity from the persistent storage.
|
boolean | markCreate(TransactionContext tx, OID oid, Object object)
Walk the object model and mark object that should be created.
|
void | markDelete(TransactionContext tx, Object object, Object field)
Prepare to delete an object with the specified identity. |
Object | postCreate(TransactionContext tx, OID oid, Object object, Object field, Object createdId)
Called after successful creation of an object of the base class.
|
UpdateFlags | preStore(TransactionContext tx, OID oid, Object object, int timeout, Object field)
Check the object for modification. |
UpdateAndRemovedFlags | removeRelation(TransactionContext tx, Object object, ClassMolder relatedMolder, Object relatedObject)
Remove the reference of a related object from an object of
the base class. |
void | revertObject(TransactionContext tx, OID oid, Object object, Object field)
Revert the object back to the state of begining of the transaction
If the object is loaded, it will be revert as it was loaded. |
Object | store(TransactionContext tx, Object object, Object field)
Store a data object into the persistent storage of the base class of this
ClassMolder.
|
void | update(TransactionContext tx, OID oid, Object object, AccessMode suggestedAccessMode, Object field)
Update the object which loaded or created in the other transaction to
the persistent storage.
|
Object | updateCache(TransactionContext tx, OID oid, Object object)
Update the dirty checking cache. |
Parameters: tx transaction in action object the object to be created
Returns: the identity of the object
Parameters: tx The TransactionContext field The field value as returned by the SQLEngine
Throws: PersistenceException If it is not possible to successfully complete this method.
Parameters: tx the TransactionContext in action oid the object identity of the desired object proposedObject Object holder storing information about assumed and actual object instances suggestedAccessMode the acessMode for the object field The field value as returned by the SQLEngine
Throws: PersistenceException If it is not possible to successfully complete this method.
Parameters: tx transaction in action oid the object identity of the object to be created. object the object to be created
Returns: true if there's objects that should be created
Parameters: tx - transaction in action object - the target object field The field value as returned by the SQLEngine
Throws: PersistenceException If it is not possible to successfully complete this method.
Parameters: tx transaction in action oid the object identity of the object to be created. object the object to be created field The field value as returned by the SQLEngine createdId ???
Returns: the identity of the object
Parameters: tx transaction in action oid the object identity of the object object the data object to be checked timeout timeout of updating the lock if needed field The field value as returned by the SQLEngine
Returns: true if the object is modified
Throws: PersistenceException If it is not possible to successfully complete this method.
If the related object is PersistanceCapable, the field will be set null. If the related object is a Collection, then the related object will be removed from the Collection.
If any changed occured, transactionContext.markModified will be called, to indicate the object is modified.
It method will iterate thur all of the object's field and try to remove all the occurrence.
Parameters: tx the TransactionContext of the transaction in action object the target object of the base type of this ClassMolder relatedMolder the ClassMolder of the related object to be removed from the object relatedObject the object to be removed
Returns: Various flags related to updating/removing object instances.
Parameters: tx - transaction in action oid - the object identity of the target object field The field value as returned by the SQLEngine object - the target object
Throws: PersistenceException If it is not possible to successfully complete this method.
Parameters: tx Transaction in action object the object to be stored field The field value as returned by the SQLEngine
Parameters: tx Transaction in action oid the object identity of the stored object object the object to be stored suggestedAccessMode Suggested access mode field The field value as returned by the SQLEngine
Throws: PersistenceException If it is not possible to successfully complete this method.
Parameters: tx - transaction in action oid - object's identity of the target object object - the target object
Returns: The object tha twas stored in the cache previously.