|
Oracle Fusion Middleware Java API Reference for Oracle ADF Model 11g Release 1 (11.1.1) E10653-04 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractMap
oracle.jbo.common.JboAbstractMap
oracle.adf.model.binding.DCDataControl
oracle.adf.model.generic.DCGenericDataControl
public class DCGenericDataControl
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.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.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 |
---|
protected java.util.HashMap mStructureDefs
protected java.util.HashMap mRSIs
protected StructureDefImpl mDef
public static final java.lang.String DC_ROOT_ACC_NAME
Constructor Detail |
---|
protected DCGenericDataControl()
protected DCGenericDataControl(java.lang.String name)
public DCGenericDataControl(java.lang.String name, java.lang.String beanClass, java.lang.Object beanInstance)
public DCGenericDataControl(java.lang.String name, java.lang.String beanClass, java.lang.Object beanInstance, boolean root)
Method Detail |
---|
protected void initDCProperties(java.lang.String name, BindingContext ctx, java.util.Map dcDefAsParams, java.lang.String beanClass, java.lang.Object beanInstance)
public void release()
DataControl
This should close all open DataControl resources.
release
in interface DataControl
release
in class DCDataControl
public java.lang.Object getDataProvider()
DataControl
getDataProvider
in interface DataControl
getDataProvider
in class DCDataControl
protected java.lang.Object invokeMethod(DCInvokeMethod method, OperationBinding action, java.util.Map paramsMap)
DCDataControl
invokeMethod
in class DCDataControl
public boolean invokeOperation(java.util.Map map, OperationBinding action)
DataControl
invokeOperation
in interface DataControl
invokeOperation
in class DCDataControl
public boolean isTransactionDirty()
DCDataControl
isTransactionDirty
in class DCDataControl
public void commitTransaction()
DCDataControl
commitTransaction
in class DCDataControl
public void rollbackTransaction()
DCDataControl
rollbackTransaction
in class DCDataControl
public java.lang.Object registerDataProvider(DCRowContext ctx)
DCDataControl
registerDataProvider
in class DCDataControl
public boolean removeRowData(DCRowContext ctx)
DCDataControl
obj
parameter)
from the underlying data source.
removeRowData
in class DCDataControl
ctx
- the row context to be removed.
true
if the operation was successful.
false
otherwise.public java.lang.Object createRowData(DCRowContext ctx)
DCDataControl
createRowData
in class DCDataControl
public void validate()
DCDataControl
validate
in class DCDataControl
public void beginRequest(java.util.HashMap map)
DCDataControl
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.
beginRequest
in interface ManagedDataControl
beginRequest
in class DCDataControl
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.public void endRequest(java.util.HashMap map)
DCDataControl
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.
endRequest
in interface ManagedDataControl
endRequest
in class DCDataControl
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.public boolean resetState()
DCDataControl
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.
resetState
in interface ManagedDataControl
resetState
in class DCDataControl
public Definition getDefinition(java.lang.String name, int type)
getDefinition
in class DCDataControl
protected void initializeRSIs()
protected void initializeBindingContainer(DCBindingContainerDef formDef, DCBindingContainer formBnd, boolean initialize)
initializeBindingContainer
in class DCDataControl
protected void executeIteratorBinding(DCIteratorBinding iter)
executeIteratorBinding
in class DCDataControl
protected void executeIteratorBindingIfNeeded(DCIteratorBinding iter)
DCDataControl
executeIteratorBindingIfNeeded
in class DCDataControl
protected RowSetIterator getRowSetIterator(java.lang.String sourceName)
DCDataControl
getRowSetIterator
in class DCDataControl
protected RowSetIterator fetchRowSetIterator(java.lang.String path)
protected void closeRowSetIterators(boolean recurseDetailRSIs)
protected DCGenericRowSetIteratorImpl findRootRowSetIterator(java.lang.String name)
protected java.lang.Object getAccessorValue(RowSetIterator masterRSI, Row row, DCIteratorBinding iter, java.lang.String accName)
getAccessorValue
in class DCDataControl
public RowIterator findRowsByKeyValues(RowSetIterator rsi, Key[] keys)
public RowSetIterator findOrCreateMethodRowSetIterator(DCIteratorBinding iter, java.lang.String beanClass, java.lang.Object result)
findOrCreateMethodRowSetIterator
in class DCDataControl
public RowSetIterator findOrCreateAccessorRowSetIterator(DCIteratorBinding masterIter, DCIteratorBinding iter, java.lang.String accName, java.lang.String beanClass)
findOrCreateAccessorRowSetIterator
in class DCDataControl
public RowSetIterator findOrCreateAccessorRowSetIterator(RowSetIterator masterRSI, DCIteratorBinding iter, java.lang.String accName, java.lang.String beanClass)
findOrCreateAccessorRowSetIterator
in class DCDataControl
protected RowSetIterator createRowSetIteratorImpl(java.lang.String defName, java.lang.Object sourceObj, RowSetIterator master)
DCDataControl
createRowSetIteratorImpl
in class DCDataControl
public AttributeDef[] getKeyAttributeDefs(DCIteratorBinding dataIter)
getKeyAttributeDefs
in class DCDataControl
public void setCurrentRowWithKeyValue(DCIteratorBinding iter, java.lang.String stringValue)
DCDataControl
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.
setCurrentRowWithKeyValue
in class DCDataControl
public void setCurrentRowWithKey(DCIteratorBinding iter, java.lang.String stringKey)
DCDataControl
setCurrentRowWithKey
in class DCDataControl
public void setCurrentRowWithKey(DCIteratorBinding iter, Key key)
DCDataControl
setCurrentRowWithKey
in class DCDataControl
protected StructureDefImpl findStructureDef(java.lang.String beanClass)
protected java.lang.String getIteratorStructureDefName(DCIteratorBinding iter)
DCDataControl
getIteratorStructureDefName
in class DCDataControl
public AttributeDef[] getAttributeDefs(DCIteratorBinding iterBinding, java.lang.String[] attrNames)
DCDataControl
getAttributeDefs
in class DCDataControl
protected java.lang.Object fetchProperty(RowImpl row, java.lang.String propName)
protected java.lang.Object fetchProviderProperty(java.lang.String propName)
protected void restoreRSIs()
public boolean isOperationSupported(DCIteratorBinding iterBinding, byte oper)
isOperationSupported
in class DCDataControl
protected long getEstimatedRowCount(DCIteratorBinding iter)
DCDataControl
getEstimatedRowCount
in class DCDataControl
protected AttributeDefImpl[] getAttributeDefs(StructureDefImpl def)
AttributeDefImpl
instances
for the specified StructureDefImpl instance.
The constructor AttributeDefImpl.AttributeDefImpl(String, String, String, boolean, int)
should be used to create the AttributeDefImpl instances.
protected StructureDefImpl[] getAccessorDefs(StructureDefImpl def)
StructureDefImpl
instances for the specified StructureDefImpl instance.
The method StructureDefImpl.createNewAccessor(String, String, DCDataControl)
.
should be used to create StructureDefImpl instances.
public ViewCriteria getViewCriteria(DCIteratorBinding iter)
getViewCriteria
in class DCDataControl
public ViewCriteria createViewCriteria(DCIteratorBinding iter)
DCDataControl
createViewCriteria
in class DCDataControl
protected CriteriaAdapter getCriteriaAdapter()
protected RowMatch createCriteriaRowMatch(DCRowSetIteratorImpl rsi, ViewCriteria vc)
public void applyViewCriteria(ViewCriteria vc, DCIteratorBinding iter, RowSetIterator rsi)
applyViewCriteria
in class DCDataControl
protected RowSetIterator findOrCreateViewObjectForCriteria(DCIteratorBinding iter, ViewCriteria vc, RowSetIterator master, java.lang.String accName)
findOrCreateViewObjectForCriteria
in class DCDataControl
protected RowSetIterator findOrCreateViewObjectForCriteriaItem(DCIteratorBinding iter, ViewCriteriaItem vc, RowSetIterator master)
findOrCreateViewObjectForCriteriaItem
in class DCDataControl
protected RowSetIterator createAccessorRowSetIteratorForMasterRow(DCIteratorBinding iter, RowSetIterator masterRSI, Row row, java.lang.Object result, java.lang.String accName, java.lang.String beanClass, boolean trackMaster)
createAccessorRowSetIteratorForMasterRow
in class DCDataControl
public boolean isAttributeSortable(DCIteratorBinding iter, AttributeDef ad)
isAttributeSortable
in class DCDataControl
protected void applySortCriteria(DCIteratorBinding iter, SortCriteria[] sortby)
applySortCriteria
in class DCDataControl
protected SortCriteria[] getSortCriteria(DCIteratorBinding iter)
getSortCriteria
in class DCDataControl
protected void executeMethodIterators()
public ListBindingDef getListBindingDef(DCIteratorBinding iter, Key rowKey, java.lang.String name)
getListBindingDef
in class DCDataControl
public java.lang.String getListBindingName(DCIteratorBinding iter, Key rowKey, java.lang.String attrName, java.lang.String name)
getListBindingName
in class DCDataControl
public RowSetIterator getListBindingRSI(DCIteratorBinding iter, Key rowKey, java.lang.String attrName, java.lang.String name)
getListBindingRSI
in class DCDataControl
public RowSetIterator getPreferredListRSI(DCIteratorBinding iter, Key rowKey, java.lang.String attrName, java.lang.String name)
getPreferredListRSI
in class DCDataControl
public java.util.ArrayList getEventDefinitions(java.lang.String methodAccName, java.lang.String[] argTypes)
public void addDataChangeListener(java.lang.Object dataObj, DataChangeListener dcl)
addDataChangeListener
in class DCDataControl
public void removeDataChangeListener(java.lang.Object dataObj, DataChangeListener dcl)
removeDataChangeListener
in class DCDataControl
public int startEvents(int fromIndex)
startEvents
in class DCDataControl
public int getLastEventId()
getLastEventId
in class DCDataControl
protected void clearIteratorBinding(DCIteratorBinding iter)
clearIteratorBinding
in class DCDataControl
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Model 11g Release 1 (11.1.1) E10653-04 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |