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
_C
protected boolean
_CSVHeader
protected TableViewMeta
_tvm
protected int
_type
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 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 void
init(Connection C, TableViewMeta tvm, java.lang.String type, boolean CSVHeader)
boolean
process(int count, java.sql.ResultSet RS)
Called for each recordvoid
start()
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.Exception
Description copied from interface:RecordProcessor
Called before the first record is processed- Specified by:
start
in interfaceRecordProcessor
- Overrides:
start
in classExporterRecordProcessor
- Throws:
java.lang.Exception
-
process
public boolean process(int count, java.sql.ResultSet RS) throws java.lang.Exception
Description copied from interface:RecordProcessor
Called 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
-
-