ResolverStrategy
public final class OneToManyRelationResolver extends ManyRelationResolver
_classMolder, _fieldMolder
Constructor | Description |
---|---|
OneToManyRelationResolver(ClassMolder classMolder,
FieldMolder fieldMolder,
int fieldIndex) |
Creates an instance of OneToMany.
|
Modifier and Type | Method | Description |
---|---|---|
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,
Identity 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.
|
boolean |
updateWhenNoTimestampSet(TransactionContext tx,
OID oid,
java.lang.Object object,
AccessMode suggestedAccessMode) |
Update the object which loaded or created in the other transaction to
the persistent storage.
|
isCascadingCreate, isCascadingDelete, isCascadingUpdate
create, expireCache, load, removeRelation, revertObject, store, updateCache
public OneToManyRelationResolver(ClassMolder classMolder, FieldMolder fieldMolder, int fieldIndex)
classMolder
- fieldMolder
- fieldIndex
- Field index within all fields of parent class molder.public boolean markCreate(TransactionContext tx, OID oid, java.lang.Object object) throws 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 createdPersistenceException
#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 PersistenceException
ResolverStrategy
markDelete
in interface ResolverStrategy
markDelete
in class ManyRelationResolver
tx
- - transaction in actionobject
- - the target objectfield
- The field value as returned by the SQLEnginePersistenceException
- If it is not possible to successfully complete this method.#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 SQLEnginePersistenceException
- 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
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 SQLEnginePersistenceException
- If it is not possible to successfully complete this method.#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, Identity createdId)
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
- ???#postCreate(org.castor.persist.TransactionContext,
org.exolab.castor.persist.OID, org.exolab.castor.persist.DepositBox,
java.lang.Object, org.exolab.castor.mapping.AccessMode,
java.lang.Object)
public boolean updateWhenNoTimestampSet(TransactionContext tx, OID oid, java.lang.Object object, AccessMode suggestedAccessMode) throws PersistenceException
ResolverStrategy
tx
- Transaction in actionoid
- the object identity of the stored objectobject
- the object to be storedsuggestedAccessMode
- Suggested access modePersistenceException
- If it is not possible to successfully complete this method.Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com