Package tilda.db.processors
Class ExporterRecordProcessorCSVJSON
- java.lang.Object
-
- tilda.db.processors.ExporterRecordProcessor
-
- tilda.db.processors.ExporterRecordProcessorCSVJSON
-
- All Implemented Interfaces:
RecordProcessor
public class ExporterRecordProcessorCSVJSON extends ExporterRecordProcessor
-
-
Field Summary
Fields Modifier and Type Field Description protected Connection_Cprotected boolean_CSVHeaderprotected TableViewMeta_tvmprotected int_typeprotected 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 ExporterRecordProcessorCSVJSON(Connection C, java.io.Writer out, java.lang.String outName, long logFreq, TableViewMeta tvm, java.lang.String type, boolean CSVHeader)ExporterRecordProcessorCSVJSON(Connection C, java.lang.String outFile, long logFreq, TableMeta tvm, java.lang.String type, boolean CSVHeader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidinit(Connection C, TableViewMeta tvm, java.lang.String type, boolean CSVHeader)booleanprocess(int count, java.sql.ResultSet RS)Called for each recordvoidstart()Called before the first record is processed-
Methods inherited from class tilda.db.processors.ExporterRecordProcessor
end, getEndTimeStamp, getStartTimeStamp, getTotalCount, process
-
-
-
-
Field Detail
-
LOG
protected static final org.apache.logging.log4j.Logger LOG
-
_C
protected Connection _C
-
_type
protected int _type
-
_CSVHeader
protected boolean _CSVHeader
-
_tvm
protected TableViewMeta _tvm
-
-
Constructor Detail
-
ExporterRecordProcessorCSVJSON
public ExporterRecordProcessorCSVJSON(Connection C, java.io.Writer out, java.lang.String outName, long logFreq, TableViewMeta tvm, java.lang.String type, boolean CSVHeader) throws java.lang.Exception
- Throws:
java.lang.Exception
-
ExporterRecordProcessorCSVJSON
public ExporterRecordProcessorCSVJSON(Connection C, java.lang.String outFile, long logFreq, TableMeta tvm, java.lang.String type, boolean CSVHeader) throws java.lang.Exception
- Throws:
java.lang.Exception
-
-
Method Detail
-
init
protected void init(Connection C, TableViewMeta tvm, java.lang.String type, boolean CSVHeader) throws java.lang.Exception
- Throws:
java.lang.Exception
-
start
public void start() throws java.lang.ExceptionDescription copied from interface:RecordProcessorCalled before the first record is processed- Specified by:
startin interfaceRecordProcessor- Overrides:
startin classExporterRecordProcessor- Throws:
java.lang.Exception
-
process
public boolean process(int count, java.sql.ResultSet RS) throws java.lang.ExceptionDescription copied from interface:RecordProcessorCalled for each record- 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
-
-