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

E10653-01

oracle.jbo
Interface RowSetIterator

All Superinterfaces:
NavigatableRowIterator, RowIterator, VariableManagerOwner, VariableManagerOwnerBase
All Known Subinterfaces:
RowSet, ViewObject, ViewObjectDynAttr, WSRowSet
All Known Implementing Classes:
CmrAccessorEntRowSet, CmrAccessorViewImpl, CmrAccessorViewRowSet, DCDataVO, DCGenericRowSetIteratorImpl, DCRowSetIteratorImpl, DSViewObjectImpl, EntityCacheOverRowSet, EntityRowSetImpl, FinderViewImpl, PlaceholderVOImpl, ViewObjectImpl, ViewObjectOnRowSets, ViewRowSetImpl, ViewRowSetIteratorImpl, ViewUsageImpl, WSRowSetImpl, WSRowSetIteratorBase, WSRowSetIteratorImpl, WSViewObjectImpl

public interface RowSetIterator
extends NavigatableRowIterator, VariableManagerOwner

The interface for Row Set Iterator. A Row Iterator is an iterator over a collection of View rows or Entity rows.

RowSetIterator is an extended interface of NavigatableRowIterator, which itself extends RowIterator. Refer to these base interfaces for detailed description of iteration functionalities.

Since:
JDeveloper 3.0
See Also:
NavigatableRowIterator, RowIterator

Field Summary
 
Fields inherited from interface oracle.jbo.RowIterator
ITER_MODE_LAST_PAGE_FULL, ITER_MODE_LAST_PAGE_PARTIAL, SLOT_BEFORE_FIRST, SLOT_BEYOND_LAST, SLOT_DELETED, SLOT_VALID
 
Method Summary
 void addManagementListener(RowSetManagementListener listener)
          Adds a subscriber (listener) to be notified of RowSetManagementListener events generated by this Row Set Iterator.
 void closeRowSetIterator()
          Closes this row set iterator.
 RowSet createDetailRowSet(java.lang.String rsName, java.lang.String viewLinkDefName)
          Creates a detail Row Set.
 RowSet[] getDetailRowSets()
          Gets an array of detail Row Sets for which this Iterator is the master.
 int getEstimatedRangePageCount()
          Returns getEstimatedRowCount()/rangePageSize, if rangeSize > 0.
 Row[] getFilteredRows(java.lang.String attrName, java.lang.Object attrValue)
          Returns all rows in this collection whose attribute value matches the value being passed in attrValue.
 Row[] getFilteredRowsInRange(java.lang.String attrName, java.lang.Object attrValue)
          Returns all rows in this range whose attribute value matches the value being passed in attrValue.
 java.lang.String getName()
          Gets the name of the Iterator.
 Row[] getNextRangeSet()
          Gets the next set of rows in the range.
 Row[] getPreviousRangeSet()
          Gets the previous set of rows in the range.
 RowSet getRowSet()
          Gets the Row Set that this Iterator belongs to.
 java.lang.Object getSyncLock()
          Gets the locking object for this Row Set Iterator.
 boolean isNameGenerated()
          Tests if the Iterator's name was generated by the system.
 void removeManagementListener(RowSetManagementListener listener)
          Removes a subscriber (listener) for RowSetManagementListener events generated by this row set iterator.
 int scrollToRangePage(int pageIndex)
          Moves the row set range start to the given page index where every page consists of RangeSize number of rows.
 
Methods inherited from interface oracle.jbo.NavigatableRowIterator
addListener, removeListener
 
Methods inherited from interface oracle.jbo.RowIterator
createAndInitRow, createKey, createRow, enumerateRowsInRange, findByAltKey, findByEntity, findByKey, findByViewCriteria, first, getAllRowsInRange, getCurrentRow, getCurrentRowIndex, getCurrentRowSlot, getFetchedRowCount, getIterMode, getRangeIndexOf, getRangeSize, getRangeStart, getRow, getRowAtRangeIndex, getRowCount, getRowCountInRange, hasNext, hasPrevious, insertRow, insertRowAtRangeIndex, isRangeAtBottom, isRangeAtTop, isRowValidation, last, next, previous, removeCurrentRow, removeCurrentRowAndRetain, removeCurrentRowFromCollection, reset, scrollRange, scrollRangeTo, setCurrentRow, setCurrentRowAtRangeIndex, setIterMode, setRangeSize, setRangeStart, setRowValidation
 
Methods inherited from interface oracle.jbo.VariableManagerOwnerBase
ensureVariableManager, getMessageBundleClass, getResourceBundleDef, getVariableManager, hasVariables
 

Method Detail

getName

java.lang.String getName()
Gets the name of the Iterator. If this Row Set Iterator is the default iterator of the Row Set, then the Iterator's name by default is the same as the Row Set name. For a secondary (non-default) Iterator of the Row Set, the name is assigned when the Row Set Iterator is created. See RowSet.createRowSetIterator(String) for more info.

Specified by:
getName in interface VariableManagerOwner
Returns:
the Row Set Iterator name.

isNameGenerated

boolean isNameGenerated()
Tests if the Iterator's name was generated by the system.

Returns:
true if the name was generated by the system. false if the name was given by the user and not generated by the system.

getNextRangeSet

Row[] getNextRangeSet()
Gets the next set of rows in the range. This method is good for processing rows in a range-ful fashion. Suppose the Row Set has 20 rows and the Iterator range size is 10. Suppose further that the Iterator is showing rows 0 through 9 (0-based indexing). Calling getNextRangeSet() will return rows 10 through 19.

If the next range set does not have enough rows to fill up the range, getNextRangeSet() returns a partially filled range. That is, this method operates as if the iteration mode is RowIterator.ITER_MODE_LAST_PAGE_PARTIAL.

