|
Oracle Fusion Middleware Java API Reference for Oracle ADF Model 11g Release 1 (11.1.1.7.0) E10653-08 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoracle.jbo.server.NullDBTransactionImpl
public class NullDBTransactionImpl
Implementation of DBTransaction interface that represents a disconnected transaction. NullDBTransactionImpl objects are used internally by the framework to make the transition from a disconnected to connected state. Upon startup an application is in a non-transactional disconnected state. When a connect method is called the database connection is established and the transaction is started. This implementation of DBTransaction throws a NotConnectedException for most operations.
From 9.0.3 onwards, this class is no longer used to represent
a disconnected transaction. The disconnected state, by default, is now
represented by DBTransactionImpl2
.
Applications using custom DBTransactionImpl and/or NullDBTransactionImpl subclass(es)
should now subclass DBTransactionImpl2 instead.
DatabaseTransactionFactory
,
DBTransactionImpl2
Field Summary | |
---|---|
protected ConnectionCredentials |
mConnectionCredentials
Deprecated. |
Fields inherited from interface oracle.jbo.server.DBTransaction |
---|
DEFAULT |
Fields inherited from interface oracle.jbo.Transaction |
---|
DML_OPERATION_TIMEOUT_WAIT_FOREVER, LOCK_NONE, LOCK_OPTIMISTIC, LOCK_OPTUPDATE, LOCK_PESSIMISTIC |
Constructor Summary | |
---|---|
NullDBTransactionImpl()
Deprecated. |
Method Summary | |
---|---|
void |
addToValidationListeners(ValidationListener w)
Deprecated. Implementation of the DBTransaction interface. |
void |
addTransactionListener(TransactionListener listener)
Deprecated. Implementation of the DBTransaction interface. |
void |
addTransactionListenerNoCheck(TransactionListener listener)
Deprecated. Implementation of the DBTransaction interface. |
void |
addTransactionPostListener(TransactionPostListener listener)
Deprecated. Implementation of the DBTransaction interface. |
void |
addTransactionPostListenerNoCheck(TransactionPostListener listener)
Deprecated. Implementation of the DBTransaction interface. |
void |
addTransactionStateListener(TransactionStateListener tl)
Deprecated. Implementation of the DBTransaction interface. |
void |
addViewClearCacheListener(ViewClearCacheListener tl)
Deprecated. |
void |
addWarning(JboWarning warn)
Deprecated. Implementation of the DBTransaction interface. |
void |
applyChangeSet(int id)
Deprecated. Applies the changes committed by another transaction in order to synchronize caches between root Application Module instances. |
boolean |
cancelDMLOperations()
Deprecated. Cancels the currently running Entity Object DML operations. |
void |
clearEntityCache(java.lang.String entityName)
Deprecated. Clears the cache of the specified Entity Object. |
void |
closeTransaction()
Deprecated. Implementation of the DBTransaction interface. |
void |
commit()
Deprecated. Implementation of the DBTransaction interface. |
int |
commitAndSaveChangeSet()
Deprecated. Commits the transaction and writes updated EntityImpls to the persistent store. |
void |
connect(java.sql.Connection sqlConnection)
Deprecated. |
void |
connect(java.lang.String url)
Deprecated. Implementation of the DBTransaction interface. |
void |
connect(java.lang.String url,
java.util.Properties info)
Deprecated. Implementation of the DBTransaction interface. |
void |
connect(java.lang.String url,
java.lang.String user,
java.lang.String password)
Deprecated. Implementation of the DBTransaction interface. |
void |
connectToDataSource(javax.sql.DataSource ds,
boolean isJTAbased)
Deprecated. |
void |
connectToDataSource(javax.sql.DataSource ds,
java.lang.String user,
java.lang.String passwd,
boolean isJTAbased)
Deprecated. |
void |
connectToDataSource(java.util.Hashtable env,
java.lang.String dsName,
boolean isJTABased)
Deprecated. Looks up a datasource from a jndi tree and acquires the jdbc connection from the looked up datasource using the javax.sql.Datasource.getConnection(String user, String passwd) method. |
void |
connectToDataSource(java.util.Hashtable env,
java.lang.String dsName,
java.lang.String user,
java.lang.String passwd,
boolean isJTABased)
Deprecated. Looks up a datasource from a jndi tree and acquires the jdbc connection from the looked up datasource using the javax.sql.Datasource.getConnection(String user, String passwd) method. |
void |
connectToDataSource(java.lang.String nsUrl,
java.lang.String nsUser,
java.lang.String nsPasswd,
java.lang.String dsUrl)
Deprecated. Looks up a datasource from Oracle 8i namespace using the jdbc_access protocol and acquires the default jdbc connection from the looked up datasource using the javax.sql.Datasource.getConnection() method. |
void |
connectToDataSource(java.lang.String nsUrl,
java.lang.String nsUser,
java.lang.String nsPasswd,
java.lang.String dsUrl,
java.lang.String user,
java.lang.String passwd)
Deprecated. Looks up a datasource from Oracle 8i namespace using the jdbc_access protocol and acquires the jdbc connection from the looked up datasource using the javax.sql.Datasource.getConnection(String user, String password) method. |
ApplicationModule |
createApplicationModule(java.lang.String defName)
Deprecated. Implementation of the DBTransaction interface. |
ApplicationModule |
createApplicationModule(java.lang.String amName,
java.lang.String defName)
Deprecated. Implementation of the DBTransaction interface. |
java.sql.CallableStatement |
createCallableStatement(java.lang.String str,
int noRowsPrefetch)
Deprecated. Implementation of the DBTransaction interface. |
EntityImpl |
createEntityInstance(EntityDefImpl entityDef,
AttributeList al)
Deprecated. Implementation of the DBTransaction interface. |
EntityImpl |
createEntityInstance(java.lang.String entityDefName,
AttributeList al)
Deprecated. Implementation of the DBTransaction interface. |
java.sql.PreparedStatement |
createPreparedStatement(java.lang.String str,
int noRowsPrefetch)
Deprecated. Implementation of the DBTransaction interface. |
java.lang.Object |
createRef(java.lang.String structName,
byte[] data)
Deprecated. Internal: Applications should not use this method. |
java.sql.Statement |
createStatement(int noRowsPrefetch)
Deprecated. Implementation of the DBTransaction interface. |
ViewLink |
createViewLink(java.lang.String viewLinkDefName,
ViewObject master,
ViewObject detail)
Deprecated. Implementation of the DBTransaction interface. |
ViewLink |
createViewLinkBetweenViewObjects(java.lang.String accessorName,
ViewObject master,
AttributeDef[] srcAttrs,
ViewObject detail,
AttributeDef[] destAttrs,
java.lang.String assocClause)
Deprecated. Implementation of the DBTransaction interface. |
ViewLink |
createViewLinkFromEntityAssocName(java.lang.String entityAssocName,
ViewObject master,
ViewObject detail)
Deprecated. Implementation of the DBTransaction interface. |
ViewObject |
createViewObject(java.lang.String voDefName)
Deprecated. 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)
Deprecated. Implementation of the DBTransaction interface. |
ViewObject |
createViewObjectFromQueryStmt(java.lang.String sqlStatement)
Deprecated. Implementation of the DBTransaction interface. |
ViewObject |
createViewObjectFromQueryStmt(java.lang.String sqlStatement,
java.lang.String voImplClassName)
Deprecated. Implementation of the DBTransaction interface. |
void |
disconnect()
Deprecated. Implementation of the DBTransaction interface. |
void |
disconnect(boolean retainState)
Deprecated. 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)
Deprecated. Implementation of the DBTransaction interface. |
int |
executeCommand(java.lang.String command)
Deprecated. Implementation of the DBTransaction interface. |
ApplicationModule |
findApplicationModule(java.lang.String amName)
Deprecated. Implementation of the DBTransaction interface. |
EntityImpl |
findByPrimaryKey(EntityDefImpl entityDef,
Key key)
Deprecated. Implementation of the DBTransaction interface. |
EntityImpl |
findByPrimaryKey(java.lang.String entityDefName,
Key key)
Deprecated. Implementation of the DBTransaction interface. |
ViewObject |
findViewObject(java.lang.String voName)
Deprecated. Implementation of the DBTransaction interface. |
int |
getBatchPostExceptionThreshold()
Deprecated. Implementation of the DBTransaction interface. |
ConnectionMetadata |
getConnectionMetadata()
Deprecated. Returns a metdata structure that describes the transaction's JDBC connection. |
int |
getDMLOperationTimeOut()
Deprecated. Returns the current Entity Object DML operation time out value. |
int |
getLockingMode()
Deprecated. Implementation of the DBTransaction interface. |
int |
getPostThreshold()
Deprecated. Implementation of the DBTransaction interface. |
ApplicationModule |
getRootApplicationModule()
Deprecated. |
Session |
getSession()
Deprecated. Implementation of the DBTransaction interface. |
SQLBuilder |
getSQLBuilder()
Deprecated. |
TransactionHandler |
getTransactionHandler()
Deprecated. Internal: Applications should not use this method. |
protected ApplicationModuleImpl |
getTxnApplicationModuleImpl()
Deprecated. |
int |
getValidationThreshold()
Deprecated. Implementation of the DBTransaction interface. |
boolean |
isBundledExceptionMode()
Deprecated. Implementation of the DBTransaction interface. |
boolean |
isClearCacheOnCommit()
Deprecated. Returns the flag indicating whether all Entity Object caches will be cleared after the transaction is committed. |
boolean |
isClearCacheOnRollback()
Deprecated. Returns the flag indicating whether all Entity Object caches will be cleared after the transaction is rolled back. |
boolean |
isConnected()
Deprecated. Implementation of the DBTransaction interface. |
boolean |
isConnected(boolean pingDatabase)
Deprecated. |
boolean |
isDirty()
Deprecated. Implementation of the DBTransaction interface. |
boolean |
isLockOptimistic()
Deprecated. Indicates whether the current locking mode is optimistic or not. |
boolean |
isTrackNewAndModifiedRowsOnly()
Deprecated. Implementation of the DBTransaction interface. |
void |
postChanges()
Deprecated. Implementation of the DBTransaction interface. |
void |
reconnect()
Deprecated. Reconnect the application module to the database, if necessary, using previously supplied database credentials. |
void |
reconnect(boolean force)
Deprecated. Implementation of the DBTransaction interface. |
void |
removeChangeSet(int id)
Deprecated. Removes the change set that defines the changes to EntityImpls within a transaction. |
void |
removeTransactionListener(TransactionListener listener)
Deprecated. Implementation of the DBTransaction interface. |
void |
removeTransactionPostListener(TransactionPostListener listener)
Deprecated. Implementation of the DBTransaction interface. |
void |
removeTransactionStateListener(TransactionStateListener tl)
Deprecated. Implementation of the DBTransaction interface. |
void |
removeViewClearCacheListener(ViewClearCacheListener tl)
Deprecated. |
void |
rollback()
Deprecated. Implementation of the DBTransaction interface. |
void |
setBatchPostExceptionThreshold(int count)
Deprecated. Implementation of the DBTransaction interface. |
void |
setBundledExceptionMode(boolean flag)
Deprecated. Implementation of the DBTransaction interface. |
void |
setClearCacheOnCommit(boolean val)
Deprecated. Sets the value of the flag indicating whether all Entity Object caches will be cleared after the transaction is committed. |
void |
setClearCacheOnRollback(boolean val)
Deprecated. Sets the value of the flag indicating whether all Entity Object caches will be cleared after the transaction is rolled back. |
void |
setDMLOperationTimeOut(int timeOutMills)
Deprecated. Sets the query time out value for the Entity Object's DML operations. |
void |
setLockingMode(int mode)
Deprecated. Implementation of the DBTransaction interface. |
void |
setPostThreshold(int count)
Deprecated. Implementation of the DBTransaction interface. |
void |
setTrackNewAndModifiedRowsOnly(boolean flag)
Deprecated. Implementation of the DBTransaction interface. |
void |
setTransactionHandler(TransactionHandler txnHandler)
Deprecated. Internal: Applications should not use this method. |
void |
setValidationThreshold(int count)
Deprecated. Implementation of the DBTransaction interface. |
void |
validate()
Deprecated. 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()
closeTransaction
in interface DBTransaction
NotConnectedConnection
- Always thrown.public void commit()
commit
in interface Transaction
NotConnectedConnection
- Always thrown.TransactionListener.beforeCommit(TransactionEvent)
,
TransactionListener.afterCommit(TransactionEvent)
,
DBTransaction
,
Transaction.postChanges()
public int commitAndSaveChangeSet()
Transaction
This method (along with applyChangeSet
and removeChangeSet
is used to
synchronize the cache between root Application
Module instances in an Application Module pool.
commitAndSaveChangeSet 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 commitAndSaveChangeSet
that represents the change set.
For example, assume you have two root Application Modules, named am1 and am2, in an Application Module pool.
// The line below commits the transaction in am1 and writes the change // set to persistent store (database table). The returning snapId // identifies the (persistent) change set. int snapId = am1.getTransaction().commitAndSaveChangeSet(); // Use that change set and apply the changes to the other Application // Module, am2. That is, apply changes from am1 to am2. am2.getTransaction().applyChangeSet(snapId); // When you are done with the change set, remove (free) it. am1.getTransaction().removeChangeSet(snapId);
commitAndSaveChangeSet
in interface Transaction
EntityImpl
change set in persistent store.Transaction.applyChangeSet(int)
,
Transaction.removeChangeSet(int)
public void applyChangeSet(int id)
Transaction
This method (along with commitAndSaveChangeSet
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
commitAndSaveChangeSet
) 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.
For an example of how to use applyChangeSet, see
commitAndSaveChangeSet
.
applyChangeSet
in interface Transaction
id
- an integer representing the change set to apply to the
transaction.Transaction.commitAndSaveChangeSet()
,
Transaction.removeChangeSet(int)
public void removeChangeSet(int id)
Transaction
This method (along with commitAndSaveChangeSet
and applyChangeSet
is used to
synchronize the cache between root Application
Module instances in an Application Module pool.
For an example of how to use removeChangeSet, see
commitAndSaveChangeSet
.
removeChangeSet
in interface Transaction
id
- an integer representing the change set to remove from the
persistent store.Transaction.commitAndSaveChangeSet()
,
Transaction.applyChangeSet(int)
public void rollback()
rollback
in interface Transaction
NotConnectedConnection
- Always thrown.DBTransaction
,
TransactionListener.afterRollback(TransactionEvent)
,
TransactionListener.beforeRollback(TransactionEvent)
public void postChanges()
postChanges
in interface Transaction
NotConnectedConnection
- Always thrown.Transaction.commit()
public boolean isDirty()
isDirty
in interface Transaction
true
if the local data and the database differ.
NotConnectedConnection
- Always thrown.public void setPostThreshold(int count)
setPostThreshold
in interface DBTransaction
count
- the new threshold value.
NotConnectedConnection
- Always thrown.public int getPostThreshold()
getPostThreshold
in interface DBTransaction
NotConnectedConnection
- Always thrown.public void setValidationThreshold(int count)
setValidationThreshold
in interface DBTransaction
count
- the new threshold value.
NotConnectedConnection
- Always thrown.public int getValidationThreshold()
getValidationThreshold
in interface DBTransaction
NotConnectedConnection
- Always thrown.public void addTransactionListener(TransactionListener listener)
addTransactionListener
in interface DBTransaction
listener
- the subscriber to be added.
NotConnectedConnection
- Always thrown.public void addTransactionListenerNoCheck(TransactionListener listener)
addTransactionListenerNoCheck
in interface DBTransaction
listener
- the subscriber to be added.
NotConnectedConnection
- Always thrown.public void removeTransactionListener(TransactionListener listener)
removeTransactionListener
in interface DBTransaction
listener
- the subscriber to be removed.
NotConnectedConnection
- Always thrown.public void addTransactionPostListener(TransactionPostListener listener)
addTransactionPostListener
in interface DBTransaction
listener
- the subscriber to be added.
NotConnectedConnection
- Always thrown.public void addTransactionPostListenerNoCheck(TransactionPostListener listener)
addTransactionPostListenerNoCheck
in interface DBTransaction
listener
- the subscriber to be added.
NotConnectedConnection
- Always thrown.public void removeTransactionPostListener(TransactionPostListener listener)
removeTransactionPostListener
in interface DBTransaction
NotConnectedConnection
- Always thrown.public java.sql.Statement createStatement(int noRowsPrefetch)
createStatement
in interface DBTransaction
noRowsPrefetch
- the number of rows to prefetch when executing
this statement's query.
NotConnectedConnection
- Always thrown.public java.sql.CallableStatement createCallableStatement(java.lang.String str, int noRowsPrefetch)
createCallableStatement
in interface DBTransaction
str
- the CallableStatement instance's SQL statement.noRowsPrefetch
- the number of rows to prefetch when executing
this statement's query. If this parameter is set to DBTransaction.DEFAULT,
then the default value from the jdbc driver is used.
NotConnectedConnection
- Always thrown.public java.sql.PreparedStatement createPreparedStatement(java.lang.String str, int noRowsPrefetch)
createPreparedStatement
in interface DBTransaction
str
- the PreparedStatement instance's SQL statement.noRowsPrefetch
- the number of rows to prefetch when executing
this statement's query. If this parameter is set to DBTransaction.DEFAULT,
then the default value from the jdbc driver is used.
NotConnectedConnection
- Always thrown.public int executeCommand(java.lang.String command)
executeCommand
in interface Transaction
command
- a valid SQL statement.
NotConnectedConnection
- Always thrown.public java.lang.String dumpQueryResult(java.lang.String query, java.lang.String dumpClassName, java.lang.String[] data)
dumpQueryResult
in interface Transaction
query
- the SQL query statement.dumpClassName
- the class that dumps the result to a string.data
- an array of data items.
NotConnectedConnection
- Always thrown.public void validate()
validate
in interface ValidationManager
validate
in interface Transaction
NotConnectedConnection
- Always thrown.public void addToValidationListeners(ValidationListener w)
addToValidationListeners
in interface ValidationManager
w
- a validation listener.
NotConnectedConnection
- Always thrown.public void connect(java.sql.Connection sqlConnection)
connect
in interface DBTransaction
sqlConnection
- Reqeusts the factory to create a DBTransactionImpl object
from the given ConnectionDBTransaction.connect(Connection)
,
DatabaseTransactionFactory
public void connect(java.lang.String url)
connect
in interface Transaction
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)
connect
in interface Transaction
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)
connect
in interface Transaction
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()
disconnect
in interface Transaction
NotConnectedConnection
- Always thrown.public boolean isConnected()
isConnected
in interface Transaction
public void reconnect(boolean force)
reconnect
in interface Transaction
force
- force a reconnect, should usually be false.
NotConnectedConnection
- Always thrown.public void setLockingMode(int mode)
setLockingMode
in interface Transaction
mode
- one of LOCK_PESSIMISTIC, LOCK_OPTIMISTIC
or LOCK_NONE.
NotConnectedConnection
- Always thrown.public int getLockingMode()
getLockingMode
in interface Transaction
NotConnectedConnection
- Always thrown.public boolean isLockOptimistic()
DBTransaction
isLockOptimistic
in interface DBTransaction
true
if the locking mode is LOCK_OPTIMISTIC
or LOCK_OPTUPDATE
.public TransactionHandler getTransactionHandler()
DBTransaction
getTransactionHandler
in interface DBTransaction
public void setTransactionHandler(TransactionHandler txnHandler)
DBTransaction
setTransactionHandler
in interface DBTransaction
public EntityImpl createEntityInstance(EntityDefImpl entityDef, AttributeList al)
createEntityInstance
in interface DBTransaction
entityDef
- the defintion to to be used to create the instance.al
- an attribute list to be passed to the new instance's
create() method.
NotConnectedConnection
- Always thrown.public EntityImpl createEntityInstance(java.lang.String entityDefName, AttributeList al)
createEntityInstance
in interface DBTransaction
entityDefName
- the name of the defintion to to be used to create the instance.al
- an attribute list to be passed to the new instance's
create() method.
NotConnectedConnection
- Always thrown.public EntityImpl findByPrimaryKey(EntityDefImpl entityDef, Key key)
findByPrimaryKey
in interface DBTransaction
entityDef
- the defintion to to be used to find the instance.key
- the Primary Key.
NotConnectedConnection
- Always thrown.public EntityImpl findByPrimaryKey(java.lang.String entityDefName, Key key)
findByPrimaryKey
in interface DBTransaction
entityDefName
- the name of the defintion to to be used to find the instance.key
- the Primary Key.
NotConnectedConnection
- Always thrown.public ApplicationModule createApplicationModule(java.lang.String amName, java.lang.String defName)
createApplicationModule
in interface DBTransaction
amName
- the name to be given to the Application Module.
If amName
is empty, a name is generated.defName
- the name of the Application Module definition to be used.
If null
a default definition is used.
NotConnectedConnection
- Always thrown.public ApplicationModule findApplicationModule(java.lang.String amName)
findApplicationModule
in interface DBTransaction
amName
- the name of the Application Module.
NotConnectedConnection
- Always thrown.public ViewObject createViewObject(java.lang.String voDefName)
createViewObject
in interface DBTransaction
voDefName
- the name of the defintion to to be used to create the instance.
NotConnectedConnection
- Always thrown.public ViewObject createViewObjectFromQueryClauses(java.lang.String eoName, java.lang.String selectClause, java.lang.String fromClause, java.lang.String whereClause, java.lang.String orderByClause)
createViewObjectFromQueryClauses
in interface DBTransaction
eoName
- the name of a EntityObject
beaninfo class.selectClause
- an SQL statement SELECT clause.fromClause
- an SQL statement FROM clause.whereClause
- an SQL statement WHERE clause.orderByClause
- an SQL statement ORDERBY clause.
NotConnectedConnection
- Always thrown.public ViewObject createViewObjectFromQueryStmt(java.lang.String sqlStatement)
createViewObjectFromQueryStmt
in interface DBTransaction
sqlStatement
- a SQL statement.
NotConnectedConnection
- Always thrown.public ViewObject createViewObjectFromQueryStmt(java.lang.String sqlStatement, java.lang.String voImplClassName)
createViewObjectFromQueryStmt
in interface DBTransaction
sqlStatement
- a SQL statement.voImplClassName
- a class name that is a subclass of the
oracle.jbo.server.ViewObjectImpl
framework class.
NotConnectedConnection
- Always thrown.public ViewObject findViewObject(java.lang.String voName)
findViewObject
in interface DBTransaction
voName
- the name of the view object.
null
if the view object
is not found.
NotConnectedConnection
- Always thrown.public ApplicationModule createApplicationModule(java.lang.String defName)
createApplicationModule
in interface DBTransaction
defName
- the name of the Application Module definition to be used.
If null
a default definition is used.
NotConnectedConnection
- Always thrown.public ViewLink createViewLink(java.lang.String viewLinkDefName, ViewObject master, ViewObject detail)
createViewLink
in interface DBTransaction
viewLinkDefName
- the name of the definition to be used to create the link.
If empty a default definition will be used.master
- the link's source.detail
- the link's destination.
NotConnectedConnection
- Always thrown.public ViewLink createViewLinkFromEntityAssocName(java.lang.String entityAssocName, ViewObject master, ViewObject detail)
createViewLinkFromEntityAssocName
in interface DBTransaction
entityAssocName
- the entity association that the View Link will represent.master
- the link's source.detail
- the link's destination.
NotConnectedConnection
- Always thrown.public ViewLink createViewLinkBetweenViewObjects(java.lang.String accessorName, ViewObject master, AttributeDef[] srcAttrs, ViewObject detail, AttributeDef[] destAttrs, java.lang.String assocClause)
createViewLinkBetweenViewObjects
in interface DBTransaction
accessorName
- the name to be given to the View Link's accessor.master
- the link's source.srcAttrs
- link attributes taken from the master View Object.detail
- the link's destination.destAttrs
- link attributes taken from the detail View Object.
NotConnectedConnection
- Always thrown.public void addWarning(JboWarning warn)
addWarning
in interface DBTransaction
warn
- a warning message.
NotConnectedConnection
- Always thrown.public Session getSession()
getSession
in interface DBTransaction
NotConnectedConnection
- Always thrown.public SQLBuilder getSQLBuilder()
getSQLBuilder
in interface DBTransaction
public ConnectionMetadata getConnectionMetadata()
Transaction
getConnectionMetadata
in interface Transaction
public boolean isClearCacheOnCommit()
Transaction
After the transaction is committed, the value of this flag is
used to determine whether the Entity Object caches are cleared or
not. If this flag value is false
, the cache contents
are kept. In this case, the cache may contain data that is stale
in that it does not match the newest data (changes made by another
user and committed).
If this flag is true
, the caches are cleared after
the transaction is committed. When the user brings in data
by traversing row collection, the latest data from the database
will be brought into Entity caches.
isClearCacheOnCommit
in interface Transaction
RowSet.executeQuery()
,
Transaction.setClearCacheOnCommit(boolean)
public void setClearCacheOnCommit(boolean val)
Transaction
The initial value of this flag is retrieved from the Application
Module definition of the root Application Module (an XML attribute
value named "ClearCacheOnCommit" in the Application Module definition's
XML file). If the Application Module definition does not contain
the initial value, the default value is false
, i.e.,
the caches are kept after commit.
The user can override the value of this flag for this Transaction by calling this method. Calling this method does not affect the initial value in the Application Module definition.
setClearCacheOnCommit
in interface Transaction
val
- the new value of the clear-cache-on-commit flag.
true indicates that the Entity Object caches
will be cleared after commit.Transaction.isClearCacheOnCommit()
public boolean isClearCacheOnRollback()
Transaction
After the transaction is rolled back, the value of this flag is
used to determine whether the Entity Object caches are cleared or
not. If this flag value is false
, the cache contents
are kept. In this case, the cache may contain data that is not in
sync with database in that uncommitted changes made this by user
(before the transaction was rolled back) will be kept.
If this flag is true
, the caches are cleared after
the transaction is rolled back. When the user brings in data
by traversing row collection, the latest data from the database
will be brought into Entity caches.
isClearCacheOnRollback
in interface Transaction
RowSet.executeQuery()
,
Transaction.setClearCacheOnRollback(boolean)
public void setClearCacheOnRollback(boolean val)
Transaction
The initial value of this flag is retrieved from the Application
Module definition of the root Application Module (an XML attribute
value named "ClearCacheOnRollback" in the Application Module definition's
XML file). If the Application Module definition does not contain
the initial value, the default value is true
, i.e.,
the caches are cleared after rollback.
The user can override the value of this flag for this Transaction by calling this method. Calling this method does not affect the initial value in the Application Module definition.
setClearCacheOnRollback
in interface Transaction
val
- the new value of the clear-cache-on-roll-back flag.
true indicates that the Entity Object caches
will be cleared after rollback, and will be
refreshed with new data from the database.Transaction.isClearCacheOnRollback()
public java.lang.Object createRef(java.lang.String structName, byte[] data)
Transaction
createRef
in interface Transaction
public void clearEntityCache(java.lang.String entityName)
Transaction
clearEntityCache
in interface Transaction
entityName
- the name of the entity whose cache is to
be cleared. If null
, caches
for all entities are cleared.public void reconnect()
reconnect
in interface DBTransaction
reconnect
in interface Transaction
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.
disconnect
in interface DBTransaction
disconnect
in interface Transaction
public void connectToDataSource(java.lang.String nsUrl, java.lang.String nsUser, java.lang.String nsPasswd, java.lang.String dsUrl)
Transaction
connectToDataSource
in interface Transaction
nsUrl
- Url to the jndi namespace where the datasource is boundnsUser
- User name that is used to access the namespace.nsPasswd
- nsUsers' passwddsUrl
- Datasource name as bound in the namespace.
Name can be the fully qaultified url such as
jdbc_access://test/ds/db1 otherwise the
the url prefix jdbc_acess:// is prepended to the
datasource name for lookup.public void connectToDataSource(java.lang.String nsUrl, java.lang.String nsUser, java.lang.String nsPasswd, java.lang.String dsUrl, java.lang.String user, java.lang.String passwd)
Transaction
connectToDataSource
in interface Transaction
nsUrl
- Url to the jndi namespace where the datasource is boundnsUser
- User name that is used to access the namespace.nsPasswd
- nsUsers' passwddsUrl
- Datasource name as bound in the namespace.
Name can be the fully qaultified url such as
jdbc_access://test/ds/db1 otherwise the
the url prefix jdbc_acess:// is prepended to the
datasource name for lookup.user
- Username for which the connection is acquired from the datasourcepasswd
- User's password.public void connectToDataSource(javax.sql.DataSource ds, boolean isJTAbased)
connectToDataSource
in interface DBTransaction
public void connectToDataSource(javax.sql.DataSource ds, java.lang.String user, java.lang.String passwd, boolean isJTAbased)
connectToDataSource
in interface DBTransaction
public void connectToDataSource(java.util.Hashtable env, java.lang.String dsName, java.lang.String user, java.lang.String passwd, boolean isJTABased)
Transaction
connectToDataSource
in interface Transaction
env
- Envirionment used the create initial context.
May be null.dsName
- Datasource name as bound in the namespace.user
- Username for which the connection is acquired from the datasourcepasswd
- User's password.isJTABased
- True if datasource is XADataSource implementation.
If true, the tranasction is assumed to be controlled
by an external transaction manager.public void connectToDataSource(java.util.Hashtable env, java.lang.String dsName, boolean isJTABased)
Transaction
connectToDataSource
in interface Transaction
env
- Envirionment used the create initial context.
May be null.dsName
- Datasource name as bound in the namespace.isJTABased
- True if datasource is XADataSource implementation.
If true, the tranasction is assumed to be controlled
by an external transaction manager.public void setBundledExceptionMode(boolean flag)
setBundledExceptionMode
in interface Transaction
NotConnectedConnection
- Always thrown.public final boolean isBundledExceptionMode()
isBundledExceptionMode
in interface Transaction
NotConnectedConnection
- Always thrown.protected ApplicationModuleImpl getTxnApplicationModuleImpl()
public ApplicationModule getRootApplicationModule()
getRootApplicationModule
in interface DBTransaction
public void addTransactionStateListener(TransactionStateListener tl)
addTransactionStateListener
in interface Transaction
NotConnectedConnection
- Always thrown.public void removeTransactionStateListener(TransactionStateListener tl)
removeTransactionStateListener
in interface Transaction
NotConnectedConnection
- Always thrown.public void addViewClearCacheListener(ViewClearCacheListener tl)
addViewClearCacheListener
in interface Transaction
public void removeViewClearCacheListener(ViewClearCacheListener tl)
removeViewClearCacheListener
in interface Transaction
public void setTrackNewAndModifiedRowsOnly(boolean flag)
setTrackNewAndModifiedRowsOnly
in interface DBTransaction
NotConnectedConnection
- Always thrown.public boolean isTrackNewAndModifiedRowsOnly()
isTrackNewAndModifiedRowsOnly
in interface DBTransaction
NotConnectedConnection
- Always thrown.public int getBatchPostExceptionThreshold()
getBatchPostExceptionThreshold
in interface DBTransaction
NotConnectedConnection
- Always thrown.DBTransaction.setBatchPostExceptionThreshold(int)
public void setBatchPostExceptionThreshold(int count)
setBatchPostExceptionThreshold
in interface DBTransaction
NotConnectedConnection
- Always thrown.public boolean isConnected(boolean pingDatabase)
isConnected
in interface DBTransaction
public int getDMLOperationTimeOut()
Transaction
DML_OPERATION_TIMEOUT_WAIT_FOREVER
.
getDMLOperationTimeOut
in interface Transaction
public void setDMLOperationTimeOut(int timeOutMills)
Transaction
DML_OPERATION_TIMEOUT_WAIT_FOREVER
(-1),
which means that the DML operations will not time out. The user will be able to
cancel the long running operations by calling cancelDMLOperations()
started by this Transaction
during postChanges
.
If a positive value of timeout is specified the operation is monitored by a
global monitor thread. The monitor thread waits the specified amount of time
(approximately) in milli-seconds, and cancels the operation by
calling JDBC's Statement.cancel()
.
setDMLOperationTimeOut
in interface Transaction
timeOutMills
- if non-negative, number of milli-seconds before the
DML operation is timed out.public boolean cancelDMLOperations()
Transaction
cancelDMLOperations
in interface Transaction
false
is returned if a DML cancel fails.
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Model 11g Release 1 (11.1.1.7.0) E10653-08 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |