Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1)

E10653-03


oracle.adf.model.generic
Class DCGenericDataControl

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

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

public class DCGenericDataControl
extends 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 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, GET_ApplicationModule, GET_dataProvider, GET_DataProvider, GET_MethodResults, GET_Name, JCLIENT, mBindingContainerList, mDataControlFrameName, mDataProvider, mErrorHandler, mErrorHandlerActive, mErrorHandlerThrow, METHOD_RESULT, mIsReleased, mIsReleasing, mIsRoot, mLocaleCtx, mLock, mName, mParent, mRootApplication, mStatusBarList, mTxnListeners, mUserData, OPER_CTRL_BINDING_VALIDATION, OPER_DATA_ROW_CREATE, OPER_DATA_ROW_CREATE_ONLY, 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, VCCRITERIA, VCCRITERIAITEM, VCCRITERIAITEMVALUE, 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 DCGenericDataControl()
          Subclasses calling this constructor should then override and call initDCProperties method as well to initialize the datacontrol properties.
protected DCGenericDataControl(java.lang.String name)
          Subclasses calling this constructor should then override and call initDCProperties method as well to initialize the datacontrol properties.
  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
 void addDataChangeListener(java.lang.Object dataObj, DataChangeListener dcl)
           
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.
 void applyViewCriteria(ViewCriteria vc, DCIteratorBinding iter, RowSetIterator rsi)
          Sets the view criteria on the given RSI if it's a DCRowSetIteratorImpl or subclass thereof.
 void beginRequest(java.util.HashMap map)
          Invoked in some contexts to signal the beginning of a model request.
protected  void clearIteratorBinding(DCIteratorBinding iter)
           
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.
protected  RowSetIterator createAccessorRowSetIteratorForMasterRow(DCIteratorBinding iter, RowSetIterator masterRSI, Row row, java.lang.Object result, java.lang.String accName, java.lang.String beanClass, boolean trackMaster)
           
protected  RowMatch createCriteriaRowMatch(DCRowSetIteratorImpl rsi, ViewCriteria vc)
           
 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.
 ViewCriteria createViewCriteria(DCIteratorBinding iter)
          Internal: Applications should not use this method. Create a new viewCriteria associated with the given iterator binding's collection.
 void endRequest(java.util.HashMap map)
          Invoked in some contexts to signal the end of a model request.
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)
          Deprecated. since 10.1.2
 RowSetIterator findOrCreateMethodRowSetIterator(DCIteratorBinding iter, java.lang.String beanClass, java.lang.Object result)
           
protected  RowSetIterator findOrCreateViewObjectForCriteria(DCIteratorBinding iter, ViewCriteria vc, RowSetIterator master, java.lang.String accName)
           
protected  RowSetIterator findOrCreateViewObjectForCriteriaItem(DCIteratorBinding iter, ViewCriteriaItem vc, RowSetIterator master)
           
protected  DCGenericRowSetIteratorImpl findRootRowSetIterator(java.lang.String name)
           
 RowIterator findRowsByKeyValues(RowSetIterator rsi, Key[] keys)
          Advanced internal for framework use only
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  CriteriaAdapter getCriteriaAdapter()
          Return the criteria adapter that should be used to create RowMatch for any view criterias attached to RSIs created within this datacontrol
 java.lang.Object getDataProvider()
          Return the Business Service Object that this datacontrol is associated with.
 Definition getDefinition(java.lang.String name, int type)
          Internal use only.
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.
 java.util.ArrayList getEventDefinitions(java.lang.String methodAccName, java.lang.String[] argTypes)
          Returns an arraylist of EventDefinitions defined in the structure definition of this DataControl
protected  java.lang.String getIteratorStructureDefName(DCIteratorBinding iter)
          return structuredef beanclass name for this iterator binding.
 AttributeDef[] getKeyAttributeDefs(DCIteratorBinding dataIter)
           
 int getLastEventId()
          Subclasses may choose to implement datachangemanager returns -1;
 ListBindingDef getListBindingDef(DCIteratorBinding iter, Key rowKey, java.lang.String name)
           
 java.lang.String getListBindingName(DCIteratorBinding iter, Key rowKey, java.lang.String attrName, java.lang.String name)
           
 RowSetIterator getListBindingRSI(DCIteratorBinding iter, Key rowKey, java.lang.String attrName, java.lang.String name)
           
 RowSetIterator getPreferredListRSI(DCIteratorBinding iter, Key rowKey, java.lang.String attrName, java.lang.String name)
           
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.
 ViewCriteria getViewCriteria(DCIteratorBinding iter)
          Return a view criteria object attached to the RSI that this iterator binding is associated with.
protected  void initDCProperties(java.lang.String name, BindingContext ctx, java.util.Map dcDefAsParams, java.lang.String beanClass, java.lang.Object beanInstance)
          this may get called twice - once from constructor (optionally) and once from factory.
protected  void initializeBindingContainer(DCBindingContainerDef formDef, DCBindingContainer formBnd, boolean initialize)
           
protected  void initializeRSIs()
          Internal use only.
protected  java.lang.Object invokeMethod(DCInvokeMethod method, OperationBinding action, java.util.Map paramsMap)
          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 map, OperationBinding action)
          All OperationBindings should first delegate to the DataControl associated with the binding to perform the action.
 boolean isAttributeSortable(DCIteratorBinding iter, AttributeDef ad)
          Subclasses need to implement sorting and turn this flag on if the given attribute is sortable for a given iterator.
 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.
 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 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 resetState()
          Resets the DataControl.
protected  void restoreRSIs()
           
 void rollbackTransaction()
          Helper method that invokes rollback on the current Transaction.
 void setCurrentRowWithKey(DCIteratorBinding iter, Key key)
          Use the given key to set the current row in the RowSetIterator for the given iteratorbinding.
 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.
 int startEvents(int fromIndex)
          Subclasses may choose to implement datachangemanager returns fromId as is.
 void validate()
          Called when datacontrol changes needs to be validated after updates have been processed for a page.

 

Methods inherited from class oracle.adf.model.binding.DCDataControl
_internal_dbg_debug_data, addBindingContainer, addBindingContainer, addBindingContainer, addBindingContainerRef, addBindingWithExc, addDataChangeListener, addOrCreateBindingContainer, addStatusBarInterface, addTransactionStateListener, cacheMethodResult, callCommitTransaction, cleanup, connect, createAccessorRowSetIterator, createAccessorRowSetIterator, createAccessorRowSetIterator, createBindingContainer, createBindingContainerInstance, createRowSetIteratorImpl, createSavepoint, createSnapshot, displayStatus, displayStatus, doneCommit, doneRollback, executeIteratorBindingWithParams, findBindingContainer, findOrCreateRowSetIteratorImpl, findVariable, focusGained, get, getAdaptedDC, getAppDefName, getApplicationModule, getBindingContext, getCurrentErrorHandler, getDef, getDeferredEstimatedRowCount, getErrorHandlerActive, getLocaleContext, getMethodResults, getMethodResultUseCount, getName, getParent, getRootDataControl, getSecurityContext, getSessionContext, getSessionContextManager, getSubstitutedDefNames, getSyncLock, getUnresolvedBindingContainer, getUserData, hasBindingsWithExc, hasKeyAttributes, hasOperationParamsChanged, hasPermission, hasPermission, hasPermission, initialize, initializeContainerFromDef, initializeFromMetadata, internalCacheMethodResults, internalGet, internalGetCurrentRow, internalGetIterBindingViewObject, internalPut, internalSetTransactionStateChanged, invalidateMethodResult, invokeMethod, isBoundRowIteratorEvent, isClientTier, isDataChangeManager, isJClientApp, isRoot, isTransactionModified, markAccessorIterListenerForFKMerge, modifyTransactionStateForAttributeSet, processChangeNotifications, rebuildIteratorIfNeeded, release, releaseBindings, releaseData, releaseFromDCFrame, releaseMethodResults, removeBindingContainer, removeBindingWithExc, removeDataChangeListener, removeRowDataFromCollection, removeSnapshot, removeStatusBarInterface, removeTransactionStateListener, reportException, resetAttributeExceptionInRow, resolveAttributeDefs, restoreSavepoint, restoreSnapshot, setAppDefName, setAttributeInRow, setAttributesInRow, setBindingContext, setClientApp, setDataControlFrameName, setDataProvider, setDef, setErrorHandler, setErrorHandlerActive, setLocaleContext, setName, setParent, setPartialUpdate, setPinned, setSessionContext, setTransactionModified, stopEvents, sync, syncIfNeeded, syncNeeded, toString, transactionStateChanged

 

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

mStructureDefs

protected java.util.HashMap mStructureDefs

mRSIs

protected java.util.HashMap mRSIs

mDef

protected StructureDefImpl mDef

DC_ROOT_ACC_NAME

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

Constructor Detail

DCGenericDataControl

protected DCGenericDataControl()
Subclasses calling this constructor should then override and call initDCProperties method as well to initialize the datacontrol properties.

DCGenericDataControl

protected DCGenericDataControl(java.lang.String name)
Subclasses calling this constructor should then override and call initDCProperties method as well to initialize the datacontrol properties.

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

initDCProperties

protected void initDCProperties(java.lang.String name,
                                BindingContext ctx,
                                java.util.Map dcDefAsParams,
                                java.lang.String beanClass,
                                java.lang.Object beanInstance)
this may get called twice - once from constructor (optionally) and once from factory.

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
Overrides:
release in class DCDataControl

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
Overrides:
getDataProvider in class DCDataControl
Returns:
The underlying business service object.

invokeMethod

protected java.lang.Object invokeMethod(DCInvokeMethod method,
                                        OperationBinding action,
                                        java.util.Map paramsMap)
Description copied from class: DCDataControl
Override this method if a datacontrol wants to implement custom invocation of a method and avoid introspection and invoke method call using reflection. ADF calls this method to invoke a methods bound via custom method-action binding.
Overrides:
invokeMethod in class DCDataControl

invokeOperation

public boolean invokeOperation(java.util.Map map,
                               OperationBinding action)
Description copied from interface: DataControl
All OperationBindings should first delegate to the DataControl associated with the binding to perform the action. DataControls may choose to interpret a given action differently based on the data/collection that action is bound to.
Specified by:
invokeOperation in interface DataControl
Overrides:
invokeOperation in class DCDataControl
Returns:
true if this datacontrol has handled this action, false if the action should be interpreted in the bindings framework or in the caller.

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

registerDataProvider

public java.lang.Object registerDataProvider(DCRowContext ctx)
Description copied from class: DCDataControl
Called before the row in the RowContext object is modified/marked as removed. This gives datacontrol implementations a chance to register the row's data-provider as a modified object in the associated model.
Overrides:
registerDataProvider 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
Parameters:
ctx - the row context to be removed.
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

validate

public void validate()
Description copied from class: DCDataControl
Called when datacontrol changes needs to be validated after updates have been processed for a page.
Overrides:
validate in class DCDataControl

beginRequest

public void beginRequest(java.util.HashMap map)
Description copied from class: DCDataControl
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
Overrides:
beginRequest in class DCDataControl
Parameters:
map - 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 map)
Description copied from class: DCDataControl
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
Overrides:
endRequest in class DCDataControl
Parameters:
map - 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.

resetState

public boolean resetState()
Description copied from class: DCDataControl
Resets the DataControl. DataControl providers should extend this method to reset any model session state that may have been managed by this DataControl. For example:

The ADF/BC DataControl has extended resetState to release the DataControl ApplicationModule to the ApplicationPool in unmanaged release mode.

An EJB DataControl provider may extend resetState to close the DataControl EJB SessionBean

The Toplink DataControl provider extends resetState to reset the DataControl's UnitOfWork and associated RowSetIterators.

Please note that resetState may not occur immediately. If beginRequest has been invoked on the DataControl then resetState processing will be deferred until endRequest processing.

Extending DataControl providers may optionally invoke release(REL_DATA_REFS) after performing and DataControl specific resetState handling.

Specified by:
resetState in interface ManagedDataControl
Overrides:
resetState in class DCDataControl
Returns:
true if resetState was processed immediately. false if resetState was deferred to endRequest processing.

getDefinition

public Definition getDefinition(java.lang.String name,
                                int type)
Internal use only. Application developers should not use this method.
Overrides:
getDefinition 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

findRowsByKeyValues

public RowIterator findRowsByKeyValues(RowSetIterator rsi,
                                       Key[] keys)
Advanced internal for framework use only

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)
Deprecated. since 10.1.2
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

getKeyAttributeDefs

public AttributeDef[] getKeyAttributeDefs(DCIteratorBinding dataIter)
Specified by:
getKeyAttributeDefs in class DCDataControl
For internal use only. Application developers should not use this

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

setCurrentRowWithKey

public void setCurrentRowWithKey(DCIteratorBinding iter,
                                 Key key)
Description copied from class: DCDataControl
Use the given key to set the current row in the RowSetIterator for the given iteratorbinding.
Specified by:
setCurrentRowWithKey in class DCDataControl

findStructureDef

protected StructureDefImpl findStructureDef(java.lang.String beanClass)

getIteratorStructureDefName

protected java.lang.String getIteratorStructureDefName(DCIteratorBinding iter)
Description copied from class: DCDataControl
return structuredef beanclass name for this iterator binding.
Overrides:
getIteratorStructureDefName in class DCDataControl

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, DCDataControl). should be used to create StructureDefImpl instances.


getViewCriteria

public ViewCriteria getViewCriteria(DCIteratorBinding iter)
Return a view criteria object attached to the RSI that this iterator binding is associated with. This method creates an empty ViewCriteria if non exists on the RSI.
Overrides:
getViewCriteria in class DCDataControl

createViewCriteria

public ViewCriteria createViewCriteria(DCIteratorBinding iter)
Description copied from class: DCDataControl
Internal: Applications should not use this method. Create a new viewCriteria associated with the given iterator binding's collection.
Overrides:
createViewCriteria in class DCDataControl

getCriteriaAdapter

protected CriteriaAdapter getCriteriaAdapter()
Return the criteria adapter that should be used to create RowMatch for any view criterias attached to RSIs created within this datacontrol

createCriteriaRowMatch

protected RowMatch createCriteriaRowMatch(DCRowSetIteratorImpl rsi,
                                          ViewCriteria vc)

applyViewCriteria

public void applyViewCriteria(ViewCriteria vc,
                              DCIteratorBinding iter,
                              RowSetIterator rsi)
Sets the view criteria on the given RSI if it's a DCRowSetIteratorImpl or subclass thereof. The next fetch from the dataProvider of this RSI will be filtered based on the criteria.
Specified by:
applyViewCriteria in class DCDataControl

findOrCreateViewObjectForCriteria

protected RowSetIterator findOrCreateViewObjectForCriteria(DCIteratorBinding iter,
                                                           ViewCriteria vc,
                                                           RowSetIterator master,
                                                           java.lang.String accName)
Specified by:
findOrCreateViewObjectForCriteria in class DCDataControl

findOrCreateViewObjectForCriteriaItem

protected RowSetIterator findOrCreateViewObjectForCriteriaItem(DCIteratorBinding iter,
                                                               ViewCriteriaItem vc,
                                                               RowSetIterator master)
Specified by:
findOrCreateViewObjectForCriteriaItem in class DCDataControl

createAccessorRowSetIteratorForMasterRow

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

isAttributeSortable

public boolean isAttributeSortable(DCIteratorBinding iter,
                                   AttributeDef ad)
Subclasses need to implement sorting and turn this flag on if the given attribute is sortable for a given iterator.
Overrides:
isAttributeSortable in class DCDataControl

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()

getListBindingDef

public ListBindingDef getListBindingDef(DCIteratorBinding iter,
                                        Key rowKey,
                                        java.lang.String name)
Specified by:
getListBindingDef in class DCDataControl

getListBindingName

public java.lang.String getListBindingName(DCIteratorBinding iter,
                                           Key rowKey,
                                           java.lang.String attrName,
                                           java.lang.String name)
Specified by:
getListBindingName in class DCDataControl

getListBindingRSI

public RowSetIterator getListBindingRSI(DCIteratorBinding iter,
                                        Key rowKey,
                                        java.lang.String attrName,
                                        java.lang.String name)
Specified by:
getListBindingRSI in class DCDataControl

getPreferredListRSI

public RowSetIterator getPreferredListRSI(DCIteratorBinding iter,
                                          Key rowKey,
                                          java.lang.String attrName,
                                          java.lang.String name)
Specified by:
getPreferredListRSI in class DCDataControl

getEventDefinitions

public java.util.ArrayList getEventDefinitions(java.lang.String methodAccName,
                                               java.lang.String[] argTypes)
Returns an arraylist of EventDefinitions defined in the structure definition of this DataControl

addDataChangeListener

public void addDataChangeListener(java.lang.Object dataObj,
                                  DataChangeListener dcl)
Specified by:
addDataChangeListener in class DCDataControl

removeDataChangeListener

public void removeDataChangeListener(java.lang.Object dataObj,
                                     DataChangeListener dcl)
Specified by:
removeDataChangeListener in class DCDataControl

startEvents

public int startEvents(int fromIndex)
Subclasses may choose to implement datachangemanager returns fromId as is.
Specified by:
startEvents in class DCDataControl

getLastEventId

public int getLastEventId()
Subclasses may choose to implement datachangemanager returns -1;
Specified by:
getLastEventId in class DCDataControl

clearIteratorBinding

protected void clearIteratorBinding(DCIteratorBinding iter)
Specified by:
clearIteratorBinding in class DCDataControl

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1)

E10653-03


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