|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.castor.persist.resolver.ManyRelationResolver
org.castor.persist.resolver.ManyToManyRelationResolver
public class ManyToManyRelationResolver
Implementation of ResolverStrategy
for M:N relations.
Field Summary |
---|
Fields inherited from class org.castor.persist.resolver.ManyRelationResolver |
---|
_classMolder, _debug, _fieldMolder |
Constructor Summary | |
---|---|
ManyToManyRelationResolver(ClassMolder classMolder,
FieldMolder fieldMolder,
boolean debug)
Creates an instance of ManyToManyRelationResolver |
Method Summary | |
---|---|
boolean |
markCreate(TransactionContext tx,
OID oid,
java.lang.Object object)
Walk the object model and mark object that should be created. |
void |
markDelete(TransactionContext tx,
java.lang.Object object,
java.lang.Object field)
Prepare to delete an object with the specified identity. |
java.lang.Object |
postCreate(TransactionContext tx,
OID oid,
java.lang.Object object,
java.lang.Object field,
java.lang.Object createdId)
Called after successful creation of an object of the base class. |
UpdateFlags |
preStore(TransactionContext tx,
OID oid,
java.lang.Object object,
int timeout,
java.lang.Object field)
Check the object for modification. |
void |
update(TransactionContext tx,
OID oid,
java.lang.Object object,
AccessMode suggestedAccessMode,
java.lang.Object field)
Update the object which loaded or created in the other transaction to the persistent storage. |
Methods inherited from class org.castor.persist.resolver.ManyRelationResolver |
---|
create, expireCache, load, removeRelation, revertObject, store, updateCache |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ManyToManyRelationResolver(ClassMolder classMolder, FieldMolder fieldMolder, boolean debug)
classMolder
- Associated ClassMolder.fieldMolder
- Associated FieldMolder.debug
- ???Method Detail |
---|
public boolean markCreate(TransactionContext tx, OID oid, java.lang.Object object) throws DuplicateIdentityException, PersistenceException
ResolverStrategy
markCreate
in interface ResolverStrategy
markCreate
in class ManyRelationResolver
tx
- transaction in actionoid
- the object identity of the object to be created.object
- the object to be created
DuplicateIdentityException
PersistenceException
#markCreate(org.castor.persist.TransactionContext,
org.exolab.castor.persist.OID, java.lang.Object)
public void markDelete(TransactionContext tx, java.lang.Object object, java.lang.Object field) throws ObjectNotFoundException, PersistenceException
ResolverStrategy
markDelete
in interface ResolverStrategy
markDelete
in class ManyRelationResolver
tx
- - transaction in actionobject
- - the target objectfield
- The field value as returned by the SQLEngine
PersistenceException
- If it is not possible to successfully complete this method.
ObjectNotFoundException
#markDelete(org.castor.persist.TransactionContext, java.lang.Object,
java.lang.Object)
public UpdateFlags preStore(TransactionContext tx, OID oid, java.lang.Object object, int timeout, java.lang.Object field) throws PersistenceException
ResolverStrategy
preStore
in interface ResolverStrategy
preStore
in class ManyRelationResolver
tx
- transaction in actionoid
- the object identity of the objectobject
- the data object to be checkedtimeout
- timeout of updating the lock if neededfield
- The field value as returned by the SQLEngine
PersistenceException
- If it is not possible to successfully complete this method.#preStore(org.castor.persist.TransactionContext,
org.exolab.castor.persist.OID, java.lang.Object, int,
java.lang.Object)
public void update(TransactionContext tx, OID oid, java.lang.Object object, AccessMode suggestedAccessMode, java.lang.Object field) throws PersistenceException, ObjectModifiedException
ResolverStrategy
update
in interface ResolverStrategy
update
in class ManyRelationResolver
tx
- Transaction in actionoid
- the object identity of the stored objectobject
- the object to be storedsuggestedAccessMode
- Suggested access modefield
- The field value as returned by the SQLEngine
PersistenceException
- If it is not possible to successfully complete this method.
ObjectModifiedException
#update(org.castor.persist.TransactionContext,
org.exolab.castor.persist.OID, java.lang.Object,
org.exolab.castor.mapping.AccessMode, java.lang.Object)
public java.lang.Object postCreate(TransactionContext tx, OID oid, java.lang.Object object, java.lang.Object field, java.lang.Object createdId) throws DuplicateIdentityException, PersistenceException
ResolverStrategy
postCreate
in interface ResolverStrategy
postCreate
in class ManyRelationResolver
tx
- transaction in actionoid
- the object identity of the object to be created.object
- the object to be createdfield
- The field value as returned by the SQLEnginecreatedId
- ???
DuplicateIdentityException
PersistenceException
#postCreate(org.exolab.castor.persist.TransactionContext,
org.exolab.castor.persist.OID, org.exolab.castor.persist.DepositBox,
java.lang.Object, org.exolab.castor.mapping.AccessMode,
java.lang.Object)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |