Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 2 (11.1.2.2.0)

E17483-03


oracle.adf.model.binding
Class DCDataControl

java.lang.Object
  extended by java.util.AbstractMap
      extended by oracle.jbo.common.JboAbstractMap
          extended by oracle.adf.model.binding.DCDataControl

All Implemented Interfaces:
java.util.Map, DataControl, ManagedDataControl
Direct Known Subclasses:
DCGenericDataControl, DCJboDataControl

public abstract class DCDataControl
extends JboAbstractMap
implements DataControl, ManagedDataControl

The application class that manages connection to a Data Provider object. The DCDataControl class provides:

See Also:
ApplicationModule, Transaction, DCTransactionStateListener, DCErrorHandler
javabean.class
name=DCDataControl

Nested Class Summary

 

Nested classes/interfaces inherited from class java.util.AbstractMap
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>

 

Nested classes/interfaces inherited from interface oracle.adf.model.DataControl
DataControl.DataChangeEventPolicy

 

Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>

 

Field Summary
static byte ABSTRACT
           
static java.lang.String GET_ApplicationModule
           
static java.lang.String GET_dataProvider
           
static java.lang.String GET_DataProvider
           
static java.lang.String GET_DCFrame
           
static java.lang.String GET_MethodResults
           
static java.lang.String GET_Name
           
static byte JCLIENT
           
protected  java.util.ArrayList mBindingContainerList
           
protected  java.lang.String mDataControlFrameName
           
protected  java.lang.Object mDataProvider
           
protected  DCErrorHandler mErrorHandler
           
protected  boolean mErrorHandlerActive
           
protected  DCErrorHandler mErrorHandlerThrow
           
static java.lang.String METHOD_RESULT
           
protected  boolean mIsReleased
           
protected  boolean mIsReleasing
           
protected  boolean mIsRoot
           
protected  LocaleContext mLocaleCtx
           
protected  java.lang.Object mLock
           
protected  java.lang.String mName
           
protected  DCDataControl mParent
           
protected  DCDataControl mRootApplication
           
protected  java.util.ArrayList mStatusBarList
          DCStatusBarInterface objects that are notified with status bar messages.
protected  java.util.ArrayList mTxnListeners
          DCTransactionStateListener objects that are notified of commit or rollback events when generated from the data-provider layer.
protected  java.lang.Object mUserData
           
static byte OPER_CTRL_BINDING_VALIDATION
           
static byte OPER_DATA_ROW_CREATE
           
static byte OPER_DATA_ROW_CREATE_ONLY
           
static byte OPER_DATA_ROW_REMOVE
           
static byte OPER_DATA_ROW_UPDATE
           
static byte OPER_EXECUTE
           
static byte OPER_FIND_MODE
           
static byte OPER_SORT_COLLECTION
           
static java.lang.String PNAME_Type
           
static int REL_ALL_REFS
           
static int REL_DATA_REFS
           
static int REL_VIEW_REFS
           
static int REL_WEAK_DATA_REFS
           
protected static java.lang.String VCCRITERIA
           
protected static java.lang.String VCCRITERIAITEM
           
protected static java.lang.String VCCRITERIAITEMVALUE
           
protected static java.lang.String VCCRITERIAOPERATOR
           

 

Fields inherited from class oracle.jbo.common.JboAbstractMap
MAP_NULL_VALUE

 

Fields inherited from interface oracle.adf.model.DataControl
DATACHANGE_EVENT_POLLINGMODE

 

Constructor Summary
protected DCDataControl()
           
protected DCDataControl(boolean root, java.lang.Object userData)
          Constructs a root DCDataControl object that connects to a Data Provider of the given name.

 

Method Summary
protected  java.util.List _internal_dbg_debug_data()
          framework use only
 void addBindingContainer(DCBindingContainer formBnd)
          Register the given form binding object with this application.
 void addBindingContainer(java.lang.String name, DCBindingContainer formBnd)
          Register the given form binding object with this application with the given name.
 void addBindingContainer(java.lang.String name, DCBindingContainer formBnd, DCBindingContainerDef formDef)
          Register the given form binding object with this application with the given name.
 void addBindingContainerRef(NamedObjectImpl formBnd)
          Register the given form binding object with this application.
 void addBindingWithExc(java.lang.String name)
           
protected  void addDataChangeListener(DCIteratorBinding iter)
          subclasses to override and add iteratorbinding as a DataChangeListener on the appropriate collection.
abstract  void addDataChangeListener(java.lang.Object dataObj, DataChangeListener dcl)
           
protected  DCBindingContainer addOrCreateBindingContainer(java.lang.String name, DCBindingContainer formBnd, DCBindingContainerDef formDef, boolean initialize, boolean replace)
           
 void addStatusBarInterface(DCStatusBarInterface statusBar)
          Add the given status bar object to this application's list.
 void addTransactionStateListener(DCTransactionStateListener statusBar)
          Adds listeners like StatusBar and NavigationBars that have to listen and react to transaction's modified state.
protected  void afterReportException(DCBindingContainer formBnd, java.lang.Exception ex)
           
protected abstract  void applySortCriteria(DCIteratorBinding iter, SortCriteria[] sortby)
           
abstract  void applyViewCriteria(ViewCriteria vc, DCIteratorBinding iter, RowSetIterator rsi)
          Internal: Applications should not use this method.
protected  void beforeReportException(DCBindingContainer formBnd, java.lang.Exception ex)
           
 void beginRequest(java.util.HashMap requestCtx)
          Invoked in some contexts to signal the beginning of a model request.
protected  void cacheMethodResult(DCInvokeMethod method, java.lang.Object result, java.lang.Object paramVals)
           
 void callCommitTransaction()
          Helper method that invokes beforeSaveTransaction event on all DCPanelBinding objects and then invokes the BC4J transaction's commit() method to save all changes to the database.
 void cleanup()
           
protected abstract  void clearIteratorBinding(DCIteratorBinding iter)
           
 void commitTransaction()
          Invokes the BC4J transaction's commit() method to save all changes to the database.
protected  void connect()
          If this DCDataControl is root, this method invokes the corresponding BC4J Transaction's connect() method to create a database connection.
 RowSetIterator createAccessorRowSetIterator(RowSetIterator masterRSI, DCIteratorBinding iter, java.lang.String accName, java.lang.String beanClass)
          creates a accessor RSI using the current or the first row of the masterRSI and calling the get<accName> method on it to get the RSI dataprovider.
 RowSetIterator createAccessorRowSetIterator(RowSetIterator masterRSI, Row row, DCIteratorBinding iter, java.lang.String accName, java.lang.String beanClass)
           
protected  RowSetIterator createAccessorRowSetIterator(RowSetIterator masterRSI, Row row, DCIteratorBinding iter, java.lang.String accName, java.lang.String beanClass, boolean trackMaster)
           
protected  RowSetIterator createAccessorRowSetIteratorForMasterRow(DCIteratorBinding iter, RowSetIterator masterRSI, Row row, java.lang.Object result, java.lang.String accName, java.lang.String beanClass, boolean trackMaster)
           
 DCBindingContainer createBindingContainer(java.lang.String name, java.lang.String formDefName, boolean initialize)
          Create a DCBindingContainer instance using the given name and form definition.
 DCBindingContainer createBindingContainerInstance(java.lang.String mBindingContainerClassName)
           
 java.lang.Object createRowData(DCRowContext ctx)
          Create a new row for the iterator associated with the given iterator-binding at the given index and return the new row.
 RowSetIterator createRowSetIteratorImpl(DCIteratorBinding iter, java.lang.String defName, java.lang.Object sourceObj, RowSetIterator master)
          Creates an RSI for a given iterator and source collection/object.
protected abstract  RowSetIterator createRowSetIteratorImpl(java.lang.String defName, java.lang.Object sourceObj, RowSetIterator master)
          Create a DCRowSetIteratorImpl or a subclass thereof for the give defName element types, using the given source collection/object and optionally the master RSI if there is a dependency defined on the master.
 java.lang.Object createSavepoint()
           
 java.io.Serializable createSnapshot()
          Creates a snapshot of the state of the DataControl.
 ViewCriteria createViewCriteria(DCIteratorBinding iter)
          Internal: Applications should not use this method. Create a new viewCriteria associated with the given iterator binding's collection.
 boolean discardIfDefinitionChanged()
           
 void displayStatus(DCIteratorBinding iterBinding, java.lang.String msgId, java.lang.Object[] params)
          Send the given message Id and parameter list along with the current iterator binding object to all status bar instances registered with this Application.
 void displayStatus(java.lang.String msg)
          Send the given message to all status bar interface objects registered with this application.
 void doneCommit(TransactionStateEvent event)
          Implementation of oracle.jbo.TransactionStateListener interface.
 void doneRollback(TransactionStateEvent event)
          Implementation of oracle.jbo.TransactionStateListener interface.
 void endRequest(java.util.HashMap requestCtx)
          Invoked in some contexts to signal the end of a model request.
protected abstract  void executeIteratorBinding(DCIteratorBinding iterBinding)
          Implies forced execute of the collection that this iterator binding is bound to.
protected abstract  void executeIteratorBindingIfNeeded(DCIteratorBinding iterBinding)
          This method is invoked when a bindingcontainer is 'refreshing' itself before it's data is displayed.
 void executeIteratorBindingWithParams(DCIteratorBinding iter, OperationParameter[] params, java.lang.Object[] paramVals)
           
 DCBindingContainer findBindingContainer(java.lang.String name)
          Return the DCBindingContainer instance registered with this DCAppication with the given name.
 RowSetIterator findOrCreateAccessorRowSetIterator(DCIteratorBinding masterIter, DCIteratorBinding iter, java.lang.String accName, java.lang.String beanClass)
           
 RowSetIterator findOrCreateAccessorRowSetIterator(RowSetIterator masterRSI, DCIteratorBinding iter, java.lang.String accName, java.lang.String beanClass)
          Deprecated. since 10.1.2
 RowSetIterator findOrCreateMethodRowSetIterator(DCIteratorBinding iter, java.lang.String beanClass, java.lang.Object result)
           
protected  RowSetIterator findOrCreateRowSetIteratorImpl(DCIteratorBinding iter, java.lang.String defName, java.lang.Object sourceObj, RowSetIterator master)
           
protected abstract  RowSetIterator findOrCreateViewObjectForCriteria(DCIteratorBinding iter, ViewCriteria vc, RowSetIterator master, java.lang.String accName)
           
protected  Variable findVariable(java.lang.String path)
           
 void focusGained(DCIteratorBinding iterBinding, DCControlBinding binding, int attrIndex)
          This method is used by the framework to display currency information in the status bars.
 java.lang.Object get(java.lang.Object keyObj)
          override hashmap.get()
protected abstract  java.lang.Object getAccessorValue(RowSetIterator masterRSI, Row row, DCIteratorBinding iter, java.lang.String accName)
           
 DataControl getAdaptedDC()
          In case of adapter datacontrols, this returns the adapter datacontrol instance and null in all other cases.
protected  ApplicationModule getAM()
           
 java.lang.String getAppDefName()
          framework use only
 ApplicationModule getApplicationModule()
          For all nonbc4j Applications, this should return null.
 AttributeDef[] getAttributeDefs(DCIteratorBinding iterBinding, java.lang.String[] attrNames)
          Return attribute definition for the given iterator binding and for the given set of attributes from the elements-definition of the mapped collection.
 BindingContext getBindingContext()
          Returns the binding context in which this datacontrol is registered
 DCErrorHandler getCurrentErrorHandler()
          Returns the DCErrorHandler registered with the root DCDataControl.
 java.lang.String getDataControlFrameName()
          framework use only
 java.lang.Object getDataProvider()
          Return the Business Service Object that this datacontrol is associated with.
 DCDataControlDef getDef()
          Returns the definition object for this DCDataControl
protected  long getDeferredEstimatedRowCount(DCIteratorBinding iter)
           
 Definition getDefinition(java.lang.String name, int type)
           
 boolean getErrorHandlerActive()
          Returns the error-handler active state of the root DCDataControl object.
protected abstract  long getEstimatedRowCount(DCIteratorBinding iter)
          Implement estimated row count logic in this method and return the row count for a collection bound to this iterator.
protected  java.lang.String getIteratorStructureDefName(DCIteratorBinding iter)
          return structuredef beanclass name for this iterator binding.
abstract  AttributeDef[] getKeyAttributeDefs(DCIteratorBinding dataIter)
           
abstract  int getLastEventId()
           
abstract  ListBindingDef getListBindingDef(DCIteratorBinding dataIter, Key rowKey, java.lang.String name)
           
abstract  java.lang.String getListBindingName(DCIteratorBinding dataIter, Key rowKey, java.lang.String attrName, java.lang.String name)
           
abstract  RowSetIterator getListBindingRSI(DCIteratorBinding dataIter, Key rowKey, java.lang.String attrName, java.lang.String name)
           
 LocaleContext getLocaleContext()
          Returns the locale for this Application
 java.util.Map getMethodResults()
          For looking up method results stored in this DataControl.
 int getMethodResultUseCount(java.lang.Object key)
           
 java.lang.String getName()
          Returns the instance name of this DCDataControl object.
 DCDataControl getParent()
          Returns the container DCDataControl object if any.
abstract  RowSetIterator getPreferredListRSI(DCIteratorBinding dataIter, Key rowKey, java.lang.String attrName, java.lang.String name)
           
 DCDataControl getRootDataControl()
          Returns the root DCDataControl object.
protected abstract  RowSetIterator getRowSetIterator(java.lang.String masterName)
          Given the name of an RSI, find if it's already created and cached on the datacontrol
 oracle.adf.share.security.SecurityContext getSecurityContext()
           
 SessionContext getSessionContext()
           
protected  SessionContextManager getSessionContextManager()
           
protected abstract  SortCriteria[] getSortCriteria(DCIteratorBinding iter)
           
protected  java.lang.String[] getSubstitutedDefNames(DCIteratorBinding iter)
           
protected  java.lang.Object getSyncLock()
          Obtain a lock on this object when subclasses need to lock access to data inside this DC.
protected  DCBindingContainer getUnresolvedBindingContainer(java.lang.String fullName)
           
 java.lang.Object getUserData()
           
 ViewCriteria getViewCriteria(DCIteratorBinding iter)
          Internal: Applications should not use this method. Return viewCriteria associated with the given iterator binding's collection.
 boolean hasBindingsWithExc()
           
 boolean hasDefinitionChanged()
           
protected  boolean hasKeyAttributes(DCIteratorBinding iter)
           
 boolean hasOperationParamsChanged(OperationInfo info)
           
 boolean hasPermission(DCControlBinding binding, java.lang.String actions)
           
 boolean hasPermission(DCControlBinding binding, java.lang.String target, java.lang.String actions)
           
 boolean hasPermission(java.security.Permission permission)
           
 void initialize()
          *** Advanced method ***
protected  void initializeBindingContainer(DCBindingContainerDef formDef, DCBindingContainer formBnd, boolean initialize)
           
 void initializeContainerFromDef(java.lang.String name)
           
 void initializeFromMetadata(java.util.Map map)
           
protected  void initIteratorDataControl(DCIteratorBinding itr, DCDataControl dc)
           
protected  void internalCacheMethodResults(boolean flag)
           
protected  java.lang.Object internalGet(java.lang.String key)
          For EL evaluation.
protected  Row internalGetCurrentRow(DCIteratorBinding iter)
           
 DataControlFrame internalGetDataControlFrame()
          framework use only
protected  ViewObject internalGetIterBindingViewObject(DCIteratorBinding iter)
           
protected  void internalPut(java.lang.String key, java.lang.Object value)
           
protected  void internalSetTransactionStateChanged(boolean state)
           
protected  java.lang.Object invalidateMethodResult(DCInvokeMethod method)
           
 java.lang.Object invokeMethod(DCInvokeMethodDef methodInfo, java.util.ArrayList params)
          Deprecated. since 10.1.3. not called anymore. Use invokeOperation() instead.
protected  java.lang.Object invokeMethod(DCInvokeMethod method, OperationBinding action, java.util.Map params)
          Override this method if a datacontrol wants to implement custom invocation of a method and avoid introspection and invoke method call using reflection.
 boolean invokeOperation(java.util.Map ctx, OperationBinding action)
          All OperationBindings should first delegate to the DataControl associated with the binding to perform the action.
 boolean isAttributeSortable(DCIteratorBinding iter, AttributeDef ad)
           
protected  boolean isBoundRowIteratorEvent(DCIteratorBinding iter, JboEvent ev)
           
 boolean isClientTier()
          Returns true in case of BC4J client-tier app.
 boolean isDataChangeManager()
           
 boolean isJClientApp()
           
 boolean isOperationSupported(DCIteratorBinding iterBinding, byte operation)
          Returns true for operation = OPER_CTRL_BINDING_VALIDATION Returns false for all other cases.
 boolean isReleasing()
           
 boolean isRoot()
          Returns true if this DCDataControl is the root DCDataControl.
abstract  boolean isTransactionDirty()
          Returns true if this transaction has been dirtied by this application.
 boolean isTransactionModified()
          Returns true if this DCDataControl has modified attribute values.
protected  void markAccessorIterListenerForFKMerge(DCIteratorBinding iter)
           
protected  boolean modifyTransactionStateForAttributeSet(DCIteratorBinding iterBind, Row row, AttributeDef ad)
           
 void processChangeNotifications()
          During the render phase of the datacontrol lifecycle the pending notifications for auto refreshing data may be processed.
protected  void rebuildIteratorIfNeeded(DCIteratorBinding iterBinding)
           
 java.lang.Object registerDataProvider(DCRowContext ctx)
          Called before the row in the RowContext object is modified/marked as removed.
 void release()
          Releases the DataControl.
 void release(int flags)
          Deprecated. release() will be invoked whenever the DC is to be released. The DC should invoke releaseBindings(int) in order to notify the DataBinding facility of the release. The default implementation of this method now invokes release().
 void releaseAll()
           
protected  void releaseBindings(int flags)
          Based on the value of the flags parameter, notifies the bindings to release references to the objects in the data provider layer Valid values for flags are: REL_ALL_REFS - if the bindings should release all references to both the DataControls and to the data provider objects like RowSetIterators.
 boolean releaseData(DCIteratorBinding iter)
           
 void releaseFromDCFrame()
          To be called only from frame release.
protected  void releaseMethodResults(boolean force)
          Release the method results cache if mClearMethodResults is true.
protected  void removeBindingContainer(DCBindingContainer formBnd)
          Remove the DCBindingContainer object of the given name (if any).
 void removeBindingWithExc(java.lang.String name)
           
protected  void removeDataChangeListener(DCIteratorBinding iter)
          subclasses to override and remove iteratorbinding as a DataChangeListener on the appropriate collection.
abstract  void removeDataChangeListener(java.lang.Object dataObj, DataChangeListener dcl)
           
 boolean removeRowData(DCRowContext ctx)
          This method is to remove the row object (the obj parameter) from the underlying data source.
 boolean removeRowDataFromCollection(DCRowContext ctx)
          This method is to remove the row object (the obj parameter) from the collection.
 void removeSnapshot(java.io.Serializable handle)
          Removes the snapshot associated with the snapshot handle.
 void removeStatusBarInterface(DCStatusBarInterface statusBar)
          Remove the given instance of status bar interface if found.
 void removeTransactionStateListener(DCTransactionStateListener statusBar)
          Remove the given object from JUTransactionStateListener list.
 void reportException(DCBindingContainer formBnd, java.lang.Exception ex)
          This method is used by all framework binding objects to report exceptions.
protected  void resetAttributeExceptionInRow(DCIteratorBinding iter, Row row, AttributeDef def, AttrValException ave)
           
 boolean resetState()
          Resets the DataControl.
protected  AttributeDef[] resolveAttributeDefs(StructureDef def, java.lang.String[] attrNames)
           
 void restoreSavepoint(java.lang.Object handle)
           
 void restoreSnapshot(java.io.Serializable handle)
          Restore the state of the DataControl with the snapshot state that is referenced by the handle.
 void rollbackTransaction()
          Helper method that invokes rollback on the current Transaction.
 void setAppDefName(java.lang.String appDefName)
          framework use only
 void setAttributeInRow(DCIteratorBinding iterBind, Row row, AttributeDef ad, java.lang.Object value)
           
 void setAttributesInRow(DCIteratorBinding iterBind, Row row, AttributeDef[] ads, java.lang.Object[] values)
           
 void setBindingContext(BindingContext ctx)
           
 void setClientApp(byte clientType)
           
abstract  void setCurrentRowWithKey(DCIteratorBinding iter, Key keyObj)
          Use the given key to set the current row in the RowSetIterator for the given iteratorbinding.
abstract  void setCurrentRowWithKey(DCIteratorBinding iter, java.lang.String stringKey)
          Converts the serialized stringKey into a Row key object (using collection's key metadata) and then calls findByKey on the RowSetIterator to find the row matching this key.
abstract  void setCurrentRowWithKeyValue(DCIteratorBinding iter, java.lang.String stringValue)
          This method works for Collections with only one Key attribute and not for multi-part attribute keys.
 void setDataControlFrameName(java.lang.String dataControlFrameName)
          framework use only
protected  void setDataProvider(java.lang.Object obj)
           
 void setDef(DCDataControlDef appDef)
          Sets the definition object of this DCDataControl Object
 void setErrorHandler(java.lang.Object errHandlerObj)
          Registers a DCErrorHandler with the root DCDataControl.
 void setErrorHandlerActive(boolean b)
          *** Advanced method ***
 void setLocaleContext(LocaleContext locale)
          Helper method that sets the locale in the current Application.
 void setName(java.lang.String name)
          Sets the instance name of this DCDataControl Object
 void setParent(DCDataControl parent)
          Sets the parent datacontrol.
 void setPartialUpdate(boolean flag)
          Tell DC that this binding is being updated during partial update, so that it doesn't cache any exceptions for this udpate and simply throws them back.
protected  void setPinned(boolean flag)
          Advanced for ADS usage only
 void setSessionContext(SessionContext sessionContext)
           
 void setTransactionModified()
          If this transaction is not in modified state, this method sets it to a modified state.
abstract  int startEvents(int fromIndex)
           
 void stopEvents()
           
 void sync(java.lang.String syncFromDiagnostic)
          Incase syncNeeded, then use this event to synchronize data from remote tier in batch.
 void syncIfNeeded(java.lang.String syncFromDiagnostic)
          Incase syncNeeded, then use this event to synchronize data from remote tier in batch.
 boolean syncNeeded()
          Primarily used in ADFBC which returns true, if it is deployed in batchmode.
 java.lang.String toString()
           
 void transactionStateChanged(boolean state)
          Use this method to notify all transaction state change listeners of the change
 void validate()
          Called when datacontrol changes needs to be validated after updates have been processed for a page.

 

Methods inherited from class oracle.jbo.common.JboAbstractMap
entrySet, equals, hashCode, put, setThrowIfPropertyNotFoundOnGet

 

Methods inherited from class java.util.AbstractMap
clear, clone, containsKey, containsValue, isEmpty, keySet, 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, hashCode, isEmpty, keySet, put, putAll, remove, size, values

 

Field Detail

mIsRoot

protected boolean mIsRoot

mParent

protected DCDataControl mParent

mRootApplication

protected DCDataControl mRootApplication

mUserData

protected java.lang.Object mUserData

mName

protected java.lang.String mName

mLock

protected java.lang.Object mLock

mIsReleased

protected volatile boolean mIsReleased

mIsReleasing

protected volatile boolean mIsReleasing

mBindingContainerList

protected java.util.ArrayList mBindingContainerList

mErrorHandler

protected DCErrorHandler mErrorHandler

mErrorHandlerThrow

protected DCErrorHandler mErrorHandlerThrow

mErrorHandlerActive

protected boolean mErrorHandlerActive

mLocaleCtx

protected LocaleContext mLocaleCtx

ABSTRACT

public static final byte ABSTRACT
See Also:
Constant Field Values

JCLIENT

public static final byte JCLIENT
See Also:
Constant Field Values

METHOD_RESULT

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

OPER_DATA_ROW_UPDATE

public static final byte OPER_DATA_ROW_UPDATE
See Also:
Constant Field Values

OPER_DATA_ROW_CREATE

public static final byte OPER_DATA_ROW_CREATE
See Also:
Constant Field Values

OPER_DATA_ROW_REMOVE

public static final byte OPER_DATA_ROW_REMOVE
See Also:
Constant Field Values

OPER_FIND_MODE

public static final byte OPER_FIND_MODE
See Also:
Constant Field Values

OPER_CTRL_BINDING_VALIDATION

public static final byte OPER_CTRL_BINDING_VALIDATION
See Also:
Constant Field Values

OPER_EXECUTE

public static final byte OPER_EXECUTE
See Also:
Constant Field Values

OPER_SORT_COLLECTION

public static final byte OPER_SORT_COLLECTION
See Also:
Constant Field Values

OPER_DATA_ROW_CREATE_ONLY

public static final byte OPER_DATA_ROW_CREATE_ONLY
See Also:
Constant Field Values

mDataProvider

protected java.lang.Object mDataProvider

mDataControlFrameName

protected java.lang.String mDataControlFrameName

GET_MethodResults

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

GET_ApplicationModule

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

GET_DataProvider

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

GET_dataProvider

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

GET_Name

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

GET_DCFrame

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

VCCRITERIA

protected static final java.lang.String VCCRITERIA

VCCRITERIAITEM

protected static final java.lang.String VCCRITERIAITEM

VCCRITERIAITEMVALUE

protected static final java.lang.String VCCRITERIAITEMVALUE

VCCRITERIAOPERATOR

protected static final java.lang.String VCCRITERIAOPERATOR
See Also:
Constant Field Values

REL_ALL_REFS

public static final int REL_ALL_REFS
See Also:
Constant Field Values

REL_DATA_REFS

public static final int REL_DATA_REFS
See Also:
Constant Field Values

REL_VIEW_REFS

public static final int REL_VIEW_REFS
See Also:
Constant Field Values

REL_WEAK_DATA_REFS

public static final int REL_WEAK_DATA_REFS
See Also:
Constant Field Values

PNAME_Type

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

mStatusBarList

protected java.util.ArrayList mStatusBarList
DCStatusBarInterface objects that are notified with status bar messages.

mTxnListeners

protected java.util.ArrayList mTxnListeners
DCTransactionStateListener objects that are notified of commit or rollback events when generated from the data-provider layer.

Constructor Detail

DCDataControl

protected DCDataControl()

DCDataControl

protected DCDataControl(boolean root,
                        java.lang.Object userData)
Constructs a root DCDataControl object that connects to a Data Provider of the given name.
Parameters:
root - If this DCDataControl is a root DCDataControl managing the transaction.
userData - Data to store with the DCDataControl object.

Method Detail

getName

public final java.lang.String getName()
Returns the instance name of this DCDataControl object.
Specified by:
getName in interface DataControl
For internal use only. Application developers should not use this
*** For internal framework use only ***

setName

public final void setName(java.lang.String name)
Sets the instance name of this DCDataControl Object
For internal use only. Application developers should not use this
*** For internal framework use only ***

getDef

public final DCDataControlDef getDef()
Returns the definition object for this DCDataControl
For internal use only. Application developers should not use this
*** For internal framework use only ***

setDef

public final void setDef(DCDataControlDef appDef)
Sets the definition object of this DCDataControl Object
For internal use only. Application developers should not use this
*** For internal framework use only ***

initializeFromMetadata

public void initializeFromMetadata(java.util.Map map)

initialize

public void initialize()
*** Advanced method ***

Creates a connection to the data-provider layer.


getDataProvider

public java.lang.Object getDataProvider()
Description copied from interface: DataControl
Return the Business Service Object that this datacontrol is associated with.
Specified by:
getDataProvider in interface DataControl
Returns:
The underlying business service object.
javabean.property

setDataProvider

protected void setDataProvider(java.lang.Object obj)

reportException

public final void reportException(DCBindingContainer formBnd,
                                  java.lang.Exception ex)
This method is used by all framework binding objects to report exceptions. If this DCDataControl is not the root, it calls the equivalent method on the root.

If the error handler is set to active state, then this method calls the registered error handler's reportException method. Othewise, it simply throws the given exception as a JboException.

See Also:
DCErrorHandler, JboException

getCurrentErrorHandler

public final DCErrorHandler getCurrentErrorHandler()
Returns the DCErrorHandler registered with the root DCDataControl. By default an ADF Application has an instance of DCErrorHandlerDialog registered as the default DCErrorHandler.
See Also:
JUErrorHandlerDialog
javabean.property

setErrorHandler

public void setErrorHandler(java.lang.Object errHandlerObj)
Registers a DCErrorHandler with the root DCDataControl. By default an ADF application has an instance of DCErrorHandlerDialog registered as the default DCErrorHandler. Applications should use this method to register custom error handling object so that all errors raised in the framework goes through the Application's error handling object. Custom error handlers need to implement the DCErrorHandler interface.

Custom error handlers may also implement oracle.jbo.JboExceptionHandler to handle batched Exceptions raised during client-side processing of Exceptions thrown in the Business Components tier. after the DCErrorHandler is set with DCDataControl in this method.

Note that errors are sent to the registered error handler only when the error handler state is marked active (which is true by default) using the setErrorHandlerActive method.

Parameters:
errHandlerObj - An implementation of DCErrorHandler interface that may optionally implement JboExceptionHandler interface too. If errHandler implements the JboExceptionHandler, this method sets it as the ExceptionHandler on the root ApplicationModule that this client Application is connected with. Else, method sets a default ExceptionHandler which will collect all Exceptions and throw a new JboException with these Exceptions set as in the new JboException's details list, for the errHandler to display as one JboException with a bag of Exceptions.
See Also:
JUErrorHandler, JUErrorHandlerDialog, JboExceptionHandler, ApplicationModule

getErrorHandlerActive

public final boolean getErrorHandlerActive()
Returns the error-handler active state of the root DCDataControl object. This is used to control whether to throw an exception raised by the framework (which is used by automated regression tests to trap exceptions and log them). By default the state is set to true - meaning raise all exceptions via the registered error handler.

setErrorHandlerActive

public final void setErrorHandlerActive(boolean b)
*** Advanced method ***

Sets the error-handler active state of the root DCDataControl object. This is used to control whether to throw an exception raised by the framework (which is used by automated regression tests to trap exceptions and log them). By default the state is set to true - meaning raise all exceptions via the registered error handler.


connect

protected void connect()
If this DCDataControl is root, this method invokes the corresponding BC4J Transaction's connect() method to create a database connection. Also this method is used to register the application as a TransactionStateListener on the BC4J Transaction object.

getLocaleContext

public LocaleContext getLocaleContext()
Returns the locale for this Application

setLocaleContext

public void setLocaleContext(LocaleContext locale)
Helper method that sets the locale in the current Application.

getAdaptedDC

public DataControl getAdaptedDC()
In case of adapter datacontrols, this returns the adapter datacontrol instance and null in all other cases.

getApplicationModule

public ApplicationModule getApplicationModule()
For all nonbc4j Applications, this should return null. Returns the associated oracle.jbo.ApplicationModule object

getAM

protected ApplicationModule getAM()

getRowSetIterator

protected abstract RowSetIterator getRowSetIterator(java.lang.String masterName)
Given the name of an RSI, find if it's already created and cached on the datacontrol

getAccessorValue

protected abstract java.lang.Object getAccessorValue(RowSetIterator masterRSI,
                                                     Row row,
                                                     DCIteratorBinding iter,
                                                     java.lang.String accName)

createAccessorRowSetIterator

public RowSetIterator createAccessorRowSetIterator(RowSetIterator masterRSI,
                                                   DCIteratorBinding iter,
                                                   java.lang.String accName,
                                                   java.lang.String beanClass)
creates a accessor RSI using the current or the first row of the masterRSI and calling the get<accName> method on it to get the RSI dataprovider.

createAccessorRowSetIterator

public RowSetIterator createAccessorRowSetIterator(RowSetIterator masterRSI,
                                                   Row row,
                                                   DCIteratorBinding iter,
                                                   java.lang.String accName,
                                                   java.lang.String beanClass)

createAccessorRowSetIteratorForMasterRow

protected RowSetIterator createAccessorRowSetIteratorForMasterRow(DCIteratorBinding iter,
                                                                  RowSetIterator masterRSI,
                                                                  Row row,
                                                                  java.lang.Object result,
                                                                  java.lang.String accName,
                                                                  java.lang.String beanClass,
                                                                  boolean trackMaster)

createAccessorRowSetIterator

protected RowSetIterator createAccessorRowSetIterator(RowSetIterator masterRSI,
                                                      Row row,
                                                      DCIteratorBinding iter,
                                                      java.lang.String accName,
                                                      java.lang.String beanClass,
                                                      boolean trackMaster)

findOrCreateMethodRowSetIterator

public RowSetIterator findOrCreateMethodRowSetIterator(DCIteratorBinding iter,
                                                       java.lang.String beanClass,
                                                       java.lang.Object result)

findOrCreateAccessorRowSetIterator

public RowSetIterator findOrCreateAccessorRowSetIterator(RowSetIterator masterRSI,
                                                         DCIteratorBinding iter,
                                                         java.lang.String accName,
                                                         java.lang.String beanClass)
Deprecated. since 10.1.2
Use findOrCreateAccessorRowSetIterator(DCIteratorBinding masterIter....) instead.

internalGetCurrentRow

protected Row internalGetCurrentRow(DCIteratorBinding iter)
For internal use only. Application developers should not use this
*** For internal framework use only *** Internal: Applications should not use this method.

findOrCreateAccessorRowSetIterator

public RowSetIterator findOrCreateAccessorRowSetIterator(DCIteratorBinding masterIter,
                                                         DCIteratorBinding iter,
                                                         java.lang.String accName,
                                                         java.lang.String beanClass)

createRowSetIteratorImpl

protected abstract RowSetIterator createRowSetIteratorImpl(java.lang.String defName,
                                                           java.lang.Object sourceObj,
                                                           RowSetIterator master)
Create a DCRowSetIteratorImpl or a subclass thereof for the give defName element types, using the given source collection/object and optionally the master RSI if there is a dependency defined on the master.

findOrCreateRowSetIteratorImpl

protected RowSetIterator findOrCreateRowSetIteratorImpl(DCIteratorBinding iter,
                                                        java.lang.String defName,
                                                        java.lang.Object sourceObj,
                                                        RowSetIterator master)

findOrCreateViewObjectForCriteria

protected abstract RowSetIterator findOrCreateViewObjectForCriteria(DCIteratorBinding iter,
                                                                    ViewCriteria vc,
                                                                    RowSetIterator master,
                                                                    java.lang.String accName)

createRowSetIteratorImpl

public final RowSetIterator createRowSetIteratorImpl(DCIteratorBinding iter,
                                                     java.lang.String defName,
                                                     java.lang.Object sourceObj,
                                                     RowSetIterator master)
Creates an RSI for a given iterator and source collection/object.

isRoot

public final boolean isRoot()
Returns true if this DCDataControl is the root DCDataControl. Root DCDataControl is responsible for establishing connection to a DataProvider and setting up Transaction objects.

getParent

public final DCDataControl getParent()
Returns the container DCDataControl object if any. This should be null in case this application object is the root.

setParent

public void setParent(DCDataControl parent)
Sets the parent datacontrol.
Parameters:
parent - The parent datacontrol of this datacontrol.

getRootDataControl

public final DCDataControl getRootDataControl()
Returns the root DCDataControl object.

getUserData

public final java.lang.Object getUserData()
For internal use only. Application developers should not use this
*** For internal framework use only ***

removeBindingContainer

protected final void removeBindingContainer(DCBindingContainer formBnd)
Remove the DCBindingContainer object of the given name (if any).

addBindingContainer

public final void addBindingContainer(DCBindingContainer formBnd)
Register the given form binding object with this application. If this form binding object has no name or null name, framework generates a unique name for the object (in the context of this application module).
Throws:
NameClashException - If there is another object of the same name already registered, this method will throw this exception.

addBindingContainerRef

public final void addBindingContainerRef(NamedObjectImpl formBnd)
Register the given form binding object with this application. If this form binding object has no name or null name, framework generates a unique name for the object (in the context of this application module).
Throws:
NameClashException - If there is another object of the same name already registered, this method will throw this exception.

addBindingContainer

public final void addBindingContainer(java.lang.String name,
                                      DCBindingContainer formBnd,
                                      DCBindingContainerDef formDef)
Register the given form binding object with this application with the given name.
Throws:
InvalidObjNameException - If the given name does not follow the BC4J component or Java Identifier naming rules.
NameClashException - If there is another object of the same name already registered, this method will throw this exception.
See Also:
JboNameUtil.isNameValid(String)

addBindingContainer

public final void addBindingContainer(java.lang.String name,
                                      DCBindingContainer formBnd)
Register the given form binding object with this application with the given name.
Throws:
InvalidObjNameException - If the given name does not follow the BC4J component or Java Identifier naming rules.
NameClashException - If there is another object of the same name already registered, this method will throw this exception.
See Also:
JboNameUtil.isNameValid(String)

initializeBindingContainer

protected void initializeBindingContainer(DCBindingContainerDef formDef,
                                          DCBindingContainer formBnd,
                                          boolean initialize)

addOrCreateBindingContainer

protected DCBindingContainer addOrCreateBindingContainer(java.lang.String name,
                                                         DCBindingContainer formBnd,
                                                         DCBindingContainerDef formDef,
                                                         boolean initialize,
                                                         boolean replace)

findBindingContainer

public final DCBindingContainer findBindingContainer(java.lang.String name)
Return the DCBindingContainer instance registered with this DCAppication with the given name. If the name does not match, return null.

createBindingContainer

public final DCBindingContainer createBindingContainer(java.lang.String name,
                                                       java.lang.String formDefName,
                                                       boolean initialize)
Create a DCBindingContainer instance using the given name and form definition.
For internal use only. Application developers should not use this
*** For internal framework use only ***

isJClientApp

public boolean isJClientApp()

setClientApp

public void setClientApp(byte clientType)

createBindingContainerInstance

public DCBindingContainer createBindingContainerInstance(java.lang.String mBindingContainerClassName)

initializeContainerFromDef

public void initializeContainerFromDef(java.lang.String name)
For internal use only. Application developers should not use this
*** For internal framework use only ***

addStatusBarInterface

public final void addStatusBarInterface(DCStatusBarInterface statusBar)
Add the given status bar object to this application's list. Messages sent via displayMessage method will be given out to all registered status bar instances.

removeStatusBarInterface

public final void removeStatusBarInterface(DCStatusBarInterface statusBar)
Remove the given instance of status bar interface if found.

displayStatus

public final void displayStatus(DCIteratorBinding iterBinding,
                                java.lang.String msgId,
                                java.lang.Object[] params)
Send the given message Id and parameter list along with the current iterator binding object to all status bar instances registered with this Application. This method is used by the framework to display status bar messages from the oracle.jbo.uicli.UIMessageBundle

displayStatus

public final void displayStatus(java.lang.String msg)
Send the given message to all status bar interface objects registered with this application.

focusGained

public final void focusGained(DCIteratorBinding iterBinding,
                              DCControlBinding binding,
                              int attrIndex)
This method is used by the framework to display currency information in the status bars. When a control bound to a given attribute for a given iterator binding gets focus, this method is invoked to update all status bars.
For internal use only. Application developers should not use this
*** For internal framework use only ***

hasBindingsWithExc

public final boolean hasBindingsWithExc()

validate

public void validate()
Called when datacontrol changes needs to be validated after updates have been processed for a page.

commitTransaction

public void commitTransaction()
Invokes the BC4J transaction's commit() method to save all changes to the database.

callCommitTransaction

public final void callCommitTransaction()
Helper method that invokes beforeSaveTransaction event on all DCPanelBinding objects and then invokes the BC4J transaction's commit() method to save all changes to the database.

rollbackTransaction

public void rollbackTransaction()
Helper method that invokes rollback on the current Transaction.

isTransactionModified

public final boolean isTransactionModified()
Returns true if this DCDataControl has modified attribute values.

setTransactionModified

public void setTransactionModified()
If this transaction is not in modified state, this method sets it to a modified state. This method is invoked in the framework to set the transaction state to modified status. Also all DCTransactionStateListeners are notified of this state-change so that status bars and navigation bars could update their display.

internalSetTransactionStateChanged

protected void internalSetTransactionStateChanged(boolean state)

transactionStateChanged

public final void transactionStateChanged(boolean state)
Use this method to notify all transaction state change listeners of the change

addTransactionStateListener

public final void addTransactionStateListener(DCTransactionStateListener statusBar)
Adds listeners like StatusBar and NavigationBars that have to listen and react to transaction's modified state.

removeTransactionStateListener

public final void removeTransactionStateListener(DCTransactionStateListener statusBar)
Remove the given object from JUTransactionStateListener list.

doneCommit

public final void doneCommit(TransactionStateEvent event)
Implementation of oracle.jbo.TransactionStateListener interface. Sends the transactionStateChanged event to all DCTransactionStateListeners registered with this application.
Parameters:
event - A description of the event.

doneRollback

public final void doneRollback(TransactionStateEvent event)
Implementation of oracle.jbo.TransactionStateListener interface. Sends the transactionStateChanged event to all DCTransactionStateListeners registered with this application.
Parameters:
event - A description of the event.

beginRequest

public void beginRequest(java.util.HashMap requestCtx)
Invoked in some contexts to signal the beginning of a model request. For example, if the DataControl is referenced in a web application then this method will be invoked by the ADF framework before control is forwarded to the first Servlet defined by the request.

Subclassing datacontrols may extend this method to perform request level initialization of the DataControl.

This method is guaranteed to be called only once per browser request. Page forwards should not result in multiple invocations.

Specified by:
beginRequest in interface ManagedDataControl
Parameters:
requestCtx - a HashMap representing request context. Web applications which require request context may use the BindingContext.HTTP_REQUEST and BindingContext.HTTP_RESPONSE keys to acquire a reference from from the BindingContext.

endRequest

public void endRequest(java.util.HashMap requestCtx)
Invoked in some contexts to signal the end of a model request. For example, if the DataControl is referenced in a web application then this method will be invoked by the ADF framework after control is returned from the last Servlet defined by the request page flow.

Subclassing datacontrols may extend this method to perform request level cleanup of the DataControl.

This method is guaranteed to be called only once per browser request. Page forwards should not result in multiple invocations.

Specified by:
endRequest in interface ManagedDataControl
Parameters:
requestCtx - a HashMap representing request context. Web applications which require request context may use the BindingContext.HTTP_REQUEST and BindingContext.HTTP_RESPONSE keys to acquire a reference from from the BindingContext.

createSnapshot

public java.io.Serializable createSnapshot()
Description copied from interface: ManagedDataControl
Creates a snapshot of the state of the DataControl. A snapshot may be used to save the DataControl state so that it may be restored some time later. Returns a serializable handle to the snapshot.
Returns:
a snapshot handle

restoreSnapshot

public void restoreSnapshot(java.io.Serializable handle)
Description copied from interface: ManagedDataControl
Restore the state of the DataControl with the snapshot state that is referenced by the handle.
Parameters:
handle - Serializable a snaphsot handle that was created with ManagedDataControl.createSnapshot().

removeSnapshot

public void removeSnapshot(java.io.Serializable handle)
Description copied from interface: ManagedDataControl
Removes the snapshot associated with the snapshot handle.
Parameters:
handle - Serializable a snapshot handle that was created with ManagedDataControl.createSnapshot().

createSavepoint

public java.lang.Object createSavepoint()

restoreSavepoint

public void restoreSavepoint(java.lang.Object handle)

getDefinition

public Definition getDefinition(java.lang.String name,
                                int type)

getUnresolvedBindingContainer

protected DCBindingContainer getUnresolvedBindingContainer(java.lang.String fullName)

release

public void release(int flags)
Deprecated. release() will be invoked whenever the DC is to be released. The DC should invoke releaseBindings(int) in order to notify the DataBinding facility of the release. The default implementation of this method now invokes release().
Description copied from interface: DataControl
Based on the value of the flags parameter, releases all references to the objects in the data provider layer Valid values for flags are:

releaseFromDCFrame

public void releaseFromDCFrame()
To be called only from frame release.
For internal use only. Application developers should not use this
*** For internal framework use only ***

isReleasing

public boolean isReleasing()

release

public void release()
Description copied from interface: DataControl
Releases the DataControl. The DataControl should be in a collectable state after release() has been invokd.

This should close all open DataControl resources.

Specified by:
release in interface DataControl

releaseBindings

protected void releaseBindings(int flags)
Based on the value of the flags parameter, notifies the bindings to release references to the objects in the data provider layer Valid values for flags are:

getKeyAttributeDefs

public abstract AttributeDef[] getKeyAttributeDefs(DCIteratorBinding dataIter)
For internal use only. Application developers should not use this

getListBindingName

public abstract java.lang.String getListBindingName(DCIteratorBinding dataIter,
                                                    Key rowKey,
                                                    java.lang.String attrName,
                                                    java.lang.String name)

getListBindingRSI

public abstract RowSetIterator getListBindingRSI(DCIteratorBinding dataIter,
                                                 Key rowKey,
                                                 java.lang.String attrName,
                                                 java.lang.String name)

getPreferredListRSI

public abstract RowSetIterator getPreferredListRSI(DCIteratorBinding dataIter,
                                                   Key rowKey,
                                                   java.lang.String attrName,
                                                   java.lang.String name)

getListBindingDef

public abstract ListBindingDef getListBindingDef(DCIteratorBinding dataIter,
                                                 Key rowKey,
                                                 java.lang.String name)

releaseData

public boolean releaseData(DCIteratorBinding iter)

get

public java.lang.Object get(java.lang.Object keyObj)
override hashmap.get()
Specified by:
get in interface java.util.Map
Overrides:
get in class JboAbstractMap

internalGet

protected java.lang.Object internalGet(java.lang.String key)
For EL evaluation. Properties returned vis getter on this control bindings are: