|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.ojb.otm.core.ConcreteEditingContext
public class ConcreteEditingContext
Concrete implementation of EditingContext.
EditingContext| Constructor Summary | |
|---|---|
ConcreteEditingContext(Transaction tx,
PersistenceBroker pb)
|
|
| Method Summary | |
|---|---|
void |
afterMaterialization(IndirectionHandler handler,
Object cacheObject)
this callback is invoked after an Object is materialized within an IndirectionHandler. |
void |
beforeMaterialization(IndirectionHandler handler,
Identity oid)
this callback is invoked before an Object is materialized within an IndirectionHandler. |
void |
cache(Identity oid,
Object obj)
Used to cache objects by it's Identity. |
boolean |
cacheIfNew(Identity oid,
Object obj)
|
void |
checkpoint()
Writes all changes in this context into the persistent store. |
void |
clear()
Clear the cache. |
void |
commit()
Commit this context into the persistent store. |
boolean |
contains(Identity oid)
|
void |
deletePersistent(Identity oid,
Object userObject)
|
Collection |
getAllObjectsInContext()
|
void |
insert(Identity oid,
Object userObject,
int lock)
Insert the given object into the EditingContext, acquiring the specified lock. |
Object |
lookup(Identity oid)
Lookup object with the given oid in the Context. |
State |
lookupState(Identity oid)
lookup the state of an object, given the oid, in the context |
void |
refresh(Identity oid,
Object object)
Rollback all changes made during this transaction to the given object. |
void |
remove(Identity oid)
Remove a managed object from the management of this EditingContext. |
void |
rollback()
Rollback all changes made during this transaction. |
void |
setState(Identity oid,
State state)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConcreteEditingContext(Transaction tx,
PersistenceBroker pb)
| Method Detail |
|---|
public void insert(Identity oid,
Object userObject,
int lock)
throws LockingException
EditingContext
insert in interface EditingContextoid - the identity of the object to be inserteduserObject - the object to insert, for user operationslock - the lock to be acquired.
LockingException - thrown by the Lock Manager to avoid deadlocks. The insertion
could be re-attempted if the lock fails.EditingContext.insert(Identity, Object, int)public void remove(Identity oid)
EditingContext
remove in interface ObjectCacheremove in interface EditingContextoid - the Identity of the object to be removed from this context.EditingContext.remove(Identity)
public void deletePersistent(Identity oid,
Object userObject)
throws LockingException
LockingExceptionpublic Object lookup(Identity oid)
EditingContext
lookup in interface ObjectCachelookup in interface EditingContextoid - the oid of the object to lookup
Identity is found.EditingContext.lookup(Identity)public boolean contains(Identity oid)
public State lookupState(Identity oid)
throws LockingException
EditingContext
lookupState in interface EditingContextLockingExceptionEditingContext.lookupState(Identity)
public void setState(Identity oid,
State state)
setState in interface EditingContextEditingContext.setState(Identity, State)public Collection getAllObjectsInContext()
getAllObjectsInContext in interface EditingContext
public void beforeMaterialization(IndirectionHandler handler,
Identity oid)
MaterializationListener
beforeMaterialization in interface MaterializationListenerhandler - the invoking handleroid - the identity of the object to be materialized
public void afterMaterialization(IndirectionHandler handler,
Object cacheObject)
MaterializationListener
afterMaterialization in interface MaterializationListenerhandler - the invoking handlercacheObject - the materialized Object
public void commit()
throws TransactionAbortedException
TransactionAbortedException
public void checkpoint()
throws TransactionAbortedException
TransactionAbortedExceptionpublic void rollback()
public void refresh(Identity oid,
Object object)
refresh in interface EditingContext
public void cache(Identity oid,
Object obj)
ObjectCacheIdentity.
cache in interface ObjectCacheoid - Identity of the object to cache.obj - The object to cache.
public boolean cacheIfNew(Identity oid,
Object obj)
public void clear()
ObjectCache
clear in interface ObjectCache
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||