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<?>_factoryClassprotected boolean_headerprotected static org.apache.logging.log4j.LoggerLOG-
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 booleanprocess(int count, T obj)Called for each recordvoidstart()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.ExceptionDescription copied from interface:RecordProcessorCalled before the first record is processed- Specified by:
startin interfaceObjectProcessor<T extends CSVable>- Specified by:
startin interfaceRecordProcessor- Overrides:
startin classExporterRecordProcessor- Throws:
java.lang.Exception
-
process
public boolean process(int count, T obj) throws java.lang.ExceptionDescription copied from interface:ObjectProcessorCalled 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
-
-