Oracle ADF Model and Business Components API Reference 10.1.2 B14022-01

oracle.adf.model.generic.toplink
Class TopLinkDataControl

java.lang.Object
  extended byjava.util.AbstractMap
      extended byoracle.jbo.common.JboAbstractMap
          extended byoracle.adf.model.binding.DCDataControl
              extended byoracle.adf.model.generic.DCGenericDataControl
                  extended byoracle.adf.model.generic.toplink.TopLinkDataControl
All Implemented Interfaces:
DataControl, DCDataControlManagement, java.util.Map

public class TopLinkDataControl
extends DCGenericDataControl

Purpose: Data control for use of TopLink within ADF.

Description: This data control abstracts the use of TopLink. It allows for a single TransactionBroker to be shared all TL data controls that share a common binding context. This assumes a single transaction and database session (isolated or *client/1server) per user context.

Version:
10.1.2
See Also:
DataControlFactoryImpl, DCGenericDataControl, TransactionBroker

Nested Class Summary
 
Nested classes inherited from class java.util.Map
java.util.Map.Entry
 
Field Summary
static java.lang.String DOT_STR
           
static java.lang.String QUERY_SPEL_IDENTIFIER
          Identifies a method invocation as a TL query
static java.lang.String READ_ALL_QUERY_SPEL_IDENTIFIER
          Identifies a method invocation as a TL "read all" query
 
Fields inherited from class oracle.adf.model.generic.DCGenericDataControl
DC_ROOT_ACC_NAME, mDef, mRSIs, mStructureDefs
 
Fields inherited from class oracle.adf.model.binding.DCDataControl
ABSTRACT, JCLIENT, mBindingContainerList, mDataProvider, mErrorHandler, mErrorHandlerActive, mErrorHandlerThrow, mIsRoot, mLocaleCtx, mName, mParent, mRootApplication, mStatusBarList, mTxnListeners, mUserData, OPER_CTRL_BINDING_VALIDATION, OPER_DATA_ROW_CREATE, OPER_DATA_ROW_REMOVE, OPER_DATA_ROW_UPDATE, OPER_EXECUTE, OPER_FIND_MODE, OPER_SORT_COLLECTION, PNAME_Type, REL_ALL_REFS, REL_DATA_REFS, REL_VIEW_REFS, REL_WEAK_DATA_REFS
 
Constructor Summary
TopLinkDataControl(java.lang.String name, java.util.Map params, java.lang.String beanClassName, boolean root, TransactionBroker transactionBroker)
          Creates a new instance of the TopLinkDataControl.
 
Method Summary
protected  void commitPerformed()
          Notifies this data control that a commit has been performed and that the transactional state needs to be reset.
 void commitTransaction()
          Commits the transaction for this data control.
 java.lang.Object createRowData(DCRowContext ctx)
          Creates the object described by DCRowContext, adds it to the underlying provider Collection, registers it in the given transaction, and returns the newly created object.
 Session getAssociatedSession()
          ADVANCED: Returns the TopLink Session associated with this data control's transaction.
 UnitOfWork getAssociatedUnitOfWork()
          ADVANCED: Returns the TopLink UnitOfWork associated with this data control's transaction.
protected  TransactionBroker getTransactionBroker()
          Returns the TransactionBroker associated with this data control instance that manages all transactional related activities for this data control.
protected  void initialize(java.util.Map params, java.lang.String beanClassName, TransactionBroker transactionBroker)
           
 java.lang.Object invokeMethod(DCInvokeMethodDef methodInfo, java.util.ArrayList params)
          Overridden from DCDataControl, this method serves as an entry point for executing native java methods as well as TopLink queries.
 boolean isOperationSupported(DCIteratorBinding iterBinding, byte oper)
          Describes what operations are supported by the TopLinkDataControl.
 void release(int flags)
          Overridden from DCDataControl to handle cleanup of TopLink related resources in the event of a data release.
 boolean removeRowData(DCRowContext ctx)
          Return true if the row at the given index is removed from the the RSI associated with the given iterator-binding.
 boolean resetState()
          Resets the state of the TopLinkDataControl to it's initial state upon entering the application: a new UnitOfWork is acquired and all RSIs associated with this DataControl are reset to their initial state (old query results are invalidated as well).
protected  void resetStatePerformed()
          Notifies this data control that a "resetState: has been performed and that the transactional and associated RSIs' state need to be reset.
 void resetTransaction()
          INTERNAL: Resets the transactional resources associated with this data control and all data controls that share the same transactional space.
