Package tilda.db.processors
Class ExporterObjectProcessor<T>
- java.lang.Object
-
- tilda.db.processors.ExporterRecordProcessor
-
- tilda.db.processors.ExporterObjectProcessor<T>
-
- All Implemented Interfaces:
ObjectProcessor<T>
,RecordProcessor
- Direct Known Subclasses:
ExporterObjectProcessorCSV
,ExporterObjectProcessorJSON
public abstract class ExporterObjectProcessor<T> extends ExporterRecordProcessor implements ObjectProcessor<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.apache.logging.log4j.Logger
LOG
-
Fields inherited from class tilda.db.processors.ExporterRecordProcessor
_cleanWriter, _endTs, _logFreq, _out, _outName, _startTs, _totalCount
-
-
Constructor Summary
Constructors Constructor Description ExporterObjectProcessor(java.io.Writer out, java.lang.String outName, long logFreq)
ExporterObjectProcessor(java.lang.String outFile, long logFreq)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
process(int count, java.sql.ResultSet RS)
Called for each record-
Methods inherited from class tilda.db.processors.ExporterRecordProcessor
end, getEndTimeStamp, getStartTimeStamp, getTotalCount, process, start
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface tilda.db.processors.ObjectProcessor
end, process, start
-
-
-
-
Constructor Detail
-
ExporterObjectProcessor
public ExporterObjectProcessor(java.io.Writer out, java.lang.String outName, long logFreq)
- Parameters:
out
-outName
- The name of the WriterlogFreq
-
-
ExporterObjectProcessor
public ExporterObjectProcessor(java.lang.String outFile, long logFreq) throws java.io.FileNotFoundException
- Parameters:
outFile
-logFreq
-- Throws:
java.io.FileNotFoundException
-
-
Method Detail
-
process
public boolean process(int count, java.sql.ResultSet RS) throws java.lang.Exception
Description copied from interface:RecordProcessor
Called for each record- Specified by:
process
in interfaceRecordProcessor
- Parameters:
count
- the count of the record being processed starting at 0 for the first recordRS
- the result set to be processed- Returns:
- whether this was successful or not. If false is returned, the process will be aborted.
- Throws:
java.lang.Exception
-
-