public abstract class AbstractTransaction extends Object implements TransactionIF
| Modifier and Type | Field and Description |
|---|---|
protected StorageAccessIF |
access |
protected boolean |
debug |
protected String |
id |
protected Map<IdentityIF,PersistentIF> |
identity_map |
protected boolean |
isaborted |
protected boolean |
isactive |
protected boolean |
isclosed |
protected Map<IdentityIF,PersistentIF> |
lru |
protected int |
lrusize |
protected ObjectRelationalMappingIF |
mapping |
protected ObjectAccessIF |
oaccess |
protected Map<String,QueryIF> |
querymap |
protected AccessRegistrarIF |
registrar |
protected long |
timestamp |
protected StorageCacheIF |
txncache |
| Modifier and Type | Method and Description |
|---|---|
PersistentIF |
_getObject(IdentityIF identity)
EXPERIMENTAL: ...
|
void |
abort()
INTERNAL: Aborts the changes performed in the transaction.
|
void |
begin()
INTERNAL: Begins a new transaction.
|
protected PersistentIF |
checkIdentityMap(IdentityIF identity) |
protected PersistentIF |
checkIdentityMapAndCreateInstance(IdentityIF identity) |
protected PersistentIF |
checkIdentityMapNoLRU(IdentityIF identity) |
void |
close()
INTERNAL: Releases all resources used by the transaction.
|
void |
commit()
INTERNAL: Commits the changes performed in the transaction.
|
protected PersistentIF |
createInstance(IdentityIF identity) |
QueryIF |
createQuery(JDOQuery jdoquery,
boolean resolve_identities)
INTERNAL: Build a QueryIF from the specified JDO query instance.
|
Object |
executeQuery(String name,
Object[] params)
INTERNAL: Executes the named query.
|
protected Collection |
extractFieldValues(Object type,
int field,
Collection<IdentityIF> identities) |
protected Collection<IdentityIF> |
extractNonDirty(Collection<IdentityIF> identities) |
abstract void |
flush()
INTERNAL: Stores all pending changes in the data repository.
|
AccessRegistrarIF |
getAccessRegistrar()
INTERNAL: Gets the access registrar used by the transaction.
|
String |
getId()
INTERNAL: Gets the transaction id.
|
PersistentIF |
getObject(IdentityIF identity)
INTERNAL: Gets the object instance with the given identity.
|
PersistentIF |
getObject(IdentityIF identity,
boolean acceptDeleted)
INTERNAL: Gets the object instance with the given identity.
|
ObjectAccessIF |
getObjectAccess()
INTERNAL: Gets the object access used by the transaction.
|
protected QueryIF |
getQuery(String name) |
StorageAccessIF |
getStorageAccess()
INTERNAL: Gets the storage access used by the transaction.
|
boolean |
isActive()
INTERNAL: Returns true the transaction is active.
|
boolean |
isFieldLoaded(IdentityIF identity,
int field)
EXPERIMENTAL:
|
boolean |
isObjectLoaded(IdentityIF identity)
EXPERIMENTAL:
|
<F> F |
loadField(IdentityIF identity,
int field)
INTERNAL: Called by PersistentIFs when the value of the specified
field is requested.
|
void |
objectMerged(IdentityIF source,
IdentityIF target)
INTERNAL: Called by other transactions to notify this transaction of
committed merges.
|
void |
prefetch(Class<?> type,
int[] fields,
boolean[] traverse,
Collection<IdentityIF> identities) |
void |
prefetch(Class<?> type,
int field,
boolean traverse,
Collection<IdentityIF> identities) |
protected void |
registerQuery(String name,
QueryIF query) |
protected PersistentIF |
removeIdentityMapNoLRU(IdentityIF identity) |
String |
toString() |
protected abstract void |
transactionPostAbort() |
protected abstract void |
transactionPostCommit() |
protected abstract void |
transactionPreAbort() |
protected abstract void |
transactionPreCommit() |
boolean |
validate()
INTERNAL: Returns true if the transaction is valid.
|
void |
writeIdentityMap(Writer out,
boolean dump) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitassignIdentity, create, delete, isClean, isObjectClean, isReadOnly, objectCreated, objectDeleted, objectDirty, objectReadprotected boolean debug
protected boolean isactive
protected boolean isclosed
protected boolean isaborted
protected String id
protected StorageAccessIF access
protected StorageCacheIF txncache
protected AccessRegistrarIF registrar
protected ObjectAccessIF oaccess
protected ObjectRelationalMappingIF mapping
protected final Map<IdentityIF,PersistentIF> identity_map
protected Map<IdentityIF,PersistentIF> lru
protected int lrusize
protected long timestamp
public String getId()
TransactionIFgetId in interface TransactionIFpublic StorageAccessIF getStorageAccess()
TransactionIFgetStorageAccess in interface TransactionIFpublic boolean isActive()
TransactionIFisActive in interface TransactionIFpublic boolean validate()
TransactionIFvalidate in interface TransactionIFpublic void begin()
TransactionIFbegin in interface TransactionIFpublic void commit()
TransactionIFcommit in interface TransactionIFpublic void abort()
TransactionIFabort in interface TransactionIFpublic void close()
TransactionIFclose in interface TransactionIFpublic abstract void flush()
TransactionIFflush in interface TransactionIFprotected abstract void transactionPreCommit()
protected abstract void transactionPostCommit()
protected abstract void transactionPreAbort()
protected abstract void transactionPostAbort()
public ObjectAccessIF getObjectAccess()
TransactionIFgetObjectAccess in interface TransactionIFpublic AccessRegistrarIF getAccessRegistrar()
TransactionIFgetAccessRegistrar in interface TransactionIFpublic boolean isObjectLoaded(IdentityIF identity)
TransactionIFisObjectLoaded in interface TransactionIFpublic boolean isFieldLoaded(IdentityIF identity, int field)
TransactionIFisFieldLoaded in interface TransactionIFpublic <F> F loadField(IdentityIF identity, int field)
TransactionIFloadField in interface TransactionIFpublic void objectMerged(IdentityIF source, IdentityIF target)
source - The identity of the object merged into targettarget - The identity of the target object that was mergedpublic PersistentIF getObject(IdentityIF identity)
TransactionIFgetObject in interface TransactionIFpublic PersistentIF getObject(IdentityIF identity, boolean acceptDeleted)
TransactionIFgetObject in interface TransactionIFpublic PersistentIF _getObject(IdentityIF identity)
TransactionIF_getObject in interface TransactionIFprotected PersistentIF checkIdentityMapAndCreateInstance(IdentityIF identity)
protected PersistentIF checkIdentityMapNoLRU(IdentityIF identity)
protected PersistentIF removeIdentityMapNoLRU(IdentityIF identity)
protected PersistentIF checkIdentityMap(IdentityIF identity)
protected PersistentIF createInstance(IdentityIF identity)
public void prefetch(Class<?> type, int field, boolean traverse, Collection<IdentityIF> identities)
prefetch in interface TransactionIFpublic void prefetch(Class<?> type, int[] fields, boolean[] traverse, Collection<IdentityIF> identities)
prefetch in interface TransactionIFprotected Collection<IdentityIF> extractNonDirty(Collection<IdentityIF> identities)
protected Collection extractFieldValues(Object type, int field, Collection<IdentityIF> identities)
public Object executeQuery(String name, Object[] params)
TransactionIFexecuteQuery in interface TransactionIFpublic QueryIF createQuery(JDOQuery jdoquery, boolean resolve_identities)
TransactionIFcreateQuery in interface TransactionIFpublic void writeIdentityMap(Writer out, boolean dump) throws IOException
IOException