public abstract class BaseFlatfileTable extends BaseDiskTable implements ExternalTable
Modifier and Type | Class and Description |
---|---|
protected class |
BaseFlatfileTable.BaseFlatfileTableOrganizationContext |
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
_fileName |
protected boolean |
_isFirstLineHeader |
protected java.lang.String |
_lineSep |
protected long |
_maxFaults |
protected int |
_rowsToSkip |
protected TableOrganizationContext |
context |
protected static int |
EOF |
protected static char |
FILLER |
static java.lang.String |
PROP_FILENAME |
protected static java.lang.String |
PROP_ISFIRSTLINEHEADER |
protected static java.lang.String |
PROP_MAXFAULTS |
protected static java.lang.String |
PROP_RECORDDELIMITER |
protected static java.lang.String |
PROP_ROWSTOSKIP |
_dataFile, _dbdir, _freeIds, _readOnly, _rowCount, CURRENT_META_VERSION, FRID_FILE_EXT, FS, INDICES_DIR_NAME, INVALID_OFFSET, META_FILE_EXT, PIDX_FILE_EXT, SEQ_FILE_EXT, TYPE_FILE_EXT
COLUMNS_ARE_CASE_SENSITIVE, DELIMITED_TABLE_TYPE, EXTERNAL_DB_TABLE_TYPE, FW_TABLE_TYPE, PROP_CATALOG, PROP_CREATE_IF_NOT_EXIST, PROP_DB, PROP_LOADTYPE, PROP_ORDERBY, PROP_REMOTETABLE, PROP_SCHEMA, PROP_VENDOR, PROP_WHERE, TAGGED_EBCDIC_TABLE_TYPE
REGULAR_TABLE_TYPE, SYSTEM_TABLE_TYPE
Constructor and Description |
---|
BaseFlatfileTable(java.lang.String name,
Database db,
TableFactory factory) |
Modifier and Type | Method and Description |
---|---|
void |
addColumn(Column col,
boolean metaUpdateNeeded) |
static java.lang.String |
addEscapeSequence(java.lang.String srcString) |
protected void |
createOrLoadDataFile() |
protected void |
createOrLoadDataFile(boolean createNewDataFile) |
protected java.lang.String |
evaluateForNull(java.lang.String colValue,
DataType datatype) |
static java.lang.String |
fixEscapeSequence(java.lang.String srcString) |
protected java.io.File |
getDataFile() |
protected java.lang.String |
getDefaultDataFileExtension() |
protected java.io.File |
getLobDir() |
protected long |
ignoreRowsToSkip() |
protected void |
initializeTable() |
protected abstract boolean |
isEndOfRecord(int recLength,
int nextChar,
BufferedDataInputStream data) |
protected boolean |
isEOF(int nextChar) |
protected boolean |
isNullString(java.lang.String str) |
boolean |
loadExternalTable(java.util.Properties props)
Loads external data using the given properties table - should be called only once
by the table factory.
|
protected int |
nextLineLength(long fileOffset) |
protected void |
reloadFilesAfterTruncate() |
void |
remount() |
protected void |
renameTableFiles(java.lang.String oldName,
java.lang.String name) |
protected Row |
trySettingColumn(int idToAssign,
Row row,
int i,
java.lang.String colValue) |
protected abstract void |
writeHeader(BufferedDataOutputStream data2) |
addColumn, addConstraint, applyDeletes, applyInserts, applyUpdates, checkpoint, clearDataFileReference, closeFiles, createOrLoadFreeIdsFile, drop, freeRowId, getInputStream, getNextRowId, getOutputStream, getPidxList, getRootDir, getRow, getRowByOffset, getRowCount, getRowIterator, getTableFile, initFiles, initializeRowCount, isReadOnly, loadOrMigrateMetaFile, migrate, parsePidxFile, parseTableProperties, populateIndex, remount, removeIndex, rename, resetLobColumns, saveIndicesAfterTruncate, setSequence, shutdown, truncate, tryToRemove, writeFridFile, writeMetaFile, writeNameToFile, writeRow, writeTableProperties
addIndex, addRow, applyDeletesToIndices, applyInsertsToIndices, applyUpdatesToIndices, clearCache, deleteRow, getColumn, getColumn, getColumnCount, getColumnIdentifiers, getColumnIndex, getConstraint, getConstraints, getIndexedRows, getIndexedRows, getIndexForColumn, getIndices, getName, getRowIterator, getSequence, getType, hasColumn, hasIndex, isColumnIndexed, isPrimaryKeyConstraintExists, isUniqueConstraintExists, makeRowDecorator, makeTransactableTable, notifyColumnsOfNewLobDir, readColumns, readConstraints, recreateIndices, removeConstraint, setName, setType, toString, truncateIndices, updateRow, writeColumns, writeConstraints
checkConstraints, checkConstraints, checkConstraints, getMatchingRows, hasDeferredConstraint, isDeferAll, migrate
addTableModificationListener, getTableModificationListeners, publishEvent, removeTableModificationListener, setDeferAllConstraints
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getTableProperties
addColumn, addConstraint, addIndex, addRow, addTableModificationListener, applyDeletes, applyInserts, applyUpdates, checkpoint, deleteRow, drop, freeRowId, getColumn, getColumn, getColumnCount, getColumnIdentifiers, getColumnIndex, getConstraint, getConstraints, getIndexedRows, getIndexedRows, getIndexForColumn, getIndices, getMatchingRows, getName, getNextRowId, getRowCount, getRowIterator, getSequence, getTableModificationListeners, getType, hasColumn, hasIndex, isColumnIndexed, isPrimaryKeyConstraintExists, isUniqueConstraintExists, makeRowDecorator, makeTransactableTable, migrate, populateIndex, remount, removeConstraint, removeIndex, removeTableModificationListener, rename, setDeferAllConstraints, setSequence, shutdown, truncate, updateRow
protected static final int EOF
protected static final char FILLER
public static final java.lang.String PROP_FILENAME
protected static final java.lang.String PROP_ISFIRSTLINEHEADER
protected static final java.lang.String PROP_RECORDDELIMITER
protected static final java.lang.String PROP_ROWSTOSKIP
protected static final java.lang.String PROP_MAXFAULTS
protected TableOrganizationContext context
protected java.lang.String _fileName
protected boolean _isFirstLineHeader
protected int _rowsToSkip
protected long _maxFaults
protected java.lang.String _lineSep
public BaseFlatfileTable(java.lang.String name, Database db, TableFactory factory) throws AxionException
AxionException
public void addColumn(Column col, boolean metaUpdateNeeded) throws AxionException
addColumn
in class BaseDiskTable
AxionException
public boolean loadExternalTable(java.util.Properties props) throws AxionException
loadExternalTable
in interface ExternalTable
table
- Table to be setprops
- Properties for TableAxionException
- thrown while setting Propertiespublic void remount() throws AxionException
remount
in interface ExternalTable
AxionException
public static java.lang.String addEscapeSequence(java.lang.String srcString)
protected void createOrLoadDataFile() throws AxionException
createOrLoadDataFile
in class BaseDiskTable
AxionException
protected void createOrLoadDataFile(boolean createNewDataFile) throws AxionException
AxionException
public static java.lang.String fixEscapeSequence(java.lang.String srcString)
protected java.io.File getDataFile()
getDataFile
in class BaseDiskTable
protected void renameTableFiles(java.lang.String oldName, java.lang.String name)
renameTableFiles
in class BaseDiskTable
protected java.io.File getLobDir()
getLobDir
in class BaseDiskTable
protected long ignoreRowsToSkip() throws AxionException
AxionException
protected void initializeTable() throws AxionException
AxionException
protected abstract boolean isEndOfRecord(int recLength, int nextChar, BufferedDataInputStream data) throws java.io.IOException
java.io.IOException
protected boolean isEOF(int nextChar)
protected boolean isNullString(java.lang.String str)
protected java.lang.String getDefaultDataFileExtension()
getDefaultDataFileExtension
in class BaseDiskTable
protected void reloadFilesAfterTruncate() throws AxionException
reloadFilesAfterTruncate
in class BaseDiskTable
AxionException
protected Row trySettingColumn(int idToAssign, Row row, int i, java.lang.String colValue) throws AxionException
AxionException
protected java.lang.String evaluateForNull(java.lang.String colValue, DataType datatype)
protected abstract void writeHeader(BufferedDataOutputStream data2) throws AxionException
AxionException
protected int nextLineLength(long fileOffset) throws AxionException
AxionException