|
Oracle Fusion Middleware Java API Reference for Oracle ADF Model 11g Release 1 (11.1.1.5.0) E10653-06 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.adfinternal.model.adapter.toplink.TransactionBroker
public abstract class TransactionBroker
Purpose: Transactional unti used by all TopLinkDataControls that share common deployment resources in a given application context
Description: Defines the transactional behavior and boundaries for a given instance of a TopLink application in ADF and brokers these transactional properties between all TopLinkDataControls in this application instance. This transactional behavior includes operations such as: create, delete, update, query execution, commit, and rollback. The transactional boundaries of a given application are defined by the application BindingContext instance and extend to all TopLinDataControl which share a common binding context and TopLink deployment and data access resources.
oracle.adf.model.adapter.toplink.TopLinkDataControl
Field Summary | |
---|---|
protected static int |
CLIENT_SESSION_BROKER_TYPE Defines this instance as a three tier user of a TopLink Client SessionBroker per application instance. |
protected static int |
CLIENT_SESSION_TYPE Defines this TransactionBroker as three tier user of a TopLink ClientSession per application instance. |
protected static int |
ISOLATED_DATABASE_SESSION_TYPE Defines this TransactionBroker as using a DatabaseSession per application instance. |
protected static int |
SHARED_DATABASE_SESSION_TYPE Defines this TransactionBroker as using a shared DatabaseSession across all application instances. |
protected static int |
SHARED_SESSION_BROKER_TYPE Defines this TransactionBroker as using a shared SessionBroker across all application instances. |
protected boolean |
shouldPerformDeletesFirst determine if deletes should be performed first upon commit |
Constructor Summary | |
---|---|
protected |
TransactionBroker(oracle.toplink.sessions.Session session, int brokerType, boolean shouldPerformDeletesFirst, boolean shouldSequenceOnCreate) Creates a new TransactionBroker instance. |
Method Summary | |
---|---|
protected void |
commitTransaction() Commits the UnitOfWork and all changes associated with this TransactionBroker. |
java.lang.Object |
createEntity(java.lang.Class objectType) Creates a new object instance based upon the given class type to be created in this transaction. |
java.lang.Object |
createEntity(java.lang.Class objectType, boolean assignSequenceNumber) Creates a new object instance based upon the given class type to be created in this transaction. |
java.lang.Object |
deleteEntity(java.lang.Object entity) Marks the given object to be deleted in this transaction. |
protected java.lang.Object |
executeQuery(java.lang.String queryName, java.util.Map parameters) Executes the defined TopLink query based upon the given class, query name, and parameters. |
protected java.lang.Object |
executeQuery(java.lang.String beanClass, java.lang.String queryName, java.util.Vector queryParameters) Executes the defined TopLink query based upon the given class, query name, and parameters. |
oracle.toplink.sessions.Session |
getSession() Returns the Session associated with this transaction. |
abstract oracle.toplink.sessions.UnitOfWork |
getUnitOfWork() Returns the UnitOfWork associated with this transaction. |
protected void |
initialize(oracle.toplink.sessions.Session session, int brokerType, boolean shouldPerformDeletesFirst, boolean shouldSequenceOnCreate) Initializes based constructor parameters. |
protected boolean |
isQuery(java.lang.String operationName) Indicates whether the given operation name represents a query defined in the TopLink Project. |
protected boolean |
isTransactionDirty() Returns true if the underlying UnitOfWork has ChangeSets. |
java.lang.Object |
registerEntity(java.lang.Object entity) Registers the given object in this transaction. |
java.lang.Object |
registerNewEntity(java.lang.Object entity) Registers the new Entity with the UnitOfWork. |
java.lang.Object |
registerNewEntity(java.lang.Object entity, boolean assignSequence) Registers the new Entity with the UnitOfWork. |
protected void |
release() Handles the releasing behavior that occurs when associated TopLinkDataControls are released from the binding container and subsequent application server (typically during application timeout or shutdown). |
protected void |
releaseSession() Releases the TL Session and performs a logout if necessary. |
protected abstract void |
releaseUnitOfWork() Releases the UnitOfWork for this broker. |
protected void |
resetState() Resets the transaction for all TopLinkDataControls associated with this TransactionBroker. |
protected void |
resetTransaction() Resets the transactional resources for this TransactionalBroker instance and notifies all associated TopLinkDataControls of that the transactional state has been reset. |
protected abstract void |
resetUnitOfWork() Creates and configures a the UnitOfWork used by this TransactionBrokers. |
protected void |
rollbackTransaction() Rollback the transaction for all TopLinkDataControls associated with this TransactionBroker. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final int CLIENT_SESSION_TYPE
protected static final int CLIENT_SESSION_BROKER_TYPE
protected static final int SHARED_SESSION_BROKER_TYPE
protected static final int SHARED_DATABASE_SESSION_TYPE
protected static final int ISOLATED_DATABASE_SESSION_TYPE
protected boolean shouldPerformDeletesFirst
Constructor Detail |
---|
protected TransactionBroker(oracle.toplink.sessions.Session session, int brokerType, boolean shouldPerformDeletesFirst, boolean shouldSequenceOnCreate)
applicationBindingContext
- - BindingContext unique to this application instance.session
- - TopLink Session for this application instance.brokerType
- - describes the mode of operation with regards to the underlying TL Session.shouldPerformDeletesFirst
- - determines whether the UnitOfWork in this TransactionBroker should perform deletes first pn commit.Method Detail |
---|
protected void initialize(oracle.toplink.sessions.Session session, int brokerType, boolean shouldPerformDeletesFirst, boolean shouldSequenceOnCreate)
protected boolean isTransactionDirty()
protected void commitTransaction()
protected void rollbackTransaction()
protected void resetState()
protected void resetTransaction()
public java.lang.Object registerNewEntity(java.lang.Object entity)
entity
- - the entity to register as a new instance with the transaction.public java.lang.Object registerNewEntity(java.lang.Object entity, boolean assignSequence)
entity
- - the entity to register as a new instance with the transaction.assignSequence
- - indicates whether to do sequencing assignment.public java.lang.Object registerEntity(java.lang.Object entity)
public java.lang.Object createEntity(java.lang.Class objectType)
public java.lang.Object createEntity(java.lang.Class objectType, boolean assignSequenceNumber)
objectType
- - type of object.assignSequenceNumber
- - should assign a sequence number in the case where sequencing is used with the associated object type.public java.lang.Object deleteEntity(java.lang.Object entity)
protected void release()
protected abstract void releaseUnitOfWork()
protected void releaseSession()
protected java.lang.Object executeQuery(java.lang.String beanClass, java.lang.String queryName, java.util.Vector queryParameters) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
protected java.lang.Object executeQuery(java.lang.String queryName, java.util.Map parameters)
protected abstract void resetUnitOfWork()
public abstract oracle.toplink.sessions.UnitOfWork getUnitOfWork()
public oracle.toplink.sessions.Session getSession()
protected boolean isQuery(java.lang.String operationName)
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Model 11g Release 1 (11.1.1.5.0) E10653-06 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |