|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ojb.broker.accesslayer.PagingIterator
PagingIterator is wrapper around an OJBIterator to support startAt endAt positions. The PagingIterator returns rows including startAt and including endAt. startAt = 1, endAt = 11 returns rows 1 to 11 if available if endAt == Query.NO_END_AT_INDEX endAt is set to the last available row
Constructor Summary | |
PagingIterator(OJBIterator anIterator,
int startAt,
int endAt)
Constructor |
Method Summary | |
boolean |
absolute(int row)
Moves the cursor to the given row number in the iterator. |
int |
fullSize()
|
boolean |
hasNext()
|
java.lang.Object |
next()
|
boolean |
relative(int row)
Moves the cursor a relative number of rows, either positive or negative. |
void |
releaseDbResources()
Release all internally used Database resources of the iterator. |
void |
remove()
remove is not supported |
int |
size()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PagingIterator(OJBIterator anIterator, int startAt, int endAt)
anIterator
- wrapped IteratorstartAt
- (first row is 1)endAt
- (Query.NO_END_AT_INDEX stands for all available rows)Method Detail |
public int size() throws PersistenceBrokerException
size
in interface OJBIterator
PersistenceBrokerException
public int fullSize() throws PersistenceBrokerException
fullSize
in interface OJBIterator
PersistenceBrokerException
public boolean absolute(int row) throws PersistenceBrokerException
OJBIterator
absolute
in interface OJBIterator
row
- the row to move to in this iterator, by absolute number
PersistenceBrokerException
public boolean relative(int row) throws PersistenceBrokerException
OJBIterator
relative
in interface OJBIterator
row
- the row to move to in this iterator, by relative number
PersistenceBrokerException
public void releaseDbResources()
OJBIterator
releaseDbResources
in interface OJBIterator
public void remove()
remove
in interface java.util.Iterator
public boolean hasNext()
hasNext
in interface java.util.Iterator
public java.lang.Object next()
next
in interface java.util.Iterator
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |