org.axiondb.engine.tables
Class BaseFlatfileTable
java.lang.Object
org.axiondb.event.BaseTableModificationPublisher
org.axiondb.engine.tables.BaseTable
org.axiondb.engine.tables.BaseDiskTable
org.axiondb.engine.tables.BaseFlatfileTable
- All Implemented Interfaces:
- ExternalTable, RowSource, Table
- Direct Known Subclasses:
- DelimitedFlatfileTable, FixedWidthFlatfileTable, TaggedEBCDICTable
- public abstract class BaseFlatfileTable
- extends BaseDiskTable
- implements ExternalTable
Base Flatfile Table
Methods inherited from class org.axiondb.engine.tables.BaseDiskTable |
addColumn, addConstraint, appendLongFile, appendLongFile, applyDeletes, applyInserts, applyUpdates, clearDataFileReference, clearMetaFileReference, closeFiles, createOrLoadFreeIdsFile, createOrLoadMetaFile, createOrLoadPidxFile, deleteFile, drop, freeRowId, getCanonicalPath, getMetaFile, getNextRowId, getReadFile, getRootDir, getRow, getRowCount, getTableFile, getWriteFile, initFiles, initializeRowCount, openFile, parseIntFile, parseMetaFile, parseTableProperties, populateIndex, remount, removeIndex, rename, renameFile, saveIndices, saveIndicesAfterTruncate, setPidx, shutdown, truncate, tryToRemove, updateLongFile, writeFridFile, writeIntFile, writeLongFile, writeMetaFile, writeNameToFile, writePidxFile, writeTableProperties |
Methods inherited from class org.axiondb.engine.tables.BaseTable |
addIndex, addRow, applyDeletesToIndices, applyInsertsToIndices, applyUpdatesToIndices, checkConstraints, checkConstraints, deleteRow, getColumn, getColumn, getColumnCount, getColumnIdentifiers, getColumnIndex, getConstraints, getIndexedRows, getIndexForColumn, getIndices, getMatchingRows, getName, getRowIterator, getType, hasColumn, hasDeferredConstraint, hasIndex, isColumnIndexed, isPrimaryKeyConstraintExists, isUniqueConstraintExists, makeRowDecorator, makeTransactableTable, notifyColumnsOfNewLobDir, readColumns, readConstraints, removeConstraint, setName, setType, toString, truncateIndices, updateRow, writeColumns, writeConstraints |
Methods inherited from interface org.axiondb.Table |
addColumn, addConstraint, addIndex, addRow, addTableModificationListener, applyDeletes, applyInserts, applyUpdates, drop, freeRowId, getColumn, getColumn, getColumnCount, getColumnIdentifiers, getColumnIndex, getConstraints, getIndexedRows, getIndexForColumn, getIndices, getMatchingRows, getName, getNextRowId, getRowCount, getRowIterator, getType, hasColumn, hasIndex, isColumnIndexed, isPrimaryKeyConstraintExists, isUniqueConstraintExists, makeRowDecorator, makeTransactableTable, populateIndex, remount, removeConstraint, removeIndex, removeTableModificationListener, rename, shutdown, truncate, updateRow |
CR
protected static final char CR
- See Also:
- Constant Field Values
EOF
protected static final int EOF
- See Also:
- Constant Field Values
FILLER
protected static final char FILLER
- See Also:
- Constant Field Values
NL
protected static final char NL
- See Also:
- Constant Field Values
PROP_FILENAME
public static final String PROP_FILENAME
- See Also:
- Constant Field Values
PROP_ISFIRSTLINEHEADER
protected static final String PROP_ISFIRSTLINEHEADER
- See Also:
- Constant Field Values
PROP_RECORDDELIMITER
protected static final String PROP_RECORDDELIMITER
- See Also:
- Constant Field Values
PROP_ROWSTOSKIP
protected static final String PROP_ROWSTOSKIP
- See Also:
- Constant Field Values
PROP_MAXFAULTS
protected static final String PROP_MAXFAULTS
- See Also:
- Constant Field Values
context
protected TableOrganizationContext context
_fileName
protected String _fileName
_isFirstLineHeader
protected boolean _isFirstLineHeader
_rowsToSkip
protected int _rowsToSkip
_maxFaults
protected long _maxFaults
_faultCount
protected long _faultCount
_lineSep
protected String _lineSep
BaseFlatfileTable
public BaseFlatfileTable(String name,
Database db,
TableFactory factory)
throws AxionException
addColumn
public void addColumn(Column col,
boolean metaUpdateNeeded)
throws AxionException
- Overrides:
addColumn
in class BaseDiskTable
- Throws:
AxionException
setTableProperties
public boolean setTableProperties(Properties props)
throws AxionException
- Sets the properties for the given text table this is only called once by create
command get executed
- Specified by:
setTableProperties
in interface ExternalTable
- Parameters:
props
- Properties for Table
- Throws:
AxionException
- thrown while setting Properties
remount
public void remount()
throws AxionException
- Specified by:
remount
in interface ExternalTable
- Throws:
AxionException
addEscapeSequence
public static String addEscapeSequence(String srcString)
applyInserts
protected void applyInserts(Iterator rows)
throws AxionException
- Specified by:
applyInserts
in class BaseDiskTable
- Throws:
AxionException
applyUpdates
protected void applyUpdates(Iterator rows)
throws AxionException
- Specified by:
applyUpdates
in class BaseDiskTable
- Throws:
AxionException
createOrLoadDataFile
protected void createOrLoadDataFile()
throws AxionException
- Overrides:
createOrLoadDataFile
in class BaseDiskTable
- Throws:
AxionException
fixEscapeSequence
public static String fixEscapeSequence(String srcString)
getDataFile
protected File getDataFile()
- Specified by:
getDataFile
in class BaseDiskTable
renameTableFiles
protected void renameTableFiles(String oldName,
String name)
- Overrides:
renameTableFiles
in class BaseDiskTable
getLobDir
protected File getLobDir()
- Specified by:
getLobDir
in class BaseDiskTable
getRowByOffset
protected abstract Row getRowByOffset(int idToAssign,
long ptr)
throws AxionException
- Specified by:
getRowByOffset
in class BaseDiskTable
- Throws:
AxionException
getRowIterator
protected RowIterator getRowIterator()
throws AxionException
- Specified by:
getRowIterator
in class BaseTable
- Throws:
AxionException
ignoreRowsToSkip
protected long ignoreRowsToSkip()
throws AxionException
- Throws:
AxionException
initializeTable
protected void initializeTable()
throws AxionException
- Throws:
AxionException
isCarriageReturn
protected boolean isCarriageReturn(int nextChar)
isEndOfRecord
protected abstract boolean isEndOfRecord(int recLength,
int nextChar,
RandomAccessFile data)
throws IOException
- Throws:
IOException
isEOF
protected boolean isEOF(int nextChar)
isNewLine
protected boolean isNewLine(int nextChar)
isNullString
protected boolean isNullString(String str)
getDefaultDataFileExtension
protected String getDefaultDataFileExtension()
- Overrides:
getDefaultDataFileExtension
in class BaseDiskTable
reloadDataFile
protected void reloadDataFile()
throws AxionException
- Specified by:
reloadDataFile
in class BaseDiskTable
- Throws:
AxionException
trySettingColumn
protected Row trySettingColumn(int idToAssign,
Row row,
int i,
String colValue)
throws AxionException
- Throws:
AxionException
writeHeader
protected abstract void writeHeader(RandomAccessFile data2)
throws AxionException
- Throws:
AxionException
writeRow
protected abstract void writeRow(CharArrayWriter buffer,
Row row)
throws AxionException
- Throws:
AxionException
nextLineLength
protected int nextLineLength(long fileOffset)
throws AxionException
- Throws:
AxionException