public class DBTransactionImpl2 extends DBTransactionImpl
 Implementation of DBTransaction interface for representing
 both "connected" and "not connected"  state.
 In pre 9.0.3 versions the disconnected and connected state implementation was
 provided by NullDBTransactionImpl and DBTransactionImpl respectivey.
 DBTransactionImpl instance was created
 only when clients initiated the acquisition of a jdbc connection by calling
 the one of Transaction.connect() or Transaction.connectToDataSource() methods.
 
DatabaseTransactionFactoryMAX_CURSORS_UNINITIALIZED, mConnectionCredentials, mDMLOperationTimeOut, mInternalCredentials, mLongRunningDMLOperationHandles, mSQLBuilder, mTxnListeners, POST_ABORT_ON_FIRST_EXCEPTION, POST_ALL_NO_RESET_ON_EXCEPTION, POST_ALL_RESET_ON_EXCEPTIONDEFAULTDML_OPERATION_TIMEOUT_WAIT_FOREVER, LOCK_NONE, LOCK_OPTIMISTIC, LOCK_OPTUPDATE, LOCK_PESSIMISTIC| Constructor and Description | 
|---|
| DBTransactionImpl2() | 
| Modifier and Type | Method and Description | 
|---|---|
| void | connect(java.sql.Connection sqlConnection)Implementation of  connectmethod. | 
| void | connect(java.lang.String url)Implementation of  connectmethod. | 
| void | connect(java.lang.String url,
       java.util.Properties info)Implementation of  connectmethod. | 
| void | connect(java.lang.String url,
       java.lang.String user,
       java.lang.String password)Implementation
 of  connectmethod. | 
| void | connectToDataSource(javax.sql.DataSource ds,
                   boolean isJTAbased)Implementation of  connectToDataSourcemethod. | 
| void | connectToDataSource(javax.sql.DataSource ds,
                   java.lang.String user,
                   java.lang.String passwd,
                   boolean isJTAbased)Implementation of  connectToDataSourcemethod. | 
| void | connectToDataSource(java.util.Hashtable env,
                   java.lang.String dsName,
                   boolean isJTABased)Implementation
 of  connectToDataSourcemethod. | 
| void | connectToDataSource(java.util.Hashtable env,
                   java.lang.String dsName,
                   java.lang.String user,
                   java.lang.String passwd,
                   boolean isJTABased)Implementation
 of  connectToDataSourcemethod. | 
| void | connectToDataSource(java.lang.String nsUrl,
                   java.lang.String nsUser,
                   java.lang.String nsPasswd,
                   java.lang.String dsUrl)Deprecated. 
 Since Jdeveloper 9.0.2 | 
| 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. 
 Since Jdeveloper 9.0.2 | 
| java.sql.CallableStatement | createCallableStatement(java.lang.String str,
                       int noRowsPrefetch)Implementation of  createCallableStatementmethod. | 
| EntityImpl | createEntityInstance(EntityDefImpl entityDef,
                    AttributeList al)Implementation of  createEntityInstancemethod. | 
| EntityImpl | createEntityInstance(java.lang.String entityDefName,
                    AttributeList al)Implementation of  createEntityInstancemethod. | 
| java.sql.PreparedStatement | createPreparedStatement(java.lang.String str,
                       int noRowsPrefetch)Implementation of  createPreparedStatementmethod. | 
| java.lang.Object | createRef(java.lang.String structName,
         byte[] data)Checks to see if jdbc connection was acquired. | 
| java.sql.Statement | createStatement(int noRowsPrefetch)Implementation of  createStatementmethod. | 
| ViewObject | createViewObjectFromQueryClauses(java.lang.String eoName,
                                java.lang.String selectClause,
                                java.lang.String fromClause,
                                java.lang.String whereClause,
                                java.lang.String orderByClause)Implementation of  createViewObjectFromQueryClausesmethod. | 
| ViewObject | createViewObjectFromQueryStmt(java.lang.String sqlStatement)Implementation of  createViewObjectFromQueryStmtmethod. | 
| ViewObject | createViewObjectFromQueryStmt(java.lang.String sqlStatement,
                             java.lang.String voImplClassName)Implementation of  createViewObjectFromQueryStmtmethod. | 
| void | disconnect(boolean retainState)Implementation of  disconnectmethod. | 
| EntityImpl | findByPrimaryKey(EntityDefImpl entityDef,
                Key key)Implementation of  findByPrimaryKeymethod. | 
| EntityImpl | findByPrimaryKey(java.lang.String entityDefName,
                Key key)Implementation of  findByPrimaryKeymethod. | 
| ViewObject | findViewObject(java.lang.String voName)Implementation of  findViewObjectmethod. | 
| java.sql.Timestamp | getCurrentDbTime()Checks to see if jdbc connection was acquired. | 
| void | reconnectToDataSource() | 
addLongRunningDMLOperationHandle, addToValidationListeners, addTransactionListener, addTransactionListenerNoCheck, addTransactionPostListener, addTransactionPostListenerNoCheck, addTransactionStateListener, addViewClearCacheListener, addWarning, applyChangeSet, cancelDMLOperations, checkConnected, clearEntityCache, closeTransaction, commit, commitAndSaveChangeSet, createApplicationModule, createApplicationModule, createViewLink, createViewLinkBetweenViewObjects, createViewLinkFromEntityAssocName, createViewObject, diagCleanURL, disconnect, doAfterCommit, doBeforeCommit, doCommit, doRollback, doValidatePostChanges, dumpEntityCaches, dumpQueryResult, executeCommand, findApplicationModule, findEntityCache, getActiveApplicationModuleImpls, getBatchPostExceptionThreshold, getConnectionMetadata, getDMLOperationTimeOut, getEntityCache, getJdbcConnection, getLockingMode, getPersistManagerConnection, getPostChangesFlag, getPostThreshold, getRootApplicationModule, getSession, getSQLBuilder, getSyncLock, getTransactionHandler, getTransactionListenersList, getTransactionPostListenersList, getTransactionState, getTransAttrValidationList, getTransAttrValidationManager, getTransAttrValidations, getTransValidationList, getTransValidationManager, getTransValidations, getTxnApplicationModuleImpl, getValidationListenersList, getValidationThreshold, hasRollbackSavePoint, isBundledExceptionMode, isClearCacheOnCommit, isClearCacheOnRollback, isConnected, isConnected, isDirty, isForceDeferValidation, isLockOptimistic, isTrackNewAndModifiedRowsOnly, lookupEntityCache, postChanges, postChanges, putTransAttrValEntry, putTransValEntry, reconnect, reconnect, removeChangeSet, removeEntityCache, removeEntityCacheByName, removeLongRunningDMLOperationHandle, removeTransactionListener, removeTransactionPostListener, removeTransactionStateListener, removeViewClearCacheListener, rollback, setBatchModeForEntity, setBatchPostExceptionThreshold, setBundledExceptionMode, setClearCacheOnCommit, setClearCacheOnRollback, setDMLOperationTimeOut, setForceDeferValidation, setLockingMode, setPostChangesFlag, setPostThreshold, setTrackNewAndModifiedRowsOnly, setTransactionHandler, setValidationThreshold, showCursorUsage, validatepublic void reconnectToDataSource()
public void connect(java.sql.Connection sqlConnection)
connect
 method.connect in interface DBTransactionconnect in class DBTransactionImplAlreadyConnectedException - if the jdbc connection has already been acquired.public void connect(java.lang.String url)
connect method.connect in interface Transactionconnect in class DBTransactionImplurl - a database url of the form jdbc:subprotocol:subname.AlreadyConnectedException - if the jdbc connection has already been acquired.public void connect(java.lang.String url,
           java.util.Properties info)
connect
 method.connect in interface Transactionconnect in class DBTransactionImplurl - a database url of the form jdbc:subprotocol:subname.info - a list of arbitrary string tag/value pairs to be used as
 connection arguments. Normally, at least "user" and
 "password" properties should be included.AlreadyConnectedException - if the jdbc connection has already been acquired.public void connect(java.lang.String url,
           java.lang.String user,
           java.lang.String password)
connect
 method.connect in interface Transactionconnect in class DBTransactionImplurl - a database url of the form jdbc:subprotocol:subname.user - the database user on whose behalf the connection is being made.password - the user's password.AlreadyConnectedException - if the jdbc connection has already been acquired.public void connectToDataSource(java.lang.String nsUrl,
                       java.lang.String nsUser,
                       java.lang.String nsPasswd,
                       java.lang.String dsUrl)
TransactionconnectToDataSource in interface TransactionconnectToDataSource in class DBTransactionImplnsUrl - 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.AlreadyConnectedException - if the jdbc connection has already been acquired.java.lang.UnSupportedOperationException - if not connected.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)
TransactionconnectToDataSource in interface TransactionconnectToDataSource in class DBTransactionImplnsUrl - 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.AlreadyConnectedException - if the jdbc connection has already been acquired.java.lang.UnSupportedOperationException - if not connected.public void connectToDataSource(javax.sql.DataSource ds,
                       boolean isJTAbased)
connectToDataSource
 method.connectToDataSource in interface DBTransactionconnectToDataSource in class DBTransactionImplAlreadyConnectedException - if the jdbc connection has already been acquired.public void connectToDataSource(javax.sql.DataSource ds,
                       java.lang.String user,
                       java.lang.String passwd,
                       boolean isJTAbased)
connectToDataSource
 method.connectToDataSource in interface DBTransactionconnectToDataSource in class DBTransactionImplAlreadyConnectedException - if the jdbc connection has already been acquired.public void connectToDataSource(java.util.Hashtable env,
                       java.lang.String dsName,
                       java.lang.String user,
                       java.lang.String passwd,
                       boolean isJTABased)
connectToDataSource
 method.connectToDataSource in interface TransactionconnectToDataSource in class DBTransactionImplenv - 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.AlreadyConnectedException - if the jdbc connection has already been acquired.public void connectToDataSource(java.util.Hashtable env,
                       java.lang.String dsName,
                       boolean isJTABased)
connectToDataSource
 method.connectToDataSource in interface TransactionconnectToDataSource in class DBTransactionImplenv - 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.AlreadyConnectedException - if the jdbc connection has already been acquired.public void disconnect(boolean retainState)
disconnect
 method.disconnect in interface DBTransactiondisconnect in interface Transactiondisconnect in class DBTransactionImplpublic java.sql.Statement createStatement(int noRowsPrefetch)
createStatement
 method.createStatement in interface DBTransactioncreateStatement in class DBTransactionImplnoRowsPrefetch - the number of rows to prefetch when executing
 this statement's query.NotConnectedException - if no jdbc connection was acquiredpublic java.sql.CallableStatement createCallableStatement(java.lang.String str,
                                                 int noRowsPrefetch)
createCallableStatement
 method.createCallableStatement in interface DBTransactioncreateCallableStatement in class DBTransactionImplstr - 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.NotConnectedException - if no jdbc connection was acquiredpublic java.sql.PreparedStatement createPreparedStatement(java.lang.String str,
                                                 int noRowsPrefetch)
createPreparedStatement
 method.createPreparedStatement in interface DBTransactioncreatePreparedStatement in class DBTransactionImplstr - 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.NotConnectedException - if no jdbc connection was acquiredpublic EntityImpl createEntityInstance(EntityDefImpl entityDef, AttributeList al)
createEntityInstance
 method.createEntityInstance in interface DBTransactioncreateEntityInstance in class DBTransactionImplentityDef - the EntityDef defintion to use to create the EntityImpl.al - attribute list to pass to the create() method on the
 EntityImpl.NotConnectedException - if no jdbc connection was acquiredpublic EntityImpl createEntityInstance(java.lang.String entityDefName, AttributeList al)
createEntityInstance
 method.createEntityInstance in interface DBTransactioncreateEntityInstance in class DBTransactionImplentityDefName - the String name of entity defintion to use to create the EntityImpl.al - attribute list to pass to the create method on the
 EntityImpl.NotConnectedException - if no jdbc connection was acquiredpublic EntityImpl findByPrimaryKey(EntityDefImpl entityDef, Key key)
findByPrimaryKey
 method.findByPrimaryKey in interface DBTransactionfindByPrimaryKey in class DBTransactionImplentityDef - the Entity Def object to to be used to find the instance.key - the Primary Key.NotConnectedException - if no jdbc connection was acquiredpublic EntityImpl findByPrimaryKey(java.lang.String entityDefName, Key key)
findByPrimaryKey
 method.findByPrimaryKey in interface DBTransactionfindByPrimaryKey in class DBTransactionImplentityDefName - the name of the defintion to to be used to find the instance.key - the Primary Key.NotConnectedException - if no jdbc connection was acquiredpublic ViewObject createViewObjectFromQueryClauses(java.lang.String eoName, java.lang.String selectClause, java.lang.String fromClause, java.lang.String whereClause, java.lang.String orderByClause)
createViewObjectFromQueryClauses
 method.createViewObjectFromQueryClauses in interface DBTransactioncreateViewObjectFromQueryClauses in class DBTransactionImpleoName - 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.NotConnectedException - if no jdbc connection was acquiredpublic ViewObject createViewObjectFromQueryStmt(java.lang.String sqlStatement)
createViewObjectFromQueryStmt
 method.createViewObjectFromQueryStmt in interface DBTransactioncreateViewObjectFromQueryStmt in class DBTransactionImplsqlStatement - a SQL statement.NotConnectedException - if no jdbc connection was acquiredpublic ViewObject createViewObjectFromQueryStmt(java.lang.String sqlStatement, java.lang.String voImplClassName)
createViewObjectFromQueryStmt
 method.createViewObjectFromQueryStmt in interface DBTransactioncreateViewObjectFromQueryStmt in class DBTransactionImplsqlStatement - a SQL statement.voImplClassName - the name of a subclass of oracle.jbo.server.ViewObjectImplNotConnectedException - if no jdbc connection was acquiredpublic ViewObject findViewObject(java.lang.String voName)
findViewObject
 method.findViewObject in interface DBTransactionfindViewObject in class DBTransactionImplvoName - the name of the view object.null if the view object
         is not found.NotConnectedException - if no jdbc connection was acquiredpublic java.lang.Object createRef(java.lang.String structName,
                         byte[] data)
createRef in interface TransactioncreateRef in class DBTransactionImplNotConnectedException - if no jdbc connection was acquiredpublic java.sql.Timestamp getCurrentDbTime()
getCurrentDbTime in class DBTransactionImplNotConnectedException - if no jdbc connection was acquired