|
Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client 11g Release 1 (11.1.1) E17503-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DBTransaction
Field Summary | |
---|---|
static int |
DEFAULT
interface constant to inicate that row prefetch should be left as driver default |
Fields inherited from interface oracle.jbo.Transaction |
---|
DML_OPERATION_TIMEOUT_WAIT_FOREVER, LOCK_NONE, LOCK_OPTIMISTIC, LOCK_OPTUPDATE, LOCK_PESSIMISTIC |
Method Summary | |
---|---|
void |
addTransactionListener(TransactionListener listener)
Adds a listener to the transaction's list of event subscribers. |
void |
addTransactionListenerNoCheck(TransactionListener listener)
Adds a listener to the transaction's event subscribers list, without checking whether the listener is already on the list. |
void |
addTransactionPostListener(TransactionPostListener listener)
Adds a listener to the transaction's list of post-phase event subscribers. |
void |
addTransactionPostListenerNoCheck(TransactionPostListener listener)
|
void |
commit()
Commits all changes in this transaction to the database |
void |
connect(ConnectionDetails metaData)
Attempts to establish a connection to a database identified by a URL. |
PreparedStatement |
createPreparedStatement(java.lang.String sql)
Create a PreparedStatement object to efficiently execute multiple queries |
PreparedStatement |
createPreparedStatement(java.lang.String str,
int noRowsPrefetch)
Creates a JDBC PreparedStatement instance. |
Statement |
createStatement()
Create a Statement object to execute SQL queries |
Statement |
createStatement(int noRowsPrefetch)
Creates a JDBC Statement instance. |
ViewObject |
createViewObjectFromQueryClauses(java.lang.String eoName,
java.lang.String selectClause,
java.lang.String fromClause,
java.lang.String whereClause,
java.lang.String orderByClause)
Creates an updatable View Object. |
void |
disconnect()
Closes the JDBC connection object and removes this transaction from the root application module. |
ApplicationModule |
getRootApplicationModule()
|
SQLBuilder |
getSQLBuilder()
|
TransactionHandler |
getTransactionHandler()
Internal: Applications should not use this method. |
int |
getValidationThreshold()
Gets the threshold value for the commit-cycle's validation phase. |
boolean |
isConnected()
Checks if the transaction is connected to the database |
boolean |
isTrackNewAndModifiedRowsOnly()
Advanced: Most applications should not use this method |
void |
reconnect()
Re-establish the transaction JDBC connection using previously supplied database credentials. |
void |
removeTransactionListener(TransactionListener listener)
Removes the listener from the transactions list of event subscribers. |
void |
removeTransactionPostListener(TransactionPostListener listener)
Removes a listener from the transaction's list of post-phase event subscribers. |
void |
setValidationThreshold(int count)
Sets the threshold value for the commit-cycle's validation phase. |
Methods inherited from interface oracle.jbo.server.ValidationManager |
---|
addToValidationListeners, validate |
Field Detail |
---|
static final int DEFAULT
Method Detail |
---|
void connect(ConnectionDetails metaData)
isConnected
to see if the connection was successful.
metaData
- Defines connection parameters such as username, database namevoid disconnect()
Transaction
disconnect
in interface Transaction
ViewObject createViewObjectFromQueryClauses(java.lang.String eoName, java.lang.String selectClause, java.lang.String fromClause, java.lang.String whereClause, java.lang.String orderByClause)
The View Object is constructed from an Entity Object and parts of a SQL statement.
The caller should invoke remove() to dispose of the instance.
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.boolean isConnected()
isConnected
in interface Transaction
void reconnect()
reconnect
in interface Transaction
void setValidationThreshold(int count)
When commit()
is invoked the framework attempts to validate
the transaction's modifications, making count attempts before
failing with an exception. This mechanism allows applications to update
data in the cache within the validation phase, and validate them
before they are posted.
count
- the new threshold value.int getValidationThreshold()
void addTransactionListener(TransactionListener listener)
Listeners are notified of commit and rollback events spawned by the commit()
or
rollback()
methods. The framework adds modified top-level Entity Objects to
this list.
listener
- the subscriber to be added.void addTransactionListenerNoCheck(TransactionListener listener)
Listeners are notified of commit and rollback events spawned by the commit()
or
rollback()
methods. The framework adds modified top-level Entity Objects to
this list.
listener
- the subscriber to be added.void removeTransactionListener(TransactionListener listener)
listener
- the subscriber to be removed.Statement createStatement()
PreparedStatement createPreparedStatement(java.lang.String sql)
sql
- Parameterized SQL query
void commit()
commit
in interface Transaction
TransactionListener.beforeCommit(TransactionEvent)
,
TransactionListener.afterCommit(TransactionEvent)
,
DBTransaction
,
Transaction.postChanges()
SQLBuilder getSQLBuilder()
void addTransactionPostListener(TransactionPostListener listener)
Listeners are notified of events spawned by the postChanges()
method. The
framework adds modified top-level Entity Objects to this list.
listener
- the subscriber to be added.void removeTransactionPostListener(TransactionPostListener listener)
boolean isTrackNewAndModifiedRowsOnly()
Returns true if this transaction allows entities to be in STATUS_INITIALIZED state.
ApplicationModule getRootApplicationModule()
Statement createStatement(int noRowsPrefetch)
Applications may use this method to create a JDBC statement object to execute application specific SQL statements directly, so that the modifications are committed to the database in a single transaction through this object.
noRowsPrefetch
- the number of rows to prefetch when executing this statement's query.
TransactionHandler getTransactionHandler()
PreparedStatement createPreparedStatement(java.lang.String str, int noRowsPrefetch)
Applications may use this method to create a JDBC callable statement object to execute application specific SQL statements directly, so that the modifications are committed to the database in a single transaction through this object.
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.
void addTransactionPostListenerNoCheck(TransactionPostListener listener)
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client 11g Release 1 (11.1.1) E17503-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |