Database instance. The Table instance provides
access to the table metadata as well as the table data. There are basic data operations on the Table interface (i.e.
iterator addRow, updateRow and deleteRow), but for advanced search and data
manipulation a Cursor instance should be used. New Tables can be created using a TableBuilder. The
io.github.spannm.jackcess.util.Joiner utility can be used to traverse table relationships (e.g. find
rows in another table based on a foreign-key relationship).
A Table instance is not thread-safe (see Database for more thread-safety details).
| Modifier and Type | Class and Description |
|---|---|
| public static enum | Table.
enum which controls the ordering of the columns in a table. |
| Modifier and Type | Method and Description |
|---|---|
| public Object[] | Returns: the given row values if long enough, otherwise a new array. the returned array will contain any autonumbers generatedrow values for a single row. the given row array will be modified if this table contains an
auto-number column, otherwise it will not be modified. row)Adds a single row to this table and writes it to disk. |
| public <M extends Map | Returns: the given row map, which will contain any autonumbers generatedCalls |
| public List | Returns: the given row values list (unless row values were to small), with appropriately sized row values (the ones passed in if long enough). the returned arrays will contain any autonumbers generatedList of Object[] row values. the rows will be modified if this table contains an auto-number column,
otherwise they will not be modified. rows)Add multiple rows to this table, only writing to disk after all rows have been written, and every time a data page is filled. |
| public <M extends Map | Returns: the given row map list, where the row maps will contain any autonumbers generatedCalls |
| public Object[] | asRow(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)
Converts a map of columnName -> columnValue to an array of row values appropriate for a call to
|
| public Row | |
| public Column | Returns: the column with the given nameRedeclares io. Returns the column with the given name. |
| public int | getColumnCount()
Redeclares io. Returns the number of columns in this table. |
| public List | Returns: All of the columns in this table (unmodifiable List)Redeclares io. Returns all of the columns in this table (unmodifiable List). |
| public LocalDateTime | Returns: the created date for this table if availableRedeclares io. Returns the created date for this table if available. |
| public Database | getDatabase()
Redeclares io. Returns the database to which this table belongs. |
| public Cursor | Returns: a simple Cursor, initialized on demand and held by this table. This cursor backs the row traversal methods available on the Table interface. For advanced Table traversal and manipulation, use the Cursor directly.Returns a simple Cursor, initialized on demand and held by this table. |
| public ErrorHandler | |
| public Index | Returns: the foreign key index joining this table to the given other tableRedeclares io. Returns the foreign key index joining this table to the given other table. |
| public Index | Returns: the index with the given nameRedeclares io. Returns the index with the given name. |
| public List | Returns: All of the Indexes on this table (unmodifiable List)Redeclares io. Returns all of the Indexes on this table (unmodifiable List). |
| public String | Returns: The name of the tableRedeclares io. Returns the name of the table. |
| public Row | Returns: The next row in this table (Column name -> Column value) (uses thedefault
cursor)Returns the next row in this table (Column name -> Column value) (uses the |
| public Index | Returns: the primary key index for this tableRedeclares io. Returns the primary key index for this table. |
| public PropertyMap | Returns: the properties for this tableRedeclares io. Returns the properties for this table. |
| public int | Returns: the number of rows currently stored in this tableReturns the number of rows currently stored in this table. |
| public LocalDateTime | Returns: the last updated date for this table if availableRedeclares io. Note jackcess does not automatically update the modified date of a Table. |
| public boolean | |
| public boolean | isHidden()
Redeclares io. Whether or not this table has been marked as hidden. |
| public boolean | isSystem()
Redeclares io. Whether or not this table is a system (internal) table. |
| public Iterator | iterator()
Redeclares java. Calls |
| public default OleBlob. | |
| public CursorBuilder | |
| public void | reset()
After calling this method, |
| public void | setAllowAutoNumberInsert(Boolean allowAutoNumInsert)
Sets the new auto number insert policy for the Table. |
| public void | |
| public default Stream | |
| public Row |
| addRow | back to summary |
|---|---|
| public Object[] addRow(Object... row) throws IOException Adds a single row to this table and writes it to disk. The values are expected to be given in the order that the
Columns are listed by the Note, if this table has an auto-number column, the value generated will be put back into the given row array (assuming the given row array is at least as long as the number of Columns in this Table).
| |
| addRowFromMap | back to summary |
|---|---|
| public <M extends Map Calls Note, if this table has an auto-number column, the value generated will be put back into the given row map.
| |
| addRows | back to summary |
|---|---|
| public List Add multiple rows to this table, only writing to disk after all rows have been written, and every time a data
page is filled. This is much more efficient than calling Note, if this table has an auto-number column, the values written will be put back into the given row arrays (assuming the given row array is at least as long as the number of Columns in this Table).
Most exceptions thrown from this method will be wrapped with a
| |
| addRowsFromMaps | back to summary |
|---|---|
| public <M extends Map Calls Note, if this table has an auto-number column, the values generated will be put back into the appropriate row maps.
Most exceptions thrown from this method will be wrapped with a
| |
| asRow | back to summary |
|---|---|
| public Object[] asRow(Map<String, ?> rowMap) Converts a map of columnName -> columnValue to an array of row values appropriate for a call to
| |
| asUpdateRow | back to summary |
|---|---|
| public Object[] asUpdateRow(Map<String, ?> rowMap) Converts a map of columnName -> columnValue to an array of row values appropriate for a call to
| |
| deleteRow | back to summary |
|---|---|
| public Row deleteRow(Row row) throws IOException Delete the given row. Provided Row must have previously been returned from this Table.
| |
| getColumn | back to summary |
|---|---|
| public Column getColumn(String name) Redeclares io. Doc from io. Returns the column with the given name. | |
| getColumnCount | back to summary |
|---|---|
| public int getColumnCount() Redeclares io. Doc from io. Returns the number of columns in this table.
| |
| getColumns | back to summary |
|---|---|
| public List Redeclares io. Doc from io. Returns all of the columns in this table (unmodifiable List). | |
| getCreatedDate | back to summary |
|---|---|
| public LocalDateTime getCreatedDate() throws IOException Redeclares io. Doc from io. Returns the created date for this table if available.
| |
| getDatabase | back to summary |
|---|---|
| public Database getDatabase() Redeclares io. Doc from io. Returns the database to which this table belongs.
| |
| getDefaultCursor | back to summary |
|---|---|
| public Cursor getDefaultCursor() Returns a simple Cursor, initialized on demand and held by this table. This cursor backs the row traversal methods available on the Table interface. For advanced Table traversal and manipulation, use the Cursor directly.
| |
| getErrorHandler | back to summary |
|---|---|
| public ErrorHandler getErrorHandler() Gets the currently configured ErrorHandler (always non- | |
| getForeignKeyIndex | back to summary |
|---|---|
| public Index getForeignKeyIndex(Table otherTable) Redeclares io. Doc from io. Returns the foreign key index joining this table to the given other table.
| |
| getIndex | back to summary |
|---|---|
| public Index getIndex(String name) Redeclares io. Doc from io. Returns the index with the given name.
| |
| getIndexes | back to summary |
|---|---|
| public List Redeclares io. Doc from io. Returns all of the Indexes on this table (unmodifiable List). | |
| getName | back to summary |
|---|---|
| public String getName() Redeclares io. Doc from io. Returns the name of the table. | |
| getNextRow | back to summary |
|---|---|
| public Row getNextRow() throws IOException Returns the next row in this table (Column name -> Column value) (uses the
| |
| getPrimaryKeyIndex | back to summary |
|---|---|
| public Index getPrimaryKeyIndex() Redeclares io. Doc from io. Returns the primary key index for this table.
| |
| getProperties | back to summary |
|---|---|
| public PropertyMap getProperties() throws IOException Redeclares io. Doc from io. Returns the properties for this table.
| |
| getRowCount | back to summary |
|---|---|
| public int getRowCount() Returns the number of rows currently stored in this table.
| |
| getUpdatedDate | back to summary |
|---|---|
| public LocalDateTime getUpdatedDate() throws IOException Redeclares io. Note jackcess does not automatically update the modified date of a Table.
| |
| isAllowAutoNumberInsert | back to summary |
|---|---|
| public boolean isAllowAutoNumberInsert() Gets the currently configured auto number insert policy.
| |
| isHidden | back to summary |
|---|---|
| public boolean isHidden() Redeclares io. Whether or not this table has been marked as hidden.
| |
| isSystem | back to summary |
|---|---|
| public boolean isSystem() Redeclares io. Whether or not this table is a system (internal) table.
| |
| iterator | back to summary |
|---|---|
| public Iterator Redeclares java. Calls
For more advanced iteration, use the
| |
| newBlob | back to summary |
|---|---|
| public default OleBlob. Convenience method for constructing a new OleBlob.Builder. | |
| newCursor | back to summary |
|---|---|
| public CursorBuilder newCursor() Convenience method for constructing a new CursorBuilder for this Table. | |
| reset | back to summary |
|---|---|
| public void reset() After calling this method, | |
| setAllowAutoNumberInsert | back to summary |
|---|---|
| public void setAllowAutoNumberInsert(Boolean allowAutoNumInsert) Sets the new auto number insert policy for the Table. If | |
| setErrorHandler | back to summary |
|---|---|
| public void setErrorHandler(ErrorHandler newErrorHandler) Sets a new ErrorHandler. If | |
| stream | back to summary |
|---|---|
| public default Stream Returns a Stream using the default Iterator. | |
| updateRow | back to summary |
|---|---|
| public Row updateRow(Row row) throws IOException Update the given row. Provided Row must have previously been returned from this Table.
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final Table. | DATA
columns are ordered based on the order of the data in the table (this order does not change as columns are added to the table). |
| public static final Table. | DISPLAY
columns are ordered based on the "display" order (this order can be changed arbitrarily) |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static Table. | |
| public static Table. |
| DATA | back to summary |
|---|---|
| public static final Table. columns are ordered based on the order of the data in the table (this order does not change as columns are added to the table). | |
| DISPLAY | back to summary |
|---|---|
| public static final Table. columns are ordered based on the "display" order (this order can be changed arbitrarily) | |
| ColumnOrder | back to summary |
|---|---|
| private ColumnOrder() | |
| valueOf | back to summary |
|---|---|
| public static Table. | |
| values | back to summary |
|---|---|
| public static Table. | |