Class AbstractTableDataReader
java.lang.Object
org.jumpmind.symmetric.io.data.reader.AbstractDataReader
org.jumpmind.symmetric.io.data.reader.AbstractTableDataReader
- All Implemented Interfaces:
IDataReader
,IDataResource
- Direct Known Subclasses:
CsvTableDataReader
,SqlDataReader
A data reader that knows it will be reading a single batch and a single table.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Batch
protected DataContext
static final String
protected int
protected boolean
protected Reader
protected boolean
protected boolean
protected Statistics
protected Table
Fields inherited from class org.jumpmind.symmetric.io.data.reader.AbstractDataReader
log
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractTableDataReader
(BinaryEncoding binaryEncoding, String catalogName, String schemaName, String tableName, InputStream is) AbstractTableDataReader
(BinaryEncoding binaryEncoding, String catalogName, String schemaName, String tableName, Reader reader) AbstractTableDataReader
(Batch batch, String catalogName, String schemaName, String tableName, File file) AbstractTableDataReader
(Batch batch, String catalogName, String schemaName, String tableName, InputStream is) AbstractTableDataReader
(Batch batch, String catalogName, String schemaName, String tableName, Reader reader) AbstractTableDataReader
(Batch batch, String catalogName, String schemaName, String tableName, String input) AbstractTableDataReader
(Batch batch, String catalogName, String schemaName, String tableName, StringBuilder input) -
Method Summary
Modifier and TypeMethodDescriptionprotected CsvData
buildCsvData
(String[] tokens, DataEventType dml) void
close()
protected abstract void
finish()
protected abstract void
init()
nextData()
void
open
(DataContext context) protected abstract CsvData
readNext()
protected static String
toTableName
(String tableName, File file) Methods inherited from class org.jumpmind.symmetric.io.data.reader.AbstractDataReader
logDebugAndCountBytes, toBatch, toReader, toReader
-
Field Details
-
CTX_LINE_NUMBER
-
reader
-
statistics
-
context
-
batch
-
table
-
lineNumber
protected int lineNumber -
readDataBeforeTable
protected boolean readDataBeforeTable -
readingBatch
protected boolean readingBatch -
readingTable
protected boolean readingTable
-
-
Constructor Details
-
AbstractTableDataReader
public AbstractTableDataReader(Batch batch, String catalogName, String schemaName, String tableName, StringBuilder input) -
AbstractTableDataReader
public AbstractTableDataReader(Batch batch, String catalogName, String schemaName, String tableName, InputStream is) -
AbstractTableDataReader
-
AbstractTableDataReader
-
AbstractTableDataReader
-
AbstractTableDataReader
public AbstractTableDataReader(BinaryEncoding binaryEncoding, String catalogName, String schemaName, String tableName, Reader reader) -
AbstractTableDataReader
public AbstractTableDataReader(BinaryEncoding binaryEncoding, String catalogName, String schemaName, String tableName, InputStream is)
-
-
Method Details
-
toTableName
-
open
- Specified by:
open
in interfaceIDataResource
-
init
protected abstract void init() -
readNext
-
finish
protected abstract void finish() -
buildCsvData
-
nextData
- Specified by:
nextData
in interfaceIDataReader
-
nextBatch
- Specified by:
nextBatch
in interfaceIDataReader
-
nextTable
- Specified by:
nextTable
in interfaceIDataReader
-
close
public void close()- Specified by:
close
in interfaceIDataResource
-
getStatistics
- Specified by:
getStatistics
in interfaceIDataResource
-