Is not thread-safe.
| Modifier and Type | Class and Description |
|---|---|
| private class | TableImpl.
Utility for managing calculated columns. |
| public static enum | |
| public class | TableImpl.
Maintains the state of reading/updating a row of data. |
| private static enum | TableImpl.
the phases the RowState moves through as the data is parsed |
| private static enum | TableImpl.
various statuses for the row data |
| protected static class | TableImpl.
Maintains state for writing a new row of data. |
| Modifier and Type | Field and Description |
|---|---|
| private final TempPageHolder | addRowBufferH
page buffer used to update data pages when adding rows |
| private Boolean | allowAutoNumInsert
optional flag indicating whether or not auto numbers can be directly inserted by the user |
| private final List | autoNumColumns
List of autonumber columns in this table, ordered by column number |
| private final TableImpl. | calcColEval
handler for calculated columns |
| private final List | columns
List of columns in this table, ordered by column number |
| private final DatabaseImpl | database
owning database |
| private CursorImpl | defaultCursor
default cursor for iterating through the table, kept here for basic table traversal |
| private static final short | |
| private static final Comparator | DISPLAY_ORDER_COMPARATOR
comparator which sorts columns based on their display index |
| private final FKEnforcer | fkEnforcer
foreign-key enforcer for this table |
| private final int | flags
additional table flags from the catalog entry |
| private final UsageMap | freeSpacePages
Usage map of pages that this table owns with free space on them |
| private final Set | indexColumns
List of columns in this table which are in one or more indexes |
| private int | indexCount
Number of actual indexes on the table |
| private final List | indexDatas
List of index datas on this table (the actual backing data for an index) |
| private final List | indexes
List of indexes on this table (multiple logical indexes may be backed by the same index data) |
| private int | lastComplexTypeAutoNumber
last complex type auto number for the table |
| private int | lastLongAutoNumber
last long auto number for the table |
| private static final Logger | |
| private int | logicalIndexCount
Number of logical indexes for the table |
| private final TempPageHolder | longValueBufferH
page buffer used to write out-of-row "long value" data |
| pack-priv static final int | |
| private static final int | |
| private short | maxColumnCount
max Number of columns in the table (includes previous deletions) |
| private short | maxVarColumnCount
max Number of variable columns in the table |
| private int | modCount
modification count for the table, keeps row-states up-to-date |
| private final String | name
Table name as stored in Database |
| private static final short | |
| private static final short | |
| private final UsageMap | ownedPages
Usage map of pages that this table owns |
| private PropertyMaps | propertyMaps
properties group for this table (and columns) |
| private PropertyMap | props
properties for this table |
| private int | rowCount
Number of rows in the table |
| private RowValidatorEvalContext | rowValidator
table validator if any (and enabled) |
| private final TempPageHolder | tableDefBufferH
page buffer used to update the table def page |
| private final int | tableDefPageNumber
page number of the definition of this table |
| private ErrorHandler | tableErrorHandler
optional error handler to use when row errors are encountered |
| private final byte | tableType
Type of the table (either TYPE_SYSTEM or TYPE_USER) |
| public static final byte | TYPE_SYSTEM
Table type code for system tables |
| public static final byte | TYPE_USER
Table type code for user tables |
| private static final Comparator | VAR_LEN_COLUMN_COMPARATOR
comparator which sorts variable length columns based on their index into the variable length offset table |
| private final List | varColumns
List of variable length columns in this table, ordered by offset |
| private String | writeDefError
description of an inconsistency between the table definition and the column definitions, |
| private final TempBufferHolder | writeRowBufferH
buffer used to writing rows of data |
| Access | Constructor and Description |
|---|---|
| protected | |
| protected | TableImpl(DatabaseImpl
database which owns this table database, ByteBuffer Buffer to read the table with tableBuffer, int Page number of the table definition pageNumber, String Table name name, int flags)
|
| Modifier and Type | Method and Description |
|---|---|
| public static int | Returns: the row number of the new rowUpdates free space and row info for a new row of the given size in the given data page. |
| public Object[] | addRow(Object... row)
Implements io. Adds a single row to this table and writes it to disk. |
| public <M extends Map | addRowFromMap(M row)
Implements io. Calls |
| public List | addRows(List<? extends Object[]> rows)
Implements io. Add multiple rows to this table, only writing to disk after all rows have been written, and every time a data page is filled. |
| protected List | |
| public <M extends Map | addRowsFromMaps(List<M> rows)
Implements io. Calls |
| private Map. | |
| pack-priv void | |
| pack-priv void | |
| public Object[] | asRow(Map<String, ?> rowMap)
Implements io. Converts a map of columnName -> columnValue to an array of row values appropriate for a call to
|
| private Object[] | |
| public Object[] | asRowWithRowId(Map<String, ?> rowMap)
Converts a map of columnName -> columnValue to an array of row values appropriate for a call to
|
| public Object[] | asUpdateRow(Map<String, ?> rowMap)
Implements io. Converts a map of columnName -> columnValue to an array of row values appropriate for a call to
|
| public static short | |
| pack-priv void | |
| private void | |
| protected ByteBuffer | |
| private ByteBuffer | Returns: the given buffer, filled with the row datarow data, expected to be correct length for this table rowArray, ByteBuffer buffer to which to write the row data buffer, int min size for result row minRowSize, Map<ColumnImpl, byte[]> optional, pre-written values for var length columns (enables re-use of previously written
values). rawVarValues)Serialize a row of Objects into a byte buffer. |
| public TableImpl. | |
| private static void | |
| private static ByteBuffer | |
| public Row | |
| public RowId | |
| public void | |
| public String | Returns: A simple String representation of the entire table in tab-delimited formatReturns a simple String representation of the entire table in tab-delimited format. |
| public String | Returns: A simple String representation of the entire table in tab-delimited formatMaximum number of rows to display limit)Returns a simple String representation of the entire table in tab-delimited format. |
| pack-priv static Object[] | |
| private ByteBuffer | |
| private ByteBuffer | |
| pack-priv static ByteBuffer | |
| public IndexImpl | |
| public static short | |
| public static short | |
| public int | getApproximateOwnedPageCount()
Returns the approximate number of database pages owned by this table and all related indexes (this number does not take into account pages used for large OLE/MEMO fields). |
| pack-priv List | |
| public ColumnImpl | getColumn(String colName)
Implements io. Returns the column with the given name. |
| public int | getColumnCount()
Implements io. Returns the number of columns in this table. |
| public List | getColumns()
Implements io. Returns all of the columns in this table (unmodifiable List). |
| public LocalDateTime | getCreatedDate()
Implements io. Returns the created date for this table if available. |
| public DatabaseImpl | getDatabase()
Implements io. Returns the database to which this table belongs. |
| public CursorImpl | getDefaultCursor()
Implements io. Returns a simple Cursor, initialized on demand and held by this table. |
| public ErrorHandler | getErrorHandler()
Implements io. Gets the currently configured ErrorHandler (always non- |
| public IndexImpl | getForeignKeyIndex(Table otherTable)
Implements io. Returns the foreign key index joining this table to the given other table. |
| public JetFormat | |
| public IndexImpl | getIndex(String indexName)
Implements io. Returns the index with the given name. |
| pack-priv int | |
| public List | Returns: All of the IndexData on this table (unmodifiable List)Returns all of the IndexData on this table (unmodifiable List). |
| public List | getIndexes()
Implements io. Returns all of the Indexes on this table (unmodifiable List). |
| private static Object | getInputAutoNumberRowValue(boolean enableInsert, ColumnImpl col, Object[] row)
Optionally get the input autonumber row value for the given column from the given row if one was provided. |
| pack-priv int | |
| pack-priv int | |
| public int | |
| protected TempPageHolder | |
| public int | |
| public String | |
| pack-priv int | |
| pack-priv int | |
| public Row | getNextRow()
Implements io. Returns the next row in this table (Column name -> Column value) (uses the |
| public UsageMap. | |
| public PageChannel | |
| public IndexImpl | getPrimaryKeyIndex()
Implements io. Returns the primary key index for this table. |
| public PropertyMap | getProperties()
Implements io. Returns the properties for this table. |
| public PropertyMaps | Returns: all PropertyMaps for this table (and columns)Returns all PropertyMaps for this table (and columns). |
| public RowImpl | |
| private static RowImpl | getRow(JetFormat format, TableImpl.
Reads the row data from the given row buffer. |
| private static Object | getRowColumn(JetFormat format, ByteBuffer rowBuffer, ColumnImpl column, TableImpl.
Reads the column data from the given row buffer. |
| public int | getRowCount()
Implements io. Returns the number of rows currently stored in this table. |
| public static int | |
| public RowId | Returns: the generated RowId added to a row of values created viaasRowWithRowIdReturns the generated RowId added to a row of values created via |
| private NullMask | |
| pack-priv static int | getRowsOnDataPage(ByteBuffer rowBuffer, JetFormat format)
Returns the row count for the current page. |
| public static int | |
| public static int | |
| public Object | getRowValue(TableImpl.
Reads a single column from the given row. |
| public int | |
| public LocalDateTime | getUpdatedDate()
Implements io. Note jackcess does not automatically update the modified date of a Table. |
| private void | handleAutoNumbersForAdd(Object[] row, TableImpl.
Fill in all autonumber column values for add. |
| private void | handleAutoNumbersForUpdate(Object[] row, ByteBuffer rowBuffer, TableImpl.
Fill in all autonumber column values for update. |
| public boolean | |
| private void | |
| private void | |
| public boolean | isAllowAutoNumberInsert()
Implements io. Gets the currently configured auto number insert policy. |
| public static boolean | |
| public boolean | isHidden()
Implements io. Whether or not this table has been marked as hidden. |
| public static boolean | |
| public boolean | isSystem()
Implements io. Whether or not this table is a system (internal) table. |
| pack-priv boolean | |
| private static boolean | |
| public Iterator | iterator()
Implements io. Calls |
| private ByteBuffer | loadCompleteTableDefinitionBuffer(ByteBuffer tableBuffer, List<Integer> pages)
Returns a single ByteBuffer which contains the entire table definition (which may span multiple database pages). |
| private ByteBuffer | |
| protected ColumnImpl | mutateAddColumn(TableUpdater mutator)
Writes a column defined by the given TableUpdater to this table. |
| protected IndexImpl | |
| protected IndexData | mutateAddIndexData(TableUpdater mutator)
Writes a index defined by the given TableUpdater to this table. |
| public CursorBuilder | newCursor()
Implements io. Convenience method for constructing a new CursorBuilder for this Table. |
| private ByteBuffer | |
| private static void | |
| private void | |
| public static ByteBuffer | Returns: a ByteBuffer narrowed to the actual row data, or null if row was invalid or deletedSets the position and limit in a new buffer using the given rowState according to the given row number and row end, following overflow row pointers as necessary. |
| public void | propertiesUpdated()
Implements io. Invoked when new properties are saved. |
| private void | |
| private boolean | |
| private void | |
| private static short[] | readJumpTableVarColOffsets(TableImpl.
|
| private String | |
| private int | readNameLength(ByteBuffer buffer)
Returns a name length read from the buffer at the current position. |
| private void | |
| private void | |
| private void | |
| public void | reset()
Implements io. After calling this method, |
| private void | |
| pack-priv void | |
| pack-priv void | |
| private static void | |
| public static boolean | rowFitsOnDataPage(int rowLength, ByteBuffer dataPage, JetFormat format)
Returns |
| public void | setAllowAutoNumberInsert(Boolean newAllowAutoNumInsert)
Implements io. Sets the new auto number insert policy for the Table. |
| public void | setErrorHandler(ErrorHandler newErrorHandler)
Implements io. Sets a new ErrorHandler. |
| private void | setWriteDefError(String
description of the inconsistency reason)Records the first inconsistency found by |
| private static void | |
| public String | |
| public Row | |
| public Object[] | |
| public Object[] | |
| public <M extends Map | |
| private void | |
| public void | updateValue(Column column, RowId rowId, Object value)
Update the given column's value for the given row id. Provided RowId must have previously been returned from this Table. |
| private void | validateColumnDefs()
Verifies that the column counts and sizes in the table definition cover the columns which are actually defined. |
| private void | |
| pack-priv String | |
| private void | writeDataPage(ByteBuffer pageBuffer, int pageNumber)
Writes the given page data to the given page number, clears any other relevant buffers. |
| pack-priv static void | writeName(ByteBuffer buffer, String name, Charset charset)
Writes the given name into the given buffer in the format as expected by |
| protected static void | writeTableDefinition(TableCreator creator)
Writes a new table defined by the given TableCreator to the database. |
| private static void | writeTableDefinitionBuffer(ByteBuffer buffer, int tdefPageNumber, TableMutator mutator, List<Integer> reservedPages)
|
| private static void | writeTableDefinitionHeader(TableCreator creator, ByteBuffer
Buffer to write to buffer, int totalTableDefSize)
|
| private static void | writeTablePageHeader(ByteBuffer
Buffer to write to buffer)Writes the page header for a table definition page |