protected  void resetTransactionalState()
          Resets the transactional state of this Data Control.
protected  void rollbackPerformed()
          Notifies this data control that a rollback has been performed and that the transactional state needs to be reset.
 void rollbackTransaction()
          Rollsback the transaction for this data control.
protected  void transactionalResourcesReset()
          Notifies this data control that the transactional resources have been reset and that a full re-execution of all associated RSIs must be performed.
 
Methods inherited from class oracle.adf.model.generic.DCGenericDataControl
applySortCriteria, closeRowSetIterators, createRowSetIteratorImpl, executeIteratorBinding, executeIteratorBindingIfNeeded, executeMethodIterators, fetchProperty, fetchProviderProperty, fetchRowSetIterator, findOrCreateAccessorRowSetIterator, findOrCreateAccessorRowSetIterator, findOrCreateMethodRowSetIterator, findRootRowSetIterator, findStructureDef, getAccessorDefs, getAccessorValue, getAttributeDefs, getAttributeDefs, getEstimatedRowCount, getRowSetIterator, getSortCriteria, initializeBindingContainer, initializeRSIs, isTransactionDirty, restoreRSIs, setCurrentRowWithKey, setCurrentRowWithKeyValue
 
Methods inherited from class oracle.adf.model.binding.DCDataControl
addBindingContainer, addBindingContainer, addBindingContainer, addBindingContainerRef, addBindingWithExc, addOrCreateBindingContainer, addStatusBarInterface, addTransactionStateListener, beginRequest, callCommitTransaction, cleanup, connect, createAccessorRowSetIterator, createAccessorRowSetIterator, createAccessorRowSetIterator, createBindingContainer, createBindingContainerInstance, createRowSetIteratorImpl, displayStatus, displayStatus, doneCommit, doneRollback, endRequest, findBindingContainer, findOrCreateRowSetIteratorImpl, focusGained, get, getApplicationModule, getBindingContext, getCurrentErrorHandler, getDataProvider, getDef, getErrorHandlerActive, getLocaleContext, getMethodResults, getMethodResultUseCount, getName, getParent, getRootDataControl, getSessionContext, getSessionContextManager, getUserData, getViewCriteria, hasBindingsWithExc, hashCode, initialize, initializeContainerFromDef, internalGet, internalGetCurrentRow, isClientTier, isJClientApp, isRoot, isTransactionModified, rebuildIteratorIfNeeded, registerDataProvider, release, removeBindingContainer, removeBindingWithExc, removeRowDataFromCollection, removeStatusBarInterface, removeTransactionStateListener, reportException, resetAttributeExceptionInRow, resolveAttributeDefs, setAttributeInRow, setBindingContext, setClientApp, setDataProvider, setDef, setErrorHandler, setErrorHandlerActive, setLocaleContext, setName, setSessionContext, setTransactionModified, sync, syncIfNeeded, syncNeeded, toString, transactionStateChanged, validate
 
Methods inherited from class oracle.jbo.common.JboAbstractMap
entrySet, equals
 
Methods inherited from class java.util.AbstractMap
clear, clone, containsKey, containsValue, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, isEmpty, keySet, put, putAll, remove, size, values
 

Field Detail

DOT_STR

public static final java.lang.String DOT_STR
See Also:
Constant Field Values

QUERY_SPEL_IDENTIFIER

public static final java.lang.String QUERY_SPEL_IDENTIFIER
Identifies a method invocation as a TL query

See Also:
Constant Field Values

READ_ALL_QUERY_SPEL_IDENTIFIER

public static final java.lang.String READ_ALL_QUERY_SPEL_IDENTIFIER
Identifies a method invocation as a TL "read all" query

See Also:
Constant Field Values
Constructor Detail

TopLinkDataControl

public TopLinkDataControl(java.lang.String name,
                          java.util.Map params,
                          java.lang.String beanClassName,
                          boolean root,
                          TransactionBroker transactionBroker)
Creates a new instance of the TopLinkDataControl.

Parameters:
name - - data control name.
params - - application parameters.
beanClassName - - name of the object this data control represents.
root - - indicates whether this data control is the root in the structure.
transactionBroker - - transactional management facility.
Method Detail

initialize

protected void initialize(java.util.Map params,
                          java.lang.String beanClassName,
                          TransactionBroker transactionBroker)

isOperationSupported

public boolean isOperationSupported(DCIteratorBinding iterBinding,
                                    byte oper)
Describes what operations are supported by the TopLinkDataControl.

Overrides:
isOperationSupported in class DCGenericDataControl
See Also:
DCDataControl.isOperationSupported(oracle.adf.model.binding.DCIteratorBinding, byte)

invokeMethod

public java.lang.Object invokeMethod(DCInvokeMethodDef methodInfo,
                                     java.util.ArrayList params)
Overridden from DCDataControl, this method serves as an entry point for executing native java methods as well as TopLink queries.

Overrides:
invokeMethod in class DCDataControl
See Also:
oracle.adf.model.binding.DCDataControl#isOperationSupported(DCInvokeMethodDef, byte)

removeRowData

public boolean removeRowData(DCRowContext ctx)
Return true if the row at the given index is removed from the the RSI associated with the given iterator-binding. In addition, this method goes into the providing underlying collection removes the object contained in the Row, and marks the object to be deleted in the given transaction.

Overrides:
removeRowData in class DCGenericDataControl

createRowData

public java.lang.Object createRowData(DCRowContext ctx)
Creates the object described by DCRowContext, adds it to the underlying provider Collection, registers it in the given transaction, and returns the newly created object.

Overrides:
createRowData in class DCGenericDataControl
Parameters:
ctx - - description of the Row to create
See Also:
DCDataControl.createRowData(oracle.adf.model.generic.DCRowContext)

release

public void release(int flags)
Overridden from DCDataControl to handle cleanup of TopLink related resources in the event of a data release.

Specified by:
release in interface DCDataControlManagement
Overrides:
release in class DCDataControl
Parameters:
flags - - Release type flags.

commitTransaction

public void commitTransaction()
Commits the transaction for this data control. The side effect of this method call is that all data controls sharing the same transaction will be commited and have their transactional state reset as well.

Overrides:
commitTransaction in class DCGenericDataControl
See Also:
DCDataControl.commitTransaction()

rollbackTransaction

public void rollbackTransaction()
Rollsback the transaction for this data control. The side effect of this method call is that all data controls sharing the same transaction will be commited and have their transactional state reset as well.

Overrides:
rollbackTransaction in class DCGenericDataControl
See Also:
DCDataControl.rollbackTransaction()()

resetState

public boolean resetState()
Resets the state of the TopLinkDataControl to it's initial state upon entering the application: a new UnitOfWork is acquired and all RSIs associated with this DataControl are reset to their initial state (old query results are invalidated as well). Calls to this method will also recurse to all TopLinkDataControls that share the same TX space in the application.

Specified by:
resetState in interface DCDataControlManagement
Overrides:
resetState in class DCDataControl
Returns:
whether this call has been deferred to the end of the web request.
See Also:
DCDataControl.resetState()

commitPerformed

protected void commitPerformed()
Notifies this data control that a commit has been performed and that the transactional state needs to be reset.


rollbackPerformed

protected void rollbackPerformed()
Notifies this data control that a rollback has been performed and that the transactional state needs to be reset.


resetStatePerformed

protected void resetStatePerformed()
Notifies this data control that a "resetState: has been performed and that the transactional and associated RSIs' state need to be reset.


transactionalResourcesReset

protected void transactionalResourcesReset()
Notifies this data control that the transactional resources have been reset and that a full re-execution of all associated RSIs must be performed.


resetTransactionalState

protected void resetTransactionalState()
Resets the transactional state of this Data Control.


resetTransaction

public void resetTransaction()
INTERNAL: Resets the transactional resources associated with this data control and all data controls that share the same transactional space. This method should be called with care since it will revert all data controls and subsequent RSIs in the same application and transactional space to their original states and remove all changes made. Additionally, the RSIs will be restored to their previous state.


getTransactionBroker

protected TransactionBroker getTransactionBroker()
Returns the TransactionBroker associated with this data control instance that manages all transactional related activities for this data control.


getAssociatedUnitOfWork

public UnitOfWork getAssociatedUnitOfWork()
ADVANCED: Returns the TopLink UnitOfWork associated with this data control's transaction. Use care when accessing this Session as any transactional state management activities will make the transactional state of this data control inconsistent.


getAssociatedSession

public Session getAssociatedSession()
ADVANCED: Returns the TopLink Session associated with this data control's transaction. Use care when accessing this Session as any transactional state management activities will make the transactional state of this data control inconsistent.


Oracle ADF Model and Business Components API Reference 10.1.2 B14022-01

 

Copyright © 1997, 2004, Oracle. All rights reserved.