T
- public class ExcelContextualReader<T> extends ExcelRowByRowReader<T> implements OneLoadReader<T>
Process.Event, Process.EventPoint
TIMEOUT_LOAD_IO_SECONDS, worksheetRowIter
exceptions, failFast, filter, hasNext, index, messages, params, paused, resource, transformer
listeners, processState
Constructor and Description |
---|
ExcelContextualReader() |
ExcelContextualReader(org.springframework.core.io.Resource resource) |
Modifier and Type | Method and Description |
---|---|
Queue<org.apache.poi.ss.usermodel.Row> |
getRecordsForReProcessing()
Whichever records require lookup of data that may not exist yet can be queued up
|
void |
init()
Allow lazy initialization of Reader in cases where the resource may not be known @
PostConstruct time |
protected void |
process(T val)
Override this method if we wish to persist it or do something with it within
read(Object...) |
protected List<T> |
processUnprocessedRows() |
List<T> |
read(Object... context) |
void |
setRecordsForReProcessing(Queue<org.apache.poi.ss.usermodel.Row> recordsForReProcessing)
Whichever records require lookup of data that may not exist yet can be queued up
|
protected T |
transform(org.apache.poi.ss.usermodel.Row row)
If the transformation causes a
RequireLookAheadException then add it to the Queue for future processing and
re throw the exception. |
dispose, filter, getCurrentRawIndex, getState, getTIMEOUT_LOAD_IO_SECONDS, getWorksheet, getWorksheetIndex, hasNext, isInitialized, nextRecord, readBookTypeFromResource, resume, resumeFromState, setTIMEOUT_LOAD_IO_SECONDS, setWorksheetIndex, size
close, getCurrentIndex, getCurrentTupleIdentifier, getExceptions, getFilter, getId, getMessages, getMeta, getParams, getResource, getSourceLocation, getTransformer, handleMiscException, isFailFast, isPaused, kill, next, nextTupleResult, pause, remove, setExceptions, setFailFast, setFilter, setId, setMessages, setMeta, setParams, setResource, setTransformer, stop
addListener, getListeners, onChangeHandler, setListeners
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
public ExcelContextualReader(org.springframework.core.io.Resource resource)
public ExcelContextualReader()
@PostConstruct public void init() throws IOException, Exception
RealTimeLineReader
PostConstruct
timeinit
in interface RealTimeLineReader<T>
init
in class ExcelRowByRowReader<T>
Exception
IOException
protected T transform(org.apache.poi.ss.usermodel.Row row)
RequireLookAheadException
then add it to the Queue for future processing and
re throw the exception.
This method should only be used during the first Parse called from BaseIterativeProcessor.next()
; do not call from processUnprocessedRows()
transform
in class BaseIterativeProcessor<org.apache.poi.ss.usermodel.Row,T,Long>
row
- as Row
protected void process(T val)
read(Object...)
val
- public List<T> read(Object... context) throws Exception
read
in interface OneLoadReader<T>
Exception
public Queue<org.apache.poi.ss.usermodel.Row> getRecordsForReProcessing()
public void setRecordsForReProcessing(Queue<org.apache.poi.ss.usermodel.Row> recordsForReProcessing)
Copyright © 2018. All rights reserved.