|
Business Components | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.jbo.common.BaseObject | +--oracle.jbo.common.PropertiesHelper | +--oracle.jbo.common.RowSetHelper | +--oracle.jbo.common.RowSetIteratorHelper | +--oracle.jbo.server.ViewRowSetIteratorImpl
The middle-tier class that enables the user to iterate through row sets.
A view row set iterator blongs to a view row set. In the view row
set a row's position is identified by its row index.
A range is a window through which a portion of the view row set is visible.
A row has an absolute index, relative to the first row in the entire view row set,
and rows within the range have a range index, relative to the first row in the range.
One of the rows, in the range or not, may be designated as the current row.
Other objects that have interest in changes to a view row set's data, current
row designation, and range may be registered as listeners by calling
addListener()
. Listeners must implement the
RowSetListener
interface. When a view row
set iterator is created, it registers with its containing
view row set. Later, when an entity row is updated, the View
Object propagates it to its view row sets, which propagate the event to its listeners,
including its iterator, which converts it to a view row event, and sends it
to its own listeners.
ViewObject
,
RowSet
,
RowSetIterator
,
RowSetListener
,
ViewRowSetIteratorImpl
Field Summary | |
protected ViewRowSetImpl |
mViewRowSet
|
protected int |
mViewSize
|
Fields inherited from class oracle.jbo.common.RowSetIteratorHelper |
mCurrentRow |
Fields inherited from class oracle.jbo.common.RowSetHelper |
listeners,
mName |
Fields inherited from class oracle.jbo.common.PropertiesHelper |
mProperties,
timer |
Fields inherited from class oracle.jbo.common.BaseObject |
TRACE_EVERY_ALLOC,
TRACE_NONE,
TRACE_OCCASIONAL,
TRACE_UNINITIALIZED |
Fields inherited from interface oracle.jbo.RowIterator |
SLOT_BEFORE_FIRST,
SLOT_BEYOND_LAST,
SLOT_DELETED,
SLOT_VALID |
Constructor Summary | |
ViewRowSetIteratorImpl(ViewRowSetImpl rowset)
Constructs a new secondary (non-default) view row set iterator. |
|
ViewRowSetIteratorImpl(ViewRowSetImpl rowset,
java.lang.String name,
boolean isDefaultRSI)
Constructs a new view row set iterator. |
Method Summary | |
protected void |
addDetailViewRowSet(RowSet detailRowSet)
##INTERNAL## |
void |
addListener(java.lang.Object listener)
Adds an event listener to this object. |
RowSet |
createDetailRowSet(java.lang.String rsName,
java.lang.String linkDefName)
Creates and returns an new detail row set for this row set iterator. |
Key |
createKey(AttributeList nvp)
Given a list of name-value pairs, creates a Key object that matches the key structure for the ViewObject for this RowItertor. |
Row |
createRow()
Creates a new view row. |
java.util.Enumeration |
enumerateRowsInRange()
Creates and returns an enumerator of the rows in the range. |
Row[] |
findByEntity(int eRowHandle,
int maxNumOfRows)
Finds and returns view rows that use the entity row, identified by the entity row handle, eRowHandle . |
Row[] |
findByKey(Key key,
int maxNumOfRows)
Finds and returns view rows that match the specified key. |
static RowSetIterator |
findRSIForEntity(RowSetIterator[] rsis,
Row eRow)
|
void |
fireNavigationEvent(NavigationEvent event)
Fires the navigation event to its listeners. |
void |
fireRangeRefreshed(RangeRefreshEvent event)
Fires the range refresh event to its listeners. |
void |
fireRowDeleted(DeleteEvent event)
Fires the row deleted event to its listeners. |
void |
fireRowUpdated(UpdateEvent event)
Fires the row updated event to its listeners. |
Row |
first()
Navigates to the first row in the row set. |
Row[] |
getAllRowsInRange()
Returns an array of all rows in the iterator's range. |
Row |
getCurrentRow()
Returns the current row of the iterator. |
int |
getCurrentRowIndex()
Returns the absolute row index of the current row in the row set. |
int |
getCurrentRowSlot()
Returns the current row slot status. |
RowSet[] |
getDetailRowSets()
Returns an array of all detail row sets for this row set iterator. |
int |
getFetchedRowCount()
Returns the number of rows fetched from the JDBC RestultSet . |
java.util.Hashtable |
getProperties()
Retrieves all properties. |
int |
getRangeIndexOf(Row row)
Returns the range index of the row specified by row . |
int |
getRangeSize()
Returns the range size of the iterator. |
int |
getRangeStart()
Returns the absolute row index of the first row in the range. |
Row |
getRow(Key key)
Returns the first row whose key matches key . |
Row |
getRowAtRangeIndex(int index)
Returns the row at range index index . |
int |
getRowCount()
Returns the total number of rows in this row set. |
int |
getRowCountInRange()
Returns the actual number of rows in the range. |
Row |
getRowFromHandle(java.lang.Object rowHandle)
Internal: Applications should not use this method. |
RowSet |
getRowSet()
Returns this row set iterator's row set (interface). |
ViewRowSetImpl |
getRowSetImpl()
Returns this row set iterator's row set (implementation class). |
RowSetIterator |
getRowSetIterator()
Returns the row set iterator interface of this object. |
ViewObject |
getViewObject()
Returns this row set iterator's view object. |
boolean |
hasNext()
Indicates whether the iterator has a next row or not. |
boolean |
hasPrevious()
Indicates whether the iterator has a previous row or not. |
void |
insertRow(Row row)
Inserts the row into the row set. |
void |
insertRowAtRangeIndex(int index,
Row row)
Inserts the row into the row set at the specified range index. |
boolean |
isDefaultRSI()
Internal: Applications should not use this method. |
boolean |
isRangeAtBottom()
Indicates whether the iterator range contains the last row of the row set. |
boolean |
isRangeAtTop()
Indicates whether the iterator range contains the first row of the row set. |
Row |
last()
Navigates to the last row in the row set. |
Row |
next()
Navigates to the next row in the row set. |
int |
nextIndex()
Returns the absolute row index of the next row. |
Row |
previous()
Navigates to the previous row in the row set. |
int |
previousIndex()
Returns the absolute row index of the previous row. |
protected void |
refresh(boolean resetIter,
boolean fillUpRange)
|
void |
removeCurrentRow()
Removes the current row. |
protected void |
removeDetailViewRowSet(RowSet detailRowSet)
##INTERNAL## |
void |
removeRowAtRangeIndex(int index)
Removes a view row at range index index . |
void |
removeRowHandle(java.lang.Object rowHandle)
Internal: Applications should not use this method. |
void |
reset()
Resets the iterator. |
int |
scrollRange(int rows)
Scrolls the range by amount . |
int |
scrollRangeTo(Row row,
int index)
Scrolls the range to a specific row. |
boolean |
setCurrentRow(Row row)
Moves the iterator to the row specified by row . |
boolean |
setCurrentRowAtRangeIndex(int index)
Moves the iterator to the row whose range index is index . |
int |
setRangeSize(int newSize)
Sets the range size for the iterator. |
int |
setRangeStart(int start)
Sets the range position by the absolute row index specified in start . |
void |
setRowValidation(boolean flag)
Sets the validation flag on this iterator. |
Methods inherited from class oracle.jbo.common.RowSetIteratorHelper |
createKey |
Methods inherited from class oracle.jbo.common.RowSetHelper |
fireRangeScrolled,
fireRowInserted,
getListeners,
getName,
removeListener,
setName |
Methods inherited from class oracle.jbo.common.PropertiesHelper |
getProperty,
refreshProperty,
setProperty |
Methods inherited from class oracle.jbo.common.BaseObject |
dumpState,
setTraceLevel,
setTraceWriter |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected ViewRowSetImpl mViewRowSet
protected int mViewSize
Constructor Detail |
public ViewRowSetIteratorImpl(ViewRowSetImpl rowset)
rowset
- the row set to which this iterator belongs.public ViewRowSetIteratorImpl(ViewRowSetImpl rowset, java.lang.String name, boolean isDefaultRSI)
result
- the row set to which this iterator belongs.name
- the view row set iterator name.isDefaultRSI
- flag indicating whether this row set iterator
is the default RSI for result
.Method Detail |
public ViewObject getViewObject()
ViewObject
this row set iterator belongs to.public ViewRowSetImpl getRowSetImpl()
This method differs from getRowSet
in that the
latter returns the RowSet
interface, while this
method returns the implementation class (ViewRowSetImpl
).
ViewRowSetImpl
this row set iterator
belongs to.public RowSet getRowSet()
This method differs from getRowSetImpl
in that the
latter returns the implementation class (ViewRowSetImpl
),
while this method returns the RowSet
interface.
RowSet
this row set iterator
belongs to.public boolean isDefaultRSI()
Indicates whether this row set iterator is the default RSI for the row set.
public RowSetIterator getRowSetIterator()
public int setRangeSize(int newSize)
See ViewObjectImpl.setRangeSize
for details.
size
- the new range size.ViewObjectImpl.setRangeSize(int)
public int getRangeSize()
See ViewObjectImpl.getRangeSize
for details.
ViewObjectImpl.getRangeSize()
public int getFetchedRowCount()
RestultSet
.
public int getRowCount()
See ViewObjectImpl.getRowCount
for details.
ViewObjectImpl.getRowCount()
public int getRowCountInRange()
See ViewObjectImpl.getRowCountInRange
for details.
ViewObjectImpl.getRowCountInRange()
public Row getRowAtRangeIndex(int index)
index
.
Range index is a 0 based index within the range.
index
- range index of the row.null
if the index is outside the range, or if there is no
row at the specified index.public Row getRow(Key key)
key
.
See ViewObjectImpl.getRow
for details.
key
- key to match.null
if no match.ViewObjectImpl.getRow(Key)
public Row getRowFromHandle(java.lang.Object rowHandle)
Returns the row with a handle specified by hdl
.
See ViewObjectImpl.getRowFromHandle
for details.
hdl
- the row handle.ViewObjectImpl.getRowFromHandle(Object)
public void removeRowHandle(java.lang.Object rowHandle)
Removes the row handle from the row handle hash table.
See ViewObjectImpl.removeRowHandle
for details.
hdl
- the row handle to remove.ViewObjectImpl.removeRowHandle(Object)
public Key createKey(AttributeList nvp)
public Row[] findByKey(Key key, int maxNumOfRows)
See ViewObjectImpl.findByKey
for details.
key
- the key to match.maxNumOfRows
- the maximum size of the array to return,
or -1 to return all rows.ViewObjectImpl.findByKey(Key, int)
public Row getCurrentRow()
See ViewObjectImpl.getCurrentRow
for details.
null
if no current row.ViewObjectImpl.getCurrentRow()
public int getCurrentRowSlot()
See ViewObjectImpl.getCurrentRowSlot
for details.
ViewObjectImpl.getCurrentRowSlot()
public void setRowValidation(boolean flag)
flag
- Whether to turn row validation off or not.public boolean setCurrentRow(Row row)
row
.
See ViewObjectImpl.setCurrentRow
for details.
ViewObjectImpl.setCurrentRow(Row)
public boolean setCurrentRowAtRangeIndex(int index)
index
.
See ViewObjectImpl.setCurrentRowAtRangeIndex
for details.
index
- range index to which to move the current row.ViewObjectImpl.setCurrentRowAtRangeIndex(int)
public int getCurrentRowIndex()
See ViewObjectImpl.getCurrentRowIndex
for details.
reset
.ViewObjectImpl.getCurrentRowIndex()
public int getRangeIndexOf(Row row)
row
.
See ViewObjectImpl.getRangeIndexOf
for details.
row
- the row in question.ViewObjectImpl.getRangeIndexOf(Row)
public int scrollRange(int rows)
amount
.
See ViewObjectImpl.scrollRange
for details.
amount
- the number of rows to scroll.ViewObjectImpl.scrollRange(int)
public int scrollRangeTo(Row row, int index)
See ViewObjectImpl.scrollRangeTo
for details.
row
- the row to scroll the range to.index
- the range index to position the row at.ViewObjectImpl.scrollRangeTo(Row, int)
public void reset()
See ViewObjectImpl.reset
for details.
ViewObjectImpl.reset()
public Row first()
See ViewObjectImpl.first
for details.
null
if the row set has no rows.ViewObjectImpl.first()
public Row last()
See ViewObjectImpl.last
for details.
null
if the row set has no rows.ViewObjectImpl.last()
public Row next()
See ViewObjectImpl.next
for details.
null
if no next row. If
no next row, the current row is not moved.ViewObjectImpl.next()
public Row previous()
See ViewObjectImpl.previous
for details.
null
if no previous row. If
no previous row, the current row is not moved.ViewObjectImpl.previous()
public boolean hasNext()
See ViewObjectImpl.hasNext
for details.
true
if there is a next row,
false
if not.ViewObjectImpl.hasNext()
public boolean hasPrevious()
See ViewObjectImpl.hasPrevious
for details.
true
if there is a previous row,
false
if not.ViewObjectImpl.hasPrevious()
public boolean isRangeAtBottom()
See ViewObjectImpl.isRangeAtBottom
for details.
true
if the range contains the last row,
false
if not.ViewObjectImpl.isRangeAtBottom()
public boolean isRangeAtTop()
See ViewObjectImpl.isRangeAtTop
for details.
true
if the range contains the first row,
false
if not.ViewObjectImpl.isRangeAtTop()
public int nextIndex()
public int previousIndex()
public Row[] getAllRowsInRange()
See ViewObjectImpl.getAllRowsInRange
for details.
ViewObjectImpl.getAllRowsInRange()
public java.util.Enumeration enumerateRowsInRange()
public Row createRow()
See ViewObjectImpl.createRow
for details.
ViewObjectImpl.createRow()
public void insertRow(Row row)
See ViewObjectImpl.insertRow
for details.
row
- the view row to insert.ViewObjectImpl.insertRow(Row)
public void insertRowAtRangeIndex(int index, Row row)
See ViewObjectImpl.insertRowAtRangeIndex
for details.
index
- the range index into which the row is to be inserted.row
- the view row to insert.ViewObjectImpl.insertRowAtRangeIndex(int, Row)
public void removeCurrentRow()
See ViewObjectImpl.removeCurrentRow
for details.
ViewObjectImpl.removeCurrentRow()
public void removeRowAtRangeIndex(int index)
index
.index
- range index of the row to remove.public RowSet createDetailRowSet(java.lang.String rsName, java.lang.String linkDefName)
See ViewObjectImpl.createDetailRowSet
for details.
rsName
- the name of the row set to be assigned to the new
detail row set.linkDefName
- identifies the view link definition that defines
the master-detail relationship between this
row set iterator and the new detail row set.ViewObjectImpl.createDetailRowSet(String, String)
protected void addDetailViewRowSet(RowSet detailRowSet)
Adds the detail row set to the list of detail row sets.
This row set iterator is the master and detailRowSet
is a detail.
detailRowSet
- the detail row set to add.protected void removeDetailViewRowSet(RowSet detailRowSet)
Removes the detail row set from the list of detail row sets.
This row set iterator is the master and detailRowSet
is a detail.
detailRowSet
- the detail row set to remove.public RowSet[] getDetailRowSets()
ViewObjectImpl.getDetailRowSets
for details.ViewObjectImpl.getDetailRowSets()
public int getRangeStart()
See ViewObjectImpl.getRangeStart
for details.
ViewObjectImpl.getRangeStart()
public int setRangeStart(int start)
start
.
See ViewObjectImpl.setRangeStart
for details.
start
- absolute row index of the row that should
be positioned as the first row of the range.
An absolute row index is a row index in the
entire row set. It starts at 0.ViewObjectImpl.setRangeStart(int)
protected void refresh(boolean resetIter, boolean fillUpRange)
public java.util.Hashtable getProperties()
public void addListener(java.lang.Object listener)
listener
should implement the RowSetListener
interface.
listener
- the RowSetListener
registering
interest in this object's events.public void fireRangeRefreshed(RangeRefreshEvent event)
the
- range refresh event.public void fireNavigationEvent(NavigationEvent event)
the
- navigation event.public void fireRowDeleted(DeleteEvent event)
the
- row deleted event.public void fireRowUpdated(UpdateEvent event)
the
- row updated event.public static RowSetIterator findRSIForEntity(RowSetIterator[] rsis, Row eRow)
public Row[] findByEntity(int eRowHandle, int maxNumOfRows)
eRowHandle
.
eRowHandle
- the entity row handle.maxNumOfRows
- the maximum size of the row array to return,
or -1 to return all rows.
|
Business Components | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |