Package tilda.db.processors
Class ExporterObjectProcessorCSV<T extends CSVable>
- java.lang.Object
-
- tilda.db.processors.ExporterRecordProcessor
-
- tilda.db.processors.ExporterObjectProcessor<T>
-
- tilda.db.processors.ExporterObjectProcessorCSV<T>
-
- All Implemented Interfaces:
ObjectProcessor<T>
,RecordProcessor
public class ExporterObjectProcessorCSV<T extends CSVable> extends ExporterObjectProcessor<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Class<?>
_factoryClass
protected boolean
_header
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 ExporterObjectProcessorCSV(java.io.Writer out, java.lang.String outName, long logFreq, java.lang.Class<?> factoryClass, boolean header)
ExporterObjectProcessorCSV(java.lang.String outFile, long logFreq, java.lang.Class<?> factoryClass, boolean header)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
process(int count, T obj)
Called for each recordvoid
start()
Called before the first record is processed-
Methods inherited from class tilda.db.processors.ExporterObjectProcessor
process
-
Methods inherited from class tilda.db.processors.ExporterRecordProcessor
end, getEndTimeStamp, getStartTimeStamp, getTotalCount, process
-
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
-
-
-
-
Constructor Detail
-
ExporterObjectProcessorCSV
public ExporterObjectProcessorCSV(java.io.Writer out, java.lang.String outName, long logFreq, java.lang.Class<?> factoryClass, boolean header)
-
ExporterObjectProcessorCSV
public ExporterObjectProcessorCSV(java.lang.String outFile, long logFreq, java.lang.Class<?> factoryClass, boolean header) throws java.io.FileNotFoundException
- Throws:
java.io.FileNotFoundException
-
-
Method Detail
-
start
public void start() throws java.lang.Exception
Description copied from interface:RecordProcessor
Called before the first record is processed- Specified by:
start
in interfaceObjectProcessor<T extends CSVable>
- Specified by:
start
in interfaceRecordProcessor
- Overrides:
start
in classExporterRecordProcessor
- Throws:
java.lang.Exception
-
process
public boolean process(int count, T obj) throws java.lang.Exception
Description copied from interface:ObjectProcessor
Called for each record- Parameters:
count
- the count of the object processed, starting at 0 for the first object processed.obj
- the object processed.- Returns:
- true if processing was successful and should continue, or false if processing was unsuccessful and should be aborted.
- Throws:
java.lang.Exception
-
-