Package net.ontopia.persistence.proxy
Interface TransactionIF
- All Known Implementing Classes:
AbstractTransaction,ROTransaction,RWTransaction
public interface TransactionIF
INTERNAL: Interface that manages object transactions using the
proxy framework.
This class is similar to the JDO PersistenceManager, StateManager and Transaction interfaces.
-
Method Summary
Modifier and TypeMethodDescription_getObject(IdentityIF identity) EXPERIMENTAL: ...voidabort()INTERNAL: Aborts the changes performed in the transaction.voidassignIdentity(PersistentIF object) voidbegin()INTERNAL: Begins a new transaction.voidclose()INTERNAL: Releases all resources used by the transaction.voidcommit()INTERNAL: Commits the changes performed in the transaction.voidcreate(PersistentIF object) INTERNAL: Registers the object with the transaction and marks it for creation in the data repository.createQuery(JDOQuery jdoquery, boolean resolve_identities) INTERNAL: Build a QueryIF from the specified JDO query instance.voiddelete(PersistentIF identity) INTERNAL: Unregisters the object with the transaction and marks it for deletion in the data repository.executeQuery(String name, Object[] params) INTERNAL: Executes the named query.voidflush()INTERNAL: Stores all pending changes in the data repository.INTERNAL: Gets the access registrar used by the transaction.getId()INTERNAL: Gets the transaction id.getObject(IdentityIF identity) INTERNAL: Gets the object instance with the given identity.getObject(IdentityIF identity, boolean acceptDeleted) INTERNAL: Gets the object instance with the given identity.INTERNAL: Gets the object access used by the transaction.INTERNAL: Gets the storage access used by the transaction.booleanisActive()INTERNAL: Returns true the transaction is active.booleanisClean()INTERNAL: Returns true the transaction is clean, i.e. no changes have been made.booleanisFieldLoaded(IdentityIF identity, int field) EXPERIMENTAL:booleanisObjectClean(IdentityIF identity) booleanisObjectLoaded(IdentityIF identity) EXPERIMENTAL:booleanINTERNAL: Returns true if this is a read-only transaction.<F> FloadField(IdentityIF object, int field) INTERNAL: Called by PersistentIFs when the value of the specified field is requested.voidobjectCreated(PersistentIF object) voidobjectDeleted(PersistentIF object) voidobjectDirty(PersistentIF object) INTERNAL: Called by PersistentIFs when the object's data has changed.voidobjectRead(IdentityIF identity) voidprefetch(Class<?> type, int[] fields, boolean[] traverse, Collection<IdentityIF> identities) voidprefetch(Class<?> type, int field, boolean traverse, Collection<IdentityIF> identities) booleanvalidate()INTERNAL: Returns true if the transaction is valid.
-
Method Details
-
getId
String getId()INTERNAL: Gets the transaction id. This id is unique for a given StorageIF instance. -
getStorageAccess
StorageAccessIF getStorageAccess()INTERNAL: Gets the storage access used by the transaction. -
getObjectAccess
ObjectAccessIF getObjectAccess()INTERNAL: Gets the object access used by the transaction. -
getAccessRegistrar
AccessRegistrarIF getAccessRegistrar()INTERNAL: Gets the access registrar used by the transaction. -
isReadOnly
boolean isReadOnly()INTERNAL: Returns true if this is a read-only transaction. -
isActive
boolean isActive()INTERNAL: Returns true the transaction is active. -
isClean
boolean isClean()INTERNAL: Returns true the transaction is clean, i.e. no changes have been made. -
validate
boolean validate()INTERNAL: Returns true if the transaction is valid. -
begin
void begin()INTERNAL: Begins a new transaction. -
commit
void commit()INTERNAL: Commits the changes performed in the transaction. -
abort
void abort()INTERNAL: Aborts the changes performed in the transaction. -
close
void close()INTERNAL: Releases all resources used by the transaction. -
flush
void flush()INTERNAL: Stores all pending changes in the data repository. Note that the transaction is not commited. -
getObject
INTERNAL: Gets the object instance with the given identity. If the identity is known not to exist in the data repository an exception will be thrown. Deleted objects will not be returned from this method. -
getObject
INTERNAL: Gets the object instance with the given identity. If the identity is known not to exist in the data repository an exception will be thrown. Known and still existing object instances of deleted objects will be returned from this method if the acceptDeleted flag is true. -
_getObject
EXPERIMENTAL: ... -
assignIdentity
-
create
INTERNAL: Registers the object with the transaction and marks it for creation in the data repository. -
delete
INTERNAL: Unregisters the object with the transaction and marks it for deletion in the data repository. -
objectDirty
INTERNAL: Called by PersistentIFs when the object's data has changed. -
objectRead
-
objectCreated
-
objectDeleted
-
loadField
INTERNAL: Called by PersistentIFs when the value of the specified field is requested. Note that the persistent object will be notified through the _p_setValue method, so there is usually no need to use the return value to set the instance member.- Returns:
- the field value that was loaded.
- Throws:
IdentityNotFoundException- if the identity was not found.
-
isObjectLoaded
EXPERIMENTAL: -
isFieldLoaded
EXPERIMENTAL: -
isObjectClean
-
prefetch
-
prefetch
-
executeQuery
INTERNAL: Executes the named query. The parameters given in the params parameter are used during the execution of the query. -
createQuery
INTERNAL: Build a QueryIF from the specified JDO query instance.
-