|
Business Components | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.jbo.server.NullDBTransactionImpl
Internal: Applications should not use this class.
Field Summary | |
protected ConnectionCredentials |
mConnectionCredentials
|
Fields inherited from interface oracle.jbo.Transaction |
LOCK_NONE,
LOCK_OPTIMISTIC,
LOCK_PESSIMISTIC |
Constructor Summary | |
NullDBTransactionImpl()
|
Method Summary | |
void |
addToValidationListeners(ValidationListener w)
Implementation of the DBTransaction interface. |
void |
addTransactionListener(TransactionListener listener)
Implementation of the DBTransaction interface. |
void |
addTransactionListenerNoCheck(TransactionListener listener)
Implementation of the DBTransaction interface. |
void |
addTransactionPostListener(TransactionPostListener listener)
Implementation of the DBTransaction interface. |
void |
addTransactionPostListenerNoCheck(TransactionPostListener listener)
Implementation of the DBTransaction interface. |
void |
addWarning(JboWarning warn)
Implementation of the DBTransaction interface. |
void |
applyChangeSet(int id)
Applies the changes committed by another transaction in order to synchronize caches between root Application Module instances. |
void |
clearEntityCache(java.lang.String entityName)
Clears the cache of the specified Entity Object. |
void |
closeTransaction()
Implementation of the DBTransaction interface. |
void |
commit()
Implementation of the DBTransaction interface. |
int |
commitAndSnap()
Commits the transaction and writes updated EntityImpls to the persistent store. |
void |
connect(java.sql.Connection sqlConnection)
Implementation of the DBTransaction interface. |
void |
connect(java.lang.String url)
Implementation of the DBTransaction interface. |
void |
connect(java.lang.String url,
java.util.Properties info)
Implementation of the DBTransaction interface. |
void |
connect(java.lang.String url,
java.lang.String user,
java.lang.String password)
Implementation of the DBTransaction interface. |
ApplicationModule |
createApplicationModule(java.lang.String defName)
Implementation of the DBTransaction interface. |
java.sql.CallableStatement |
createCallableStatement(java.lang.String str,
int noRowsPrefetch)
Implementation of the DBTransaction interface. |
EntityImpl |
createEntityInstance(EntityDefImpl entityDef,
AttributeList al)
Implementation of the DBTransaction interface. |
EntityImpl |
createEntityInstance(java.lang.String entityDefName,
AttributeList al)
Implementation of the DBTransaction interface. |
java.sql.PreparedStatement |
createPreparedStatement(java.lang.String str,
int noRowsPrefetch)
Implementation of the DBTransaction interface. |
java.lang.Object |
createRef(java.lang.String structName,
byte[] data)
Internal: Applications should not use this method. |
java.sql.Statement |
createStatement(int noRowsPrefetch)
Implementation of the DBTransaction interface. |
ViewLink |
createViewLink(java.lang.String viewLinkDefName,
ViewObject master,
ViewObject detail)
Implementation of the DBTransaction interface. |
ViewLink |
createViewLinkBetweenViewObjects(java.lang.String accessorName,
ViewObject master,
AttributeDef[] srcAttrs,
ViewObject detail,
AttributeDef[] destAttrs,
java.lang.String assocClause)
Implementation of the DBTransaction interface. |
ViewLink |
createViewLinkFromEntityAssocName(java.lang.String entityAssocName,
ViewObject master,
ViewObject detail)
Implementation of the DBTransaction interface. |
ViewObject |
createViewObject(java.lang.String voDefName)
Implementation of the DBTransaction interface. |
ViewObject |
createViewObjectFromQueryClauses(java.lang.String eoName,
java.lang.String selectClause,
java.lang.String fromClause,
java.lang.String whereClause,
java.lang.String orderByClause)
Implementation of the DBTransaction interface. |
ViewObject |
createViewObjectFromQueryStmt(java.lang.String sqlStatement)
Implementation of the DBTransaction interface. |
void |
disconnect()
Implementation of the DBTransaction interface. |
void |
disconnect(boolean retainState)
Closes the JDBC connection object and removes this transaction from the root application module. |
java.lang.String |
dumpQueryResult(java.lang.String query,
java.lang.String dumpClassName,
java.lang.String[] data)
Implementation of the DBTransaction interface. |
int |
executeCommand(java.lang.String command)
Implementation of the DBTransaction interface. |
EntityImpl |
findByPrimaryKey(EntityDefImpl entityDef,
Key key)
Implementation of the DBTransaction interface. |
EntityImpl |
findByPrimaryKey(java.lang.String entityDefName,
Key key)
Implementation of the DBTransaction interface. |
int |
getLockingMode()
Implementation of the DBTransaction interface. |
int |
getPostThreshold()
Implementation of the DBTransaction interface. |
Session |
getSession()
Implementation of the DBTransaction interface. |
SQLBuilder |
getSQLBuilder()
|
TransactionHandler |
getTransactionHandler()
Internal: Applications should not use this method. |
int |
getValidationThreshold()
Implementation of the DBTransaction interface. |
boolean |
isClearCacheOnCommit()
Indicates whether all Entity Object caches will be cleared after the transaction is committed. |
boolean |
isClearCacheOnRollback()
Indicates whether all Entity Object caches will be cleared after the transaction is rolled back. |
boolean |
isConnected()
Implementation of the DBTransaction interface. |
boolean |
isDirty()
Implementation of the DBTransaction interface. |
void |
postChanges()
Implementation of the DBTransaction interface. |
void |
reconnect()
Reconnect the application module to the database, if necessary, using previously supplied database credentials. |
void |
reconnect(boolean force)
Implementation of the DBTransaction interface. |
void |
removeChangeSet(int id)
Removes the change set that defines the changes to EntityImpls within a transaction. |
void |
removeTransactionListener(TransactionListener listener)
Implementation of the DBTransaction interface. |
void |
removeTransactionPostListener(TransactionPostListener listener)
Implementation of the DBTransaction interface. |
void |
rollback()
Implementation of the DBTransaction interface. |
void |
setClearCacheOnCommit(boolean val)
Indicates whether all Entity Object caches will be cleared after the transaction is committed. |
void |
setClearCacheOnRollback(boolean val)
Indicates whether all Entity Object caches will be cleared after the transaction is rolled back. |
void |
setLockingMode(int mode)
Implementation of the DBTransaction interface. |
void |
setPostThreshold(int count)
Implementation of the DBTransaction interface. |
void |
setTransactionHandler(TransactionHandler txnHandler)
Internal: Applications should not use this method. |
void |
setValidationThreshold(int count)
Implementation of the DBTransaction interface. |
void |
validate()
Implementation of the DBTransaction interface. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected ConnectionCredentials mConnectionCredentials
Constructor Detail |
public NullDBTransactionImpl()
Method Detail |
public void closeTransaction()
public void commit()
public int commitAndSnap()
This method (along with applyChangeSet
and removeChangeSet
is used to
synchronize the cache between root Application
Module instances in an Application Module pool.
commitAndSnap commits the transaction, but during the commit process, writes out "changed" EntityImpls to the persistent store. These changes are stored as a "change set". The change set can then be applied to other transactions (that is, to the Entity caches of other root Application Modules).
The integer value returned by this method identifies the change set that is stored in persistent store.
To apply the changes to another transaction (or Application
Module cache),
call Transaction.applyChangeSet(int)
where int
is the integer value returned by commitAndSnap
that represents the change set.
Transaction.applyChangeSet(int)
,
Transaction.removeChangeSet(int)
public void applyChangeSet(int id)
This method (along with commitAndSnap
and removeChangeSet
is used to
synchronize the cache between root Application
Module instances in an Application Module pool.
Call applyChangeSet to apply changes commited by another
transaction. The integer id parameter (returned by
commitAndSnap
) identifies the
change set to be found in the persistent store.
After this call, this transaction's cache is synchronized with the changes from the change set.
id
- an integer representing the change set to apply to the
transaction.Transaction.commitAndSnap()
,
Transaction.removeChangeSet(int)
public void removeChangeSet(int id)
This method (along with commitAndSnap
and applyChangeSet
is used to
synchronize the cache between root Application
Module instances in an Application Module pool.
id
- an integer representing the change set to remove from the
persistent store.Transaction.commitAndSnap()
,
Transaction.applyChangeSet(int)
public void rollback()
public void postChanges()
public boolean isDirty()
public void setPostThreshold(int count)
public int getPostThreshold()
public void setValidationThreshold(int count)
public int getValidationThreshold()
public void addTransactionListener(TransactionListener listener)
public void addTransactionListenerNoCheck(TransactionListener listener)
public void removeTransactionListener(TransactionListener listener)
public void addTransactionPostListener(TransactionPostListener listener)
public void addTransactionPostListenerNoCheck(TransactionPostListener listener)
public void removeTransactionPostListener(TransactionPostListener listener)
public java.sql.Statement createStatement(int noRowsPrefetch)
public java.sql.CallableStatement createCallableStatement(java.lang.String str, int noRowsPrefetch)
public java.sql.PreparedStatement createPreparedStatement(java.lang.String str, int noRowsPrefetch)
public int executeCommand(java.lang.String command)
public java.lang.String dumpQueryResult(java.lang.String query, java.lang.String dumpClassName, java.lang.String[] data)
public void validate()
public void addToValidationListeners(ValidationListener w)
public void connect(java.sql.Connection sqlConnection)
Connection
- Reqeusts the factory to create a DBTransactionImpl object
from the given ConnectionDBTransaction.connect(Connection)
,
DatabaseTransactionFactory
public void connect(java.lang.String url)
url
- Reqeusts the factory to create a DBTransactionImpl object
from the given URLTransaction.connect(String)
,
DatabaseTransactionFactory
public void connect(java.lang.String url, java.util.Properties info)
url
- Reqeusts the factory to create a DBTransactionImpl object
from the given url and propertiesinfo
- Reqeusts the factory to create a DBTransactionImpl object
from given the url and propertiesTransaction.connect(String, Properties)
,
DatabaseTransactionFactory
public void connect(java.lang.String url, java.lang.String user, java.lang.String password)
url
- Reqeusts the factory to create a DBTransactionImpl object
from the given url, username and password.user
- Reqeusts the factory to create a DBTransactionImpl object
from the given url, username and password.password
- Reqeusts the factory to create a DBTransactionImpl object
from the given url, username and password.Transaction.connect(String, Properties)
,
DatabaseTransactionFactory
public void disconnect()
public boolean isConnected()
public void reconnect(boolean force)
public void setLockingMode(int mode)
public int getLockingMode()
public TransactionHandler getTransactionHandler()
public void setTransactionHandler(TransactionHandler txnHandler)
public EntityImpl createEntityInstance(EntityDefImpl entityDef, AttributeList al)
public EntityImpl createEntityInstance(java.lang.String entityDefName, AttributeList al)
public EntityImpl findByPrimaryKey(EntityDefImpl entityDef, Key key)
public EntityImpl findByPrimaryKey(java.lang.String entityDefName, Key key)
public ViewObject createViewObject(java.lang.String voDefName)
public ViewObject createViewObjectFromQueryClauses(java.lang.String eoName, java.lang.String selectClause, java.lang.String fromClause, java.lang.String whereClause, java.lang.String orderByClause)
public ViewObject createViewObjectFromQueryStmt(java.lang.String sqlStatement)
public ApplicationModule createApplicationModule(java.lang.String defName)
public ViewLink createViewLink(java.lang.String viewLinkDefName, ViewObject master, ViewObject detail)
public ViewLink createViewLinkFromEntityAssocName(java.lang.String entityAssocName, ViewObject master, ViewObject detail)
public ViewLink createViewLinkBetweenViewObjects(java.lang.String accessorName, ViewObject master, AttributeDef[] srcAttrs, ViewObject detail, AttributeDef[] destAttrs, java.lang.String assocClause)
public void addWarning(JboWarning warn)
public Session getSession()
public SQLBuilder getSQLBuilder()
public boolean isClearCacheOnCommit()
RowSet.executeQuery
might miss some of the changes.
The value of the Application Module's
isClearCacheOnCommit() flag will be used if the client has not
set this flag in the Transaction.
At the end of transaction, the transaction checks the value of its
isClearCacheOnCommit()
flag and either clears the Entity Object caches or not.
However, if the client never called
setClearCacheOnCommit
on this transaction, the framework will use the value for the root
Application Module's definition object.
In contrast, if the client called setClearCacheOnCommit on the Transaction, then the value of the root Application Module Def's isClearCacheOnCommit is not used.
Note that clearing the Entity Object caches has performance ramifications: repopulating the caches is expensive in terms of time and processing effort.
For middle-tier applications, you can use
isClearCacheOnCommit
and
setClearCacheOnCommit
in the DBTransactionImpl
class.
RowSet.executeQuery()
,
Transaction.setClearCacheOnCommit(boolean val)
,
DBTransactionImpl.isClearCacheOnCommit()
,
DBTransactionImpl.setClearCacheOnCommit(boolean val)
public void setClearCacheOnCommit(boolean val)
isClearCacheOnCommit
.val
- true indicates that the Entity Object caches will be cleared
on commit, and will be refreshed with new data from the database.#isClearCacheOnCommit(boolean val)
public boolean isClearCacheOnRollback()
RowSet.executeQuery
might miss some of the changes.
The value of the Application Module's
isClearCacheOnRollback() flag will be used if the client has not
set this flag in the Transaction.
At the end of transaction, the transaction checks the value of its
isClearCacheOnRollback
flag and either clears the Entity Object caches or not.
However, if the client never called
setClearCacheOnRollback
on this transaction, the framework will use the value for the root
Application Module's definition object.
In contrast, if the client called oracle.jbo.Transaction.setClearCacheOnRollback on the Transaction, then the value of the root Application Module Def's isClearCacheOnRollback is not used.
For middle-tier applications, you can use
isClearCacheOnCommit
and
setClearCacheOnCommit
in the DBTransactionImpl
class.
Note that clearing the Entity Object caches has performance ramifications: repopulating the caches is expensive in terms of time and processing effort.
RowSet.executeQuery()
,
Transaction.setClearCacheOnRollback(boolean val)
,
DBTransactionImpl.setClearCacheOnRollback(boolean val)
,
DBTransactionImpl.isClearCacheOnRollback()
public void setClearCacheOnRollback(boolean val)
isClearCacheOnRollback
val
- true indicates that the Entity Object caches will be cleared
on rollback, and will be refreshed with new data from the database.Transaction.isClearCacheOnRollback()
public java.lang.Object createRef(java.lang.String structName, byte[] data)
public void clearEntityCache(java.lang.String entityName)
entityName
- the name of the entity whose cache is to
be cleared. If null
, caches
for all entities are cleared.public void reconnect()
public void disconnect(boolean retainState)
All ViewObjects should have fetched all their data or be in forwardonly mode before this method is invoked with retainState = true
In the middle-tier, you can also use the disconnect
method on the DBTransactionImpl
interface.
|
Business Components | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |