|
Oracle ADF Model and Business Components API Reference 10.1.2 B14022-01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object oracle.adf.model.binding.DCIteratorBinding
DCIteratorBinding is the binding class that interacts with RowIterator objects to iterate over rows and provide the current row(s) for use in a client application or to view via various control bindings. DCIteratorBinding objects are uniquely identified by name in a DCBindingContainer which acts as a container of iterator bindings. This class handles the events generated from the associated RowIterator and sends the current Row (rows in range) over to individual control bindings to display current data. This class also manages the findMode data for the associated iterator and ViewObject(incase of BC4J).
At runtime, an application can bind an instance of oracle.jbo.NavigatableRowIterator
to a DCIteratorBinding object using the bindRowSetIterator
method.
Field Summary | |
protected boolean |
inExecute
|
protected ApplicationModule |
mAM
|
protected Row |
mCreatedRowRef
|
protected DCDataControl |
mDC
|
protected int |
mRangeSize
|
static int |
RANGESIZE_DO_NOT_OVERRIDE
|
static int |
RANGESIZE_UNLIMITED
|
Constructor Summary | |
protected |
DCIteratorBinding()
|
protected |
DCIteratorBinding(ApplicationModule am,
java.lang.String voName,
java.lang.String rsiName)
When the usage only needs one row at a time, use this constructor to create an iterator binding. |
protected |
DCIteratorBinding(ApplicationModule am,
java.lang.String voName,
java.lang.String rsiName,
int rangeSize)
Use this constructor if a usage needs a specific range size on the associated iterator. |
protected |
DCIteratorBinding(BindingContext ctx,
java.lang.String dcName,
java.lang.String sourceName,
java.lang.String rsiName,
int rangeSize)
Use this constructor if a usage needs a specific range size on the associated iterator. |
protected |
DCIteratorBinding(DCDataControl dc,
RowSetIterator rsi)
When an application has a RowSet it should use this constructor. |
protected |
DCIteratorBinding(DCIteratorBinding iterBinding)
|
Method Summary | |
void |
addActionBinding(DCControlBinding bnd)
Adds the given action control binding object to its list. |
void |
addValueBinding(DCControlBinding bnd)
Adds the given control binding object to its list. |
boolean |
allowsRefreshControl()
|
void |
applySortCriteria(SortCriteria[] sortby)
Sets the sort critiera that will be applied next time when the source for this iteratorBinding is executed. |
void |
bindRowSetIterator(NavigatableRowIterator iter,
boolean initRangeSize)
Use this method to bind a new instance of RowIterator from a Business Service to this binding. |
protected void |
cacheCreatedRow(RowSetIterator rsi,
Row row)
|
Key |
createKey(java.lang.String stringKey)
Given the key string, convert it to a Key using the associated RowSetIterator's StructureDef. |
void |
executeQuery()
Executes the query or the RowSet behind this iterator binding object. |
void |
executeQueryIfNeeded()
Executes the query or the RowSet behind this iterator binding object if not already executed. |
protected void |
fetchAttributeProperties()
|
java.util.ArrayList |
getActionBindingList()
Returns a list of DCCtrlActionBinding objects that are associated with this iterator binding. |
Row[] |
getAllRowsInRange()
Returns an array of rows in the current range of the current RowIterator. |
AttributeDef[] |
getAttributeDefs()
get all attribute defs for the RSI that this iterator binding is bound to. |
AttributeDef[] |
getAttributeDefs(java.lang.String[] attrNames)
return attribute defs for attributes that are named in the given array. |
DCBindingContainer |
getBindingContainer()
Return form binding object of this iterator binding's container. |
Row |
getCurrentRow()
Returns the current row of the iterator with which this binding object is associated. |
int |
getCurrentRowIndexInRange()
Returns current row index in the current Range in the Rowsetiterator |
java.lang.String |
getCurrentRowKeyString()
Returns String version of the row key for the current row in the associated iterator. |
DCDataControl |
getDataControl()
Helper method to return the DCDataControl from this binding's BindingContainer. |
DCIteratorBindingDef |
getDef()
Internal: Applications should not use this method. |
java.lang.String |
getDisplayName()
Returns the name of this IteratorBinding. |
JboException |
getError()
|
long |
getEstimatedRowCount()
|
java.lang.String |
getIteratorDefName()
|
RowSetIterator |
getLovRowSetIterator()
|
java.lang.String |
getName()
Returns the name of this iterator binding. |
NavigatableRowIterator |
getNavigatableRowIterator()
Returns the current RowIterator, which can be a data RowSetIterator or a find mode ViewCriteria based on the find mode. |
int |
getRangeSize()
Returns current rowsetiterator's range size |
int |
getRangeStart()
Returns current rowsetiterator's range start |
Row |
getRowAtRangeIndex(int rangeIndex)
Returns the row of given range index. |
RowSetIterator |
getRowSetIterator()
Returns the current data RowSetIterator that holds rows with which this iterator binding object and its associated control-bindings are working. |
SortCriteria[] |
getSortCriteria()
Returns an ordered array of SortCriteria that will be applied when the source for this iteratorBinding is executed. |
java.lang.String |
getSourceName()
Returns the name of the collection instance to which this iterator binding is bound to. |
java.lang.Object |
getSyncLock()
|
java.util.ArrayList |
getValueBindingList()
Returns a list of DCCtrlValueBinding objects that are associated with this iterator binding. |
ViewCriteria |
getViewCriteria()
|
java.lang.String |
getViewDefName()
Internal: Applications should not use this method. Returns the name of the ViewDefinition object. |
ViewObject |
getViewObject()
Returns the instance of ViewObject of the RowIterator to which this iterator binding is associated. |
java.lang.String |
getVOName()
Internal: Applications should not use this method. Returns the name of the ViewObject instance of the iterator to which this iterator binding is associated. |
boolean |
hasRSI()
returns true if a RowSetIterator has been bound to this iterator. |
protected DCDataControl |
initDataControl()
|
protected RowSetIterator |
initSourceRSI()
|
void |
internalGetNextRangeSet()
|
void |
internalGetPreviousRangeSet()
|
boolean |
isAccessorIterator()
Is this bound to a collection returned from a bean accessor? |
boolean |
isBound()
|
boolean |
isFindMode()
Returns true if this iterator binding is in find mode. |
boolean |
isFindModeAllowed()
|
boolean |
isIteratorMadeVisible()
|
boolean |
isRowSetEventsEnabled()
Returns true if this IteratorBinding should notify the containing BindingContainer's RowSetListeners of RowSet events. |
boolean |
isSortable()
|
boolean |
isSuspendRowSetEventsHandling()
Returns true if this IteratorBinding is not reacting to any RowSetIterator events. |
void |
iteratorClosed(RowSetManagementEvent event)
Resets the internal state of this binding object and marks it as unusable. |
void |
iteratorReset(RowSetManagementEvent event)
Notifies rangeRefreshed to all bindings so that they can update their display. |
void |
navigated(NavigationEvent event)
Calls updateNavigated() for all DCCtrlRangeBinding instances associated with this iterator binding object, or calls updateValuesFromRow() on all other control binding instances, passing in the current row instance from the RowIterator. |
boolean |
needsEstimatedRowCount()
|
protected abstract void |
notifyUpdateEvent(UpdateEvent event)
called when rowUpdated event is received from the model. |
protected Row |
prepareCurrentRow()
|
void |
prepareForInput()
Internal: Applications should not use this method. Called on this binding before a binding returns from processInputValue This gives the iterator binding a chance to mark new row state to STATUS_NEW from initialized and hence submit the new row even if there are no changes on the row. |
void |
processInputException()
Deprecated. use processInputException(JboException); |
void |
processInputException(JboException errExc)
|
void |
rangeRefreshed(RangeRefreshEvent event)
Handles the rangeRefereshed event generated by the current RowIterator. |
void |
rangeScrolled(ScrollEvent event)
This method invokes updateRangeScrolled method on all instances of DCCtrlRangeBinding objects associated with this iterator binding, to notify them of the change in current range of rows. |
void |
release()
|
void |
release(int flags)
|
boolean |
removeActionBinding(DCControlBinding bnd)
Removes the given action control binding object from its list. |
void |
removeCurrentRow()
|
boolean |
removeValueBinding(DCControlBinding bnd)
Removes the given control binding object from its list. |
void |
reportException(boolean markDead,
java.lang.Exception ex)
Utility method to report exceptions via the containing binding container. |
void |
resolveRangeSize(int rangeSize)
Sets this iterator binding and it's associated RowIterator's range size to the greater of this either the iterator's range size and the given range size. |
void |
rowDeleted(DeleteEvent event)
If range size of this iterator binding is not 1, this method invokes updateRowDeleted method on all instances of DCCtrlValueBinding objects associated with this iterator binding, to notify them of the newly inserted row. |
void |
rowInserted(InsertEvent event)
If range size of this iterator binding is not 1, this method invokes updateRowInserted method on all instances of DCCtrlValueBinding objects associated with this iterator binding, to notify them of the newly inserted row. |
void |
rowUpdated(UpdateEvent event)
Invokes updateValuesFromRow() to notify all control bindings of a change in an attribute in the row. |
protected void |
setAlive(boolean flag)
|
void |
setAllowFindMode(boolean flag)
Advanced Internal This method is for list bindings to mark the source binding to not go into find mode. |
void |
setBindingContainer(DCBindingContainer formBnd)
|
void |
setCurrentRowIndexInRange(int val)
|
void |
setCurrentRowWithKey(java.lang.String stringKey)
Find the row in the associated row iterator based on the Key object and if found set that as the current row. |
void |
setCurrentRowWithKeyValue(java.lang.String stringKeyValue)
Find the row in the associated row iterator based on the value for a key attribute and if found set that as the current row. |
protected void |
setDef(DCIteratorBindingDef def)
Internal: Applications should not use this method. After creation sets the def used to create this iterator binding. |
void |
setFindMode(boolean mode)
Calls setFindMode(boolean mode, boolean applyCriteria) with applyCriteria = true; |
void |
setFindMode(boolean mode,
boolean applyVC)
Sets this iterator to findMode or not. |
protected void |
setIteratorMadeVisible(boolean flag)
|
void |
setName(java.lang.String name)
Internal: Applications should not use this method. |
void |
setRangeSize(int val)
Set current rowsetiterator's range size |
void |
setRangeStart(int val)
Set current rowsetiterator's range start |
void |
setRowSetEventsEnabled(boolean flag)
Set this flag if this IteratorBinding should pass on the rowset events to containing BindingContainer's RowSetListeners. |
void |
suspendRowSetEventsHandling(boolean flag)
Set this flag to turn off reacting to RowSetIterator events. |
protected abstract void |
updateValuesFromRow(Row row)
Calls updateValueFromRow() on each instance of DCCtrlValueBinding objects associated with this iterator binding object. |
protected abstract void |
updateValuesFromRows(Row[] rows,
Row row,
boolean clear)
Calls updateValuesFromRows() on each instance of DCCtrlRangeBinding object associated with this iterator binding object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected ApplicationModule mAM
protected int mRangeSize
protected DCDataControl mDC
protected boolean inExecute
protected Row mCreatedRowRef
public static int RANGESIZE_DO_NOT_OVERRIDE
public static int RANGESIZE_UNLIMITED
Constructor Detail |
protected DCIteratorBinding()
protected DCIteratorBinding(DCIteratorBinding iterBinding)
protected DCIteratorBinding(BindingContext ctx, java.lang.String dcName, java.lang.String sourceName, java.lang.String rsiName, int rangeSize)
protected DCIteratorBinding(ApplicationModule am, java.lang.String voName, java.lang.String rsiName, int rangeSize)
protected DCIteratorBinding(ApplicationModule am, java.lang.String voName, java.lang.String rsiName)
protected DCIteratorBinding(DCDataControl dc, RowSetIterator rsi)
Method Detail |
protected void setDef(DCIteratorBindingDef def)
public DCIteratorBindingDef getDef()
public void prepareForInput()
public boolean isAccessorIterator()
public final java.lang.String getName()
public final java.lang.String getDisplayName()
public void setName(java.lang.String name)
public java.lang.String getVOName()
public java.lang.String getSourceName()
public final java.lang.String getViewDefName()
public void reportException(boolean markDead, java.lang.Exception ex)
markDead
- if this iterator binding should be marked as not alive for
any further usage.ex
- Exception object to be reported via the BindingContainer.public void bindRowSetIterator(NavigatableRowIterator iter, boolean initRangeSize)
This method will not directly update the control-bindings for non-ADFJClient apps.
The caller can optionally call navigated(null)
method, with null for
the Event parameter to notify each control bound to this iterator binding to update
it's displayed value with the new iterator's current row.
iter
- RowIterator instance from which to display data in bound controls.initRangeSize
- determines whether this iterator's range size should be
adjusted to this binding's range size. This should be used to extend the range size
from the default in the RowIterator to whatever is required by this iterator
binding. For example, if a RowIterator whose range size is 1 is passed to this
method and a grid control is bound to this iterator binding, then the grid
may need more than one row to display from the current range. So, this
flag should be true in that case to allow the grid to get the full range
of rows to display, rather than updating its display one row at a time.public final boolean isIteratorMadeVisible()
protected void setIteratorMadeVisible(boolean flag)
public final boolean isRowSetEventsEnabled()
public final void setRowSetEventsEnabled(boolean flag)
public void suspendRowSetEventsHandling(boolean flag)
public boolean isSuspendRowSetEventsHandling()
public boolean allowsRefreshControl()
protected Row prepareCurrentRow()
public void rangeRefreshed(RangeRefreshEvent event)
rangeRefreshed
in interface RowSetListener
event
- a description of the new ranges.public void rangeScrolled(ScrollEvent event)
rangeScrolled
in interface RowSetListener
event
- a description of the new range.public void rowInserted(InsertEvent event)
rowInserted
in interface RowSetListener
event
- a description of the new Row object.public void internalGetNextRangeSet()
public void internalGetPreviousRangeSet()
public void rowDeleted(DeleteEvent event)
This method also sets the currency on the RowIterator to the next row (if available) or previous row (if available) or simply a NO row by calling navigated() with no current row.
rowDeleted
in interface RowSetListener
event
- a description of the deleted Row object.public void rowUpdated(UpdateEvent event)
rowUpdated
in interface RowSetListener
event
- a description of the modified Row object.public void navigated(NavigationEvent event)
navigated
in interface RowSetListener
event
- a description of the new and previous current rows.protected abstract void notifyUpdateEvent(UpdateEvent event)
protected abstract void updateValuesFromRows(Row[] rows, Row row, boolean clear)
protected abstract void updateValuesFromRow(Row row)
public final java.lang.Object getSyncLock()
public void iteratorReset(RowSetManagementEvent event)
iteratorReset
in interface RowSetManagementListener
event
- a description of the event.public void iteratorClosed(RowSetManagementEvent event)
iteratorClosed
in interface RowSetManagementListener
event
- a description of the event.public ViewCriteria getViewCriteria()
public ViewObject getViewObject()
public void resolveRangeSize(int rangeSize)
public boolean hasRSI()
public RowSetIterator getRowSetIterator()
protected RowSetIterator initSourceRSI()
public NavigatableRowIterator getNavigatableRowIterator()
public final void setAllowFindMode(boolean flag)
public final boolean isFindModeAllowed()
public final void setFindMode(boolean mode)
public final void setFindMode(boolean mode, boolean applyVC)
public final boolean isFindMode()
public final boolean needsEstimatedRowCount()
public void executeQuery()
public void executeQueryIfNeeded()
public Row getCurrentRow()
public Row getRowAtRangeIndex(int rangeIndex)
rangeIndex
- The range index of the row.public Row[] getAllRowsInRange()
public DCBindingContainer getBindingContainer()
public void setBindingContainer(DCBindingContainer formBnd)
public final DCDataControl getDataControl()
protected DCDataControl initDataControl()
protected void fetchAttributeProperties()
public java.util.ArrayList getValueBindingList()
public void addValueBinding(DCControlBinding bnd)
public boolean removeValueBinding(DCControlBinding bnd)
public java.util.ArrayList getActionBindingList()
public void addActionBinding(DCControlBinding bnd)
public void removeCurrentRow()
public boolean removeActionBinding(DCControlBinding bnd)
public RowSetIterator getLovRowSetIterator()
public void release()
public void release(int flags)
public void processInputException()
public void processInputException(JboException errExc)
public JboException getError()
public AttributeDef[] getAttributeDefs()
public java.lang.String getIteratorDefName()
public AttributeDef[] getAttributeDefs(java.lang.String[] attrNames)
public int getRangeSize()
public void setRangeSize(int val)
public int getRangeStart()
public void setRangeStart(int val)
public int getCurrentRowIndexInRange()
public void setCurrentRowIndexInRange(int val)
public void setCurrentRowWithKeyValue(java.lang.String stringKeyValue)
public java.lang.String getCurrentRowKeyString()
public Key createKey(java.lang.String stringKey)
public void setCurrentRowWithKey(java.lang.String stringKey)
stringKey
- String form of the Key object created using Key.toStringFormat(true/false)protected void setAlive(boolean flag)
public final boolean isBound()
public long getEstimatedRowCount()
public void applySortCriteria(SortCriteria[] sortby)
public SortCriteria[] getSortCriteria()
public boolean isSortable()
protected void cacheCreatedRow(RowSetIterator rsi, Row row)
|
Oracle ADF Model and Business Components API Reference 10.1.2 B14022-01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.