If there is no more rows, this method returns an empty array (an array of length 0).

While obtaining the next range set, the range will be scrolled. This causes a ScrollEvent to be sent to RowSetListener.rangeScrolled(oracle.jbo.ScrollEvent). To pick up such an event, the listener object must implement the RowSetListener interface. Further, this listener must be registered through a call to NavigatableRowIterator.addListener(Object) (the listener object passed in as the parameter to addListener).

After the next range set is obtained, the method sets the first Row of the range as the current row. This may fire a NavigationEvent and sends it to RowSetListener.navigated(oracle.jbo.NavigationEvent).

Returns:
an array of Rows in the next range set. An array of length 0 if there are no more rows.

getPreviousRangeSet

Row[] getPreviousRangeSet()
Gets the previous set of rows in the range. This method is good for processing rows in a range-ful fashion. Suppose the Row Set has 20 rows and the Iterator range size is 10. Suppose further that the Iterator is showing rows 10 through 19 (0-based indexing). Calling getPreviousRangeSet() will return rows 0 through 9.

If there is no more rows, this method returns an empty array (an array of length 0).

While obtaining the previous range set, the range will be scrolled. This causes a ScrollEvent to be sent to RowSetListener.rangeScrolled(oracle.jbo.ScrollEvent). To pick up such an event, the listener object must implement the RowSetListener interface. Further, this listener must be registered through a call to NavigatableRowIterator.addListener(Object) (the listener object passed in as the parameter to addListener).

After the previous range set is obtained, the method sets the first Row of the range as the current row. This may fire a NavigationEvent and sends it to RowSetListener.navigated(oracle.jbo.NavigationEvent).

Returns:
an array of Rows in the previous range set. An array of length 0 if there are no more rows.

getRowSet

RowSet getRowSet()
Gets the Row Set that this Iterator belongs to.

Returns:
the owning Row Set.

getEstimatedRangePageCount

int getEstimatedRangePageCount()
Returns getEstimatedRowCount()/rangePageSize, if rangeSize > 0. For rangeSize <= 0, returns 1.

This number may fluxuate when the View Object is syncronized with its Entity Object.

Returns:
the number of range-pages that this RowSet collection has.

scrollToRangePage

int scrollToRangePage(int pageIndex)
Moves the row set range start to the given page index where every page consists of RangeSize number of rows. PageIndex should start at page number 1. This method calculates the rowIndex that should start at that page and then scrolls the iterator to start at that row by using the following calculation:

(rangeSize * (pageSize-1)) - getRangeStart();

Parameters:
pageIndex - the page number to go to in the result set.
Returns:
the number of rows actually scrolled.

getDetailRowSets

RowSet[] getDetailRowSets()
Gets an array of detail Row Sets for which this Iterator is the master.

In a master-detail relationship in an Application Module, the master in reality is a Row Set Iterator. (Though we often speak of master View Object, in reality, it is the Iterator behind the View Object which is playing the role of the master). Whenever the currency of this master Iterator moves, the detail Row Sets are re-executed to show related Rows.

Calling this method returns an array of Row Sets that are related to this Iterator as detail Row Sets.

Returns:
an array of detail RowSet.

createDetailRowSet

RowSet createDetailRowSet(java.lang.String rsName,
                          java.lang.String viewLinkDefName)
Creates a detail Row Set. See getDetailRowSets() for explanation of detail Row Sets.

This method creates a new detail Row Set for this Iterator.

Parameters:
rsName - the name of the new detail Row Set.
viewLinkDefName - the name of a View Link definition. This View Link chooses the relationship in which this Iterator is the master and the new Row Set is the detail. It must be a fully qualified name (including the package name).
Returns:
the new detail Row Set.

addManagementListener

void addManagementListener(RowSetManagementListener listener)
Adds a subscriber (listener) to be notified of RowSetManagementListener events generated by this Row Set Iterator.

Parameters:
listener - the subscriber to be added. It should implement RowSetManagementListener.

removeManagementListener

void removeManagementListener(RowSetManagementListener listener)
Removes a subscriber (listener) for RowSetManagementListener events generated by this row set iterator.

Parameters:
listener - the subscriber to be removed.

closeRowSetIterator

void closeRowSetIterator()
Closes this row set iterator. If this row set iterator is a master in a master-detail relationship, closeRowSetIterator closes all detail row sets.

After that, it fires a RowSetManagementListener.iteratorClosed() event to its RowSetManagementListener's.

Then, it deregisters this row set iterator from the owning row set, and deregisters all its listeners.


getSyncLock

java.lang.Object getSyncLock()
Gets the locking object for this Row Set Iterator. Actually, this method locks the Application Module to which this Row Set Iterator belongs. See ApplicationModule.getSyncLock() for details.

Returns:
the locking object.

getFilteredRows

Row[] getFilteredRows(java.lang.String attrName,
                      java.lang.Object attrValue)
Returns all rows in this collection whose attribute value matches the value being passed in attrValue.

Note that this method does not affect the current RowSetIterator.

Parameters:
attrName - name of the attribute to be used for filtering.
attrValue - attribute value for filtering.
Returns:
an array of rows that match.

getFilteredRowsInRange

Row[] getFilteredRowsInRange(java.lang.String attrName,
                             java.lang.Object attrValue)
Returns all rows in this range whose attribute value matches the value being passed in attrValue.

This method uses getAllRowsInRange() to retrieve all rows and then match the rows.

Parameters:
attrName - name of the attribute to be used for filtering.
attrValue - attribute value for filtering.
Returns:
an array of rows in the current range that match.

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

E10653-01

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