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_EXTCOLUMNS_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_TYPEREGULAR_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, writeTablePropertiesaddIndex, 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, writeConstraintscheckConstraints, checkConstraints, checkConstraints, getMatchingRows, hasDeferredConstraint, isDeferAll, migrateaddTableModificationListener, getTableModificationListeners, publishEvent, removeTableModificationListener, setDeferAllConstraintsclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetTablePropertiesaddColumn, 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, updateRowprotected 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
AxionExceptionpublic void addColumn(Column col, boolean metaUpdateNeeded) throws AxionException
addColumn in class BaseDiskTableAxionExceptionpublic boolean loadExternalTable(java.util.Properties props)
throws AxionException
loadExternalTable in interface ExternalTabletable - Table to be setprops - Properties for TableAxionException - thrown while setting Propertiespublic void remount()
throws AxionException
remount in interface ExternalTableAxionExceptionpublic static java.lang.String addEscapeSequence(java.lang.String srcString)
protected void createOrLoadDataFile()
throws AxionException
createOrLoadDataFile in class BaseDiskTableAxionExceptionprotected void createOrLoadDataFile(boolean createNewDataFile)
throws AxionException
AxionExceptionpublic static java.lang.String fixEscapeSequence(java.lang.String srcString)
protected java.io.File getDataFile()
getDataFile in class BaseDiskTableprotected void renameTableFiles(java.lang.String oldName,
java.lang.String name)
renameTableFiles in class BaseDiskTableprotected java.io.File getLobDir()
getLobDir in class BaseDiskTableprotected long ignoreRowsToSkip()
throws AxionException
AxionExceptionprotected void initializeTable()
throws AxionException
AxionExceptionprotected abstract boolean isEndOfRecord(int recLength,
int nextChar,
BufferedDataInputStream data)
throws java.io.IOException
java.io.IOExceptionprotected boolean isEOF(int nextChar)
protected boolean isNullString(java.lang.String str)
protected java.lang.String getDefaultDataFileExtension()
getDefaultDataFileExtension in class BaseDiskTableprotected void reloadFilesAfterTruncate()
throws AxionException
reloadFilesAfterTruncate in class BaseDiskTableAxionExceptionprotected Row trySettingColumn(int idToAssign, Row row, int i, java.lang.String colValue) throws AxionException
AxionExceptionprotected java.lang.String evaluateForNull(java.lang.String colValue,
DataType datatype)
protected abstract void writeHeader(BufferedDataOutputStream data2) throws AxionException
AxionExceptionprotected int nextLineLength(long fileOffset)
throws AxionException
AxionException