|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ojb.broker.accesslayer.PagingIterator
public class 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. |
void |
disableLifeCycleEvents()
Do not fire any PBLifeCycleEvent when reading next item. |
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 |
---|
equals, 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
OJBIterator.size()
public int fullSize() throws PersistenceBrokerException
fullSize
in interface OJBIterator
PersistenceBrokerException
OJBIterator.fullSize()
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
OJBIterator.absolute(int)
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
OJBIterator.relative(int)
public void releaseDbResources()
OJBIterator
releaseDbResources
in interface OJBIterator
OJBIterator.releaseDbResources()
public void remove()
remove
in interface java.util.Iterator
public boolean hasNext()
hasNext
in interface java.util.Iterator
Iterator.hasNext()
public java.lang.Object next()
next
in interface java.util.Iterator
Iterator.next()
public void disableLifeCycleEvents()
OJBIterator
disableLifeCycleEvents
in interface OJBIterator
OJBIterator.disableLifeCycleEvents()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |