T - Type of item to be readpublic abstract class AbstractPaginatedDataItemReader<T> extends AbstractItemCountingItemStreamItemReader<T>
| Modifier and Type | Field and Description |
|---|---|
protected int |
page |
protected int |
pageSize |
protected Iterator<T> |
results |
| Constructor and Description |
|---|
AbstractPaginatedDataItemReader() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doClose()
Close the resources opened in
AbstractItemCountingItemStreamItemReader.doOpen(). |
protected void |
doOpen()
Open resources necessary to start reading input.
|
protected abstract Iterator<T> |
doPageRead()
Method this
ItemStreamReader delegates to
for the actual work of reading a page. |
protected T |
doRead()
Read next item from input.
|
protected void |
jumpToItem(int itemLastIndex)
Move to the given item index.
|
void |
setPageSize(int pageSize)
The number of items to be read with each page.
|
close, getCurrentItemCount, isSaveState, open, read, setCurrentItemCount, setMaxItemCount, setSaveState, updategetExecutionContextKey, setExecutionContextName, setNamepublic void setPageSize(int pageSize)
pageSize - the number of itemsprotected T doRead() throws Exception
AbstractItemCountingItemStreamItemReaderdoRead in class AbstractItemCountingItemStreamItemReader<T>Exceptionprotected abstract Iterator<T> doPageRead()
ItemStreamReader delegates to
for the actual work of reading a page. Each time
this method is called, the resulting Iterator
should contain the items read within the next page.
Iterator is empty or null when it is
returned, this ItemReader will assume that the
input has been exhausted.Iterator containing the items within a page.protected void doOpen()
throws Exception
AbstractItemCountingItemStreamItemReaderdoOpen in class AbstractItemCountingItemStreamItemReader<T>Exceptionprotected void doClose()
throws Exception
AbstractItemCountingItemStreamItemReaderAbstractItemCountingItemStreamItemReader.doOpen().doClose in class AbstractItemCountingItemStreamItemReader<T>Exceptionprotected void jumpToItem(int itemLastIndex)
throws Exception
AbstractItemCountingItemStreamItemReaderAbstractItemCountingItemStreamItemReader.doRead().jumpToItem in class AbstractItemCountingItemStreamItemReader<T>ExceptionCopyright © 2014 Pivotal. All rights reserved.