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

oracle.adf.model.generic
Class DCGenericDataControl

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

public class DCGenericDataControl
extends DCDataControl


Nested Class Summary
 
Nested classes inherited from class java.util.Map
java.util.Map.Entry
 
Field Summary
static java.lang.String DC_ROOT_ACC_NAME
           
protected  StructureDefImpl mDef
           
protected  java.util.HashMap mRSIs
           
protected  java.util.HashMap 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
protected DCGenericDataControl(java.lang.String name)
           
  DCGenericDataControl(java.lang.String name, java.lang.String beanClass, java.lang.Object beanInstance)
           
  DCGenericDataControl(java.lang.String name, java.lang.String beanClass, java.lang.Object beanInstance, boolean root)
           
 
Method Summary
protected  void applySortCriteria(DCIteratorBinding iter, SortCriteria[] sortby)
          Sets the sort critiera that will be applied next time when the source for this iteratorBinding is executed.
protected  void closeRowSetIterators(boolean recurseDetailRSIs)
          Clears the current data and state associated with all RSIs contained in this data control.
 void commitTransaction()
          Invokes the BC4J transaction's commit() method to save all changes to the database.
 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.
protected  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.
protected  void executeIteratorBinding(DCIteratorBinding iter)
          Clears the dataProvider iterator cached on the RowSet bound to given iterator binding, so that the method accessor is invoked again to fetch a fresh dataProvider for the association RowSet.
protected  void executeIteratorBindingIfNeeded(DCIteratorBinding iter)
          This method is invoked when a bindingcontainer is 'refreshing' itself before it's data is displayed.
protected  void executeMethodIterators()
           
protected  java.lang.Object fetchProperty(RowImpl row, java.lang.String propName)
           
protected  java.lang.Object fetchProviderProperty(java.lang.String propName)
           
protected  RowSetIterator fetchRowSetIterator(java.lang.String path)
           
 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)
          Use findOrCreateAccessorRowSetIterator(DCIteratorBinding masterIter....) instead.
 RowSetIterator findOrCreateMethodRowSetIterator(DCIteratorBinding iter, java.lang.String beanClass, java.lang.Object result)
           
protected  DCGenericRowSetIteratorImpl findRootRowSetIterator(java.lang.String name)
           
protected  StructureDefImpl findStructureDef(java.lang.String beanClass)
           
protected  StructureDefImpl[] getAccessorDefs(StructureDefImpl def)
          Invoked for dynamic DataControls.
protected  java.lang.Object getAccessorValue(RowSetIterator masterRSI, Row row, DCIteratorBinding iter, java.lang.String accName)
           
 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.
protected  AttributeDefImpl[] getAttributeDefs(StructureDefImpl def)
          Invoked for dynamic DataControls.
protected  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  RowSetIterator getRowSetIterator(java.lang.String sourceName)
          Given the name of an RSI, find if it's already created and cached on the datacontrol
protected  SortCriteria[] getSortCriteria(DCIteratorBinding iter)
          Returns an ordered array of SortCriteria that will be applied when the source for this iteratorBinding is executed.
protected  void initializeBindingContainer(DCBindingContainerDef formDef, DCBindingContainer formBnd, boolean initialize)
           
protected  void initializeRSIs()
          Internal use only.
 boolean isOperationSupported(DCIteratorBinding iterBinding, byte oper)
          Returns false for execute, create, remove and find Operations
 boolean isTransactionDirty()
          Returns true if this transaction has been dirtied by this application.
 boolean removeRowData(DCRowContext ctx)
          This method is to remove the row object (the obj parameter) from the underlying data source.
protected  void restoreRSIs()
           
 void rollbackTransaction()
          Helper method that invokes rollback on the current Transaction.
 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.
 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.
 
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, invokeMethod, isClientTier, isJClientApp, isRoot, isTransactionModified, rebuildIteratorIfNeeded, registerDataProvider, release, release, removeBindingContainer, removeBindingWithExc, removeRowDataFromCollection, removeStatusBarInterface, removeTransactionStateListener, reportException, resetAttributeExceptionInRow, resetState, 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

mStructureDefs

protected java.util.HashMap mStructureDefs

mRSIs

protected java.util.HashMap mRSIs

mDef

protected StructureDefImpl mDef

DC_ROOT_ACC_NAME

public static java.lang.String DC_ROOT_ACC_NAME
Constructor Detail

DCGenericDataControl

protected DCGenericDataControl(java.lang.String name)

DCGenericDataControl

public DCGenericDataControl(java.lang.String name,
                            java.lang.String beanClass,
                            java.lang.Object beanInstance)

DCGenericDataControl

public DCGenericDataControl(java.lang.String name,
                            java.lang.String beanClass,
                            java.lang.Object beanInstance,
                            boolean root)
Method Detail

isTransactionDirty

public boolean isTransactionDirty()
Description copied from class: DCDataControl
Returns true if this transaction has been dirtied by this application.

Specified by:
isTransactionDirty in class DCDataControl

commitTransaction

public void commitTransaction()
Description copied from class: DCDataControl
Invokes the BC4J transaction's commit() method to save all changes to the database.

Overrides:
commitTransaction in class DCDataControl

rollbackTransaction

public void rollbackTransaction()
Description copied from class: DCDataControl
Helper method that invokes rollback on the current Transaction.

Overrides:
rollbackTransaction in class DCDataControl

removeRowData

public boolean removeRowData(DCRowContext ctx)
Description copied from class: DCDataControl
This method is to remove the row object (the obj parameter) from the underlying data source.

Overrides:
removeRowData in class DCDataControl
Returns:
true if the operation was successful. false otherwise.

createRowData

public java.lang.Object createRowData(DCRowContext ctx)
Description copied from class: DCDataControl
Create a new row for the iterator associated with the given iterator-binding at the given index and return the new row.

Overrides:
createRowData in class DCDataControl

initializeRSIs

protected void initializeRSIs()
Internal use only. Application developers should not extend.


initializeBindingContainer

protected void initializeBindingContainer(DCBindingContainerDef formDef,
                                          DCBindingContainer formBnd,
                                          boolean initialize)
Overrides:
initializeBindingContainer in class DCDataControl

executeIteratorBinding

protected void executeIteratorBinding(DCIteratorBinding iter)
Clears the dataProvider iterator cached on the RowSet bound to given iterator binding, so that the method accessor is invoked again to fetch a fresh dataProvider for the association RowSet.

Specified by:
executeIteratorBinding in class DCDataControl

executeIteratorBindingIfNeeded

protected void executeIteratorBindingIfNeeded(DCIteratorBinding iter)
Description copied from class: DCDataControl
This method is invoked when a bindingcontainer is 'refreshing' itself before it's data is displayed. Only execute the collections bound to this iterator if they're not executed yet. Incase of method-result bound collections, this method may refresh the collection references in the associated RSIs.

Specified by:
executeIteratorBindingIfNeeded in class DCDataControl

getRowSetIterator

protected RowSetIterator getRowSetIterator(java.lang.String sourceName)
Description copied from class: DCDataControl
Given the name of an RSI, find if it's already created and cached on the datacontrol

Specified by:
getRowSetIterator in class DCDataControl

fetchRowSetIterator

protected RowSetIterator fetchRowSetIterator(java.lang.String path)

closeRowSetIterators

protected void closeRowSetIterators(boolean recurseDetailRSIs)
Clears the current data and state associated with all RSIs contained in this data control.


findRootRowSetIterator

protected DCGenericRowSetIteratorImpl findRootRowSetIterator(java.lang.String name)

getAccessorValue

protected java.lang.Object getAccessorValue(RowSetIterator masterRSI,
                                            Row row,
                                            DCIteratorBinding iter,
                                            java.lang.String accName)
Specified by:
getAccessorValue in class DCDataControl

findOrCreateMethodRowSetIterator

public RowSetIterator findOrCreateMethodRowSetIterator(DCIteratorBinding iter,
                                                       java.lang.String beanClass,
                                                       java.lang.Object result)
Overrides:
findOrCreateMethodRowSetIterator in class DCDataControl

findOrCreateAccessorRowSetIterator

public RowSetIterator findOrCreateAccessorRowSetIterator(DCIteratorBinding masterIter,
                                                         DCIteratorBinding iter,
                                                         java.lang.String accName,
                                                         java.lang.String beanClass)
Overrides:
findOrCreateAccessorRowSetIterator in class DCDataControl

findOrCreateAccessorRowSetIterator

public RowSetIterator findOrCreateAccessorRowSetIterator(RowSetIterator masterRSI,
                                                         DCIteratorBinding iter,
                                                         java.lang.String accName,
                                                         java.lang.String beanClass)
Description copied from class: DCDataControl
Use findOrCreateAccessorRowSetIterator(DCIteratorBinding masterIter....) instead.

Overrides:
findOrCreateAccessorRowSetIterator in class DCDataControl

createRowSetIteratorImpl

protected RowSetIterator createRowSetIteratorImpl(java.lang.String defName,
                                                  java.lang.Object sourceObj,
                                                  RowSetIterator master)
Description copied from class: DCDataControl
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.

Specified by:
createRowSetIteratorImpl in class DCDataControl

setCurrentRowWithKeyValue

public void setCurrentRowWithKeyValue(DCIteratorBinding iter,
                                      java.lang.String stringValue)
Description copied from class: DCDataControl
This method works for Collections with only one Key attribute and not for multi-part attribute keys.

Converts the stringValue into a Row key (using collection's key metadata) and then calls findByKey on the RowSetIterator to find the row matching this key. If a row is found, that row is set as current.

Specified by:
setCurrentRowWithKeyValue in class DCDataControl

setCurrentRowWithKey

public void setCurrentRowWithKey(DCIteratorBinding iter,
                                 java.lang.String stringKey)
Description copied from class: DCDataControl
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. If a row is found, that row is set as current.

Specified by:
setCurrentRowWithKey in class DCDataControl

findStructureDef

protected StructureDefImpl findStructureDef(java.lang.String beanClass)

getAttributeDefs

public AttributeDef[] getAttributeDefs(DCIteratorBinding iterBinding,
                                       java.lang.String[] attrNames)
Description copied from class: DCDataControl
Return attribute definition for the given iterator binding and for the given set of attributes from the elements-definition of the mapped collection.

Overrides:
getAttributeDefs in class DCDataControl

fetchProperty

protected java.lang.Object fetchProperty(RowImpl row,
                                         java.lang.String propName)

fetchProviderProperty

protected java.lang.Object fetchProviderProperty(java.lang.String propName)

restoreRSIs

protected void restoreRSIs()

isOperationSupported

public boolean isOperationSupported(DCIteratorBinding iterBinding,
                                    byte oper)
Returns false for execute, create, remove and find Operations

Overrides:
isOperationSupported in class DCDataControl

getEstimatedRowCount

protected long getEstimatedRowCount(DCIteratorBinding iter)
Description copied from class: DCDataControl
Implement estimated row count logic in this method and return the row count for a collection bound to this iterator.

Specified by:
getEstimatedRowCount in class DCDataControl

getAttributeDefs

protected AttributeDefImpl[] getAttributeDefs(StructureDefImpl def)
Invoked for dynamic DataControls. Should be implemented to return an array of AttributeDefImpl instances for the specified StructureDefImpl instance.

The constructor AttributeDefImpl.AttributeDefImpl(String, String, String, boolean, int) should be used to create the AttributeDefImpl instances.


getAccessorDefs

protected StructureDefImpl[] getAccessorDefs(StructureDefImpl def)
Invoked for dynamic DataControls. Should be implemented to return at array of accesor StructureDefImpl instances for the specified StructureDefImpl instance.

The method StructureDefImpl.createNewAccessor(String, String). should be used to create StructureDefImpl instances.


applySortCriteria

protected void applySortCriteria(DCIteratorBinding iter,
                                 SortCriteria[] sortby)
Sets the sort critiera that will be applied next time when the source for this iteratorBinding is executed.

Specified by:
applySortCriteria in class DCDataControl

getSortCriteria

protected SortCriteria[] getSortCriteria(DCIteratorBinding iter)
Returns an ordered array of SortCriteria that will be applied when the source for this iteratorBinding is executed.

Specified by:
getSortCriteria in class DCDataControl

executeMethodIterators

protected void executeMethodIterators()

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

 

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