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 Batchprotected DataContextstatic final Stringprotected intprotected booleanprotected Readerprotected booleanprotected booleanprotected Statisticsprotected TableFields 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 CsvDatabuildCsvData(String[] tokens, DataEventType dml) voidclose()protected abstract voidfinish()protected abstract voidinit()nextData()voidopen(DataContext context) protected abstract CsvDatareadNext()protected static StringtoTableName(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:
openin interfaceIDataResource
-
init
protected abstract void init() -
readNext
-
finish
protected abstract void finish() -
buildCsvData
-
nextData
- Specified by:
nextDatain interfaceIDataReader
-
nextBatch
- Specified by:
nextBatchin interfaceIDataReader
-
nextTable
- Specified by:
nextTablein interfaceIDataReader
-
close
public void close()- Specified by:
closein interfaceIDataResource
-
getStatistics
- Specified by:
getStatisticsin interfaceIDataResource
-