APIdia Launch Partner
Top Fields Constructors Methods
net.ucanaccess.converters

public Class UcanaccessTable

extends Object
implements Table
Class Inheritance
All Implemented Interfaces
io.github.spannm.jackcess.Table, io.github.spannm.jackcess.TableDefinition, java.lang.Iterable
Imports
io.github.spannm.jackcess.*, io.github.spannm.jackcess.impl.TableImpl, .TableImpl.RowState, io.github.spannm.jackcess.util.ErrorHandler, java.io.IOException, java.time.LocalDateTime, java.util.Iterator, .List, .Map

Field Summary

Modifier and TypeField and Description
private final String
private final Table

Constructor Summary

AccessConstructor and Description
public
UcanaccessTable(Table table, String tableName)

Method Summary

Modifier and TypeMethod and Description
public Object[]
addRow(Object... row)

Implements io.github.spannm.jackcess.Table.addRow.

Adds a single row to this table and writes it to disk.

public <M extends Map<String, Object>> M
addRowFromMap(M row)

Implements io.github.spannm.jackcess.Table.addRowFromMap.

Calls asRow on the given row map and passes the result to addRow.

public List<? extends Object[]>
addRows(List<? extends Object[]> rows)

Implements io.github.spannm.jackcess.Table.addRows.

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<String, Object>> List<M>
addRowsFromMaps(List<M> rows)

Implements io.github.spannm.jackcess.Table.addRowsFromMaps.

Calls asRow on the given row maps and passes the results to addRows.

public Object[]
asRow(Map<String, ?> rowMap)

Implements io.github.spannm.jackcess.Table.asRow.

Converts a map of columnName -> columnValue to an array of row values appropriate for a call to addRow(Object...).

public Object[]
asUpdateRow(Map<String, ?> rowMap)

Implements io.github.spannm.jackcess.Table.asUpdateRow.

Converts a map of columnName -> columnValue to an array of row values appropriate for a call to Cursor#updateCurrentRow(Object...).

public TableImpl.RowState
public Row
deleteRow(Row row)

Implements io.github.spannm.jackcess.Table.deleteRow.

Delete the given row.

public Column
getColumn(String name)

Implements io.github.spannm.jackcess.Table.getColumn.

Returns the column with the given name.

public int
getColumnCount()

Implements io.github.spannm.jackcess.Table.getColumnCount.

Returns the number of columns in this table.

public List<? extends Column>
getColumns()

Implements io.github.spannm.jackcess.Table.getColumns.

Returns all of the columns in this table (unmodifiable List).

public LocalDateTime
getCreatedDate()

Implements io.github.spannm.jackcess.Table.getCreatedDate.

Returns the created date for this table if available.

public Database
getDatabase()

Implements io.github.spannm.jackcess.Table.getDatabase.

Returns the database to which this table belongs.

public Cursor
getDefaultCursor()

Implements io.github.spannm.jackcess.Table.getDefaultCursor.

Returns a simple Cursor, initialized on demand and held by this table.

public ErrorHandler
getErrorHandler()

Implements io.github.spannm.jackcess.Table.getErrorHandler.

Gets the currently configured ErrorHandler (always non-null).

public Index
getForeignKeyIndex(Table otherTable)

Implements io.github.spannm.jackcess.Table.getForeignKeyIndex.

Returns the foreign key index joining this table to the given other table.

public Index
getIndex(String name)

Implements io.github.spannm.jackcess.Table.getIndex.

Returns the index with the given name.

public List<? extends Index>
getIndexes()

Implements io.github.spannm.jackcess.Table.getIndexes.

Returns all of the Indexes on this table (unmodifiable List).

public String
getName()

Implements io.github.spannm.jackcess.Table.getName.

Returns the name of the table.

public Row
getNextRow()

Implements io.github.spannm.jackcess.Table.getNextRow.

Returns the next row in this table (Column name -> Column value) (uses the default cursor).

public Index
getPrimaryKeyIndex()

Implements io.github.spannm.jackcess.Table.getPrimaryKeyIndex.

Returns the primary key index for this table.

public PropertyMap
getProperties()

Implements io.github.spannm.jackcess.Table.getProperties.

Returns the properties for this table.

public int
getRowCount()

Implements io.github.spannm.jackcess.Table.getRowCount.

Returns the number of rows currently stored in this table.

public LocalDateTime
getUpdatedDate()

Implements io.github.spannm.jackcess.Table.getUpdatedDate.

Note

jackcess does not automatically update the modified date of a Table.

public boolean
isAllowAutoNumberInsert()

Implements io.github.spannm.jackcess.Table.isAllowAutoNumberInsert.

Gets the currently configured auto number insert policy.

public boolean
isHidden()

Implements io.github.spannm.jackcess.Table.isHidden.

Whether or not this table has been marked as hidden.

public boolean
isSystem()

Implements io.github.spannm.jackcess.Table.isSystem.

Whether or not this table is a system (internal) table.

public Iterator<Row>
iterator()

Implements io.github.spannm.jackcess.Table.iterator.

Calls reset on this table and returns a modifiable Iterator which will iterate through all the rows of this table.

public CursorBuilder
newCursor()

Implements io.github.spannm.jackcess.Table.newCursor.

Convenience method for constructing a new CursorBuilder for this Table.

public void
reset()

Implements io.github.spannm.jackcess.Table.reset.

After calling this method, getNextRow will return the first row in the table, see Cursor#reset (uses the default cursor).

public void
setAllowAutoNumberInsert(Boolean arg0)

Implements io.github.spannm.jackcess.Table.setAllowAutoNumberInsert.

Sets the new auto number insert policy for the Table.

public void
setErrorHandler(ErrorHandler newErrorHandler)

Implements io.github.spannm.jackcess.Table.setErrorHandler.

Sets a new ErrorHandler.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public Row
updateRow(Row row)

Implements io.github.spannm.jackcess.Table.updateRow.

Update the given row.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

tableNameback to summary
private final String tableName
wrappedback to summary
private final Table wrapped

Constructor Detail

UcanaccessTableback to summary
public UcanaccessTable(Table table, String tableName)

Method Detail

addRowback to summary
public Object[] addRow(Object... row) throws IOException

Implements io.github.spannm.jackcess.Table.addRow.

Doc from io.github.spannm.jackcess.Table.addRow.

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 getColumns method. This is by default the storage order of the Columns in the database, however this order can be influenced by setting the ColumnOrder via Database#setColumnOrder prior to opening the Table. The asRow method can be used to easily convert a row Map into the appropriate row array for this Table.

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).

Annotations
@Override
addRowFromMapback to summary
public <M extends Map<String, Object>> M addRowFromMap(M row) throws IOException

Implements io.github.spannm.jackcess.Table.addRowFromMap.

Doc from io.github.spannm.jackcess.Table.addRowFromMap.

Calls asRow on the given row map and passes the result to addRow.

Note, if this table has an auto-number column, the value generated will be put back into the given row map.

Annotations
@Override
addRowsback to summary
public List<? extends Object[]> addRows(List<? extends Object[]> rows) throws IOException

Implements io.github.spannm.jackcess.Table.addRows.

Doc from io.github.spannm.jackcess.Table.addRows.

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 addRow multiple times.

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 BatchUpdateException which gives useful information in the case of a partially successful write.

Annotations
@Override
addRowsFromMapsback to summary
public <M extends Map<String, Object>> List<M> addRowsFromMaps(List<M> rows) throws IOException

Implements io.github.spannm.jackcess.Table.addRowsFromMaps.

Doc from io.github.spannm.jackcess.Table.addRowsFromMaps.

Calls asRow on the given row maps and passes the results to addRows.

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 BatchUpdateException which gives useful information in the case of a partially successful write.

Annotations
@Override
asRowback to summary
public Object[] asRow(Map<String, ?> rowMap)

Implements io.github.spannm.jackcess.Table.asRow.

Doc from io.github.spannm.jackcess.Table.asRow.

Converts a map of columnName -> columnValue to an array of row values appropriate for a call to addRow(Object...).

Annotations
@Override
asUpdateRowback to summary
public Object[] asUpdateRow(Map<String, ?> rowMap)

Implements io.github.spannm.jackcess.Table.asUpdateRow.

Doc from io.github.spannm.jackcess.Table.asUpdateRow.

Converts a map of columnName -> columnValue to an array of row values appropriate for a call to Cursor#updateCurrentRow(Object...).

Annotations
@Override
createRowStateback to summary
public TableImpl.RowState createRowState()
deleteRowback to summary
public Row deleteRow(Row row) throws IOException

Implements io.github.spannm.jackcess.Table.deleteRow.

Doc from io.github.spannm.jackcess.Table.deleteRow.

Delete the given row. Provided Row must have previously been returned from this Table.

Annotations
@Override
getColumnback to summary
public Column getColumn(String name)

Implements io.github.spannm.jackcess.Table.getColumn.

Doc from io.github.spannm.jackcess.TableDefinition.getColumn.

Returns the column with the given name.

Annotations
@Override
getColumnCountback to summary
public int getColumnCount()

Implements io.github.spannm.jackcess.Table.getColumnCount.

Doc from io.github.spannm.jackcess.TableDefinition.getColumnCount.

Returns the number of columns in this table.

Annotations
@Override
getColumnsback to summary
public List<? extends Column> getColumns()

Implements io.github.spannm.jackcess.Table.getColumns.

Doc from io.github.spannm.jackcess.TableDefinition.getColumns.

Returns all of the columns in this table (unmodifiable List).

Annotations
@Override
getCreatedDateback to summary
public LocalDateTime getCreatedDate() throws IOException

Implements io.github.spannm.jackcess.Table.getCreatedDate.

Doc from io.github.spannm.jackcess.TableDefinition.getCreatedDate.

Returns the created date for this table if available.

Annotations
@Override
getDatabaseback to summary
public Database getDatabase()

Implements io.github.spannm.jackcess.Table.getDatabase.

Doc from io.github.spannm.jackcess.TableDefinition.getDatabase.

Returns the database to which this table belongs.

Annotations
@Override
getDefaultCursorback to summary
public Cursor getDefaultCursor()

Implements io.github.spannm.jackcess.Table.getDefaultCursor.

Doc from io.github.spannm.jackcess.Table.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.

Annotations
@Override
getErrorHandlerback to summary
public ErrorHandler getErrorHandler()

Implements io.github.spannm.jackcess.Table.getErrorHandler.

Doc from io.github.spannm.jackcess.Table.getErrorHandler.

Gets the currently configured ErrorHandler (always non-null). This will be used to handle all errors unless overridden at the Cursor level.

Annotations
@Override
getForeignKeyIndexback to summary
public Index getForeignKeyIndex(Table otherTable)

Implements io.github.spannm.jackcess.Table.getForeignKeyIndex.

Doc from io.github.spannm.jackcess.TableDefinition.getForeignKeyIndex.

Returns the foreign key index joining this table to the given other table.

Annotations
@Override
getIndexback to summary
public Index getIndex(String name)

Implements io.github.spannm.jackcess.Table.getIndex.

Doc from io.github.spannm.jackcess.TableDefinition.getIndex.

Returns the index with the given name.

Annotations
@Override
getIndexesback to summary
public List<? extends Index> getIndexes()

Implements io.github.spannm.jackcess.Table.getIndexes.

Doc from io.github.spannm.jackcess.TableDefinition.getIndexes.

Returns all of the Indexes on this table (unmodifiable List).

Annotations
@Override
getNameback to summary
public String getName()

Implements io.github.spannm.jackcess.Table.getName.

Doc from io.github.spannm.jackcess.TableDefinition.getName.

Returns the name of the table.

Annotations
@Override
getNextRowback to summary
public Row getNextRow() throws IOException

Implements io.github.spannm.jackcess.Table.getNextRow.

Doc from io.github.spannm.jackcess.Table.getNextRow.

Returns the next row in this table (Column name -> Column value) (uses the default cursor).

Annotations
@Override
getPrimaryKeyIndexback to summary
public Index getPrimaryKeyIndex()

Implements io.github.spannm.jackcess.Table.getPrimaryKeyIndex.

Doc from io.github.spannm.jackcess.TableDefinition.getPrimaryKeyIndex.

Returns the primary key index for this table.

Annotations
@Override
getPropertiesback to summary
public PropertyMap getProperties() throws IOException

Implements io.github.spannm.jackcess.Table.getProperties.

Doc from io.github.spannm.jackcess.TableDefinition.getProperties.

Returns the properties for this table.

Annotations
@Override
getRowCountback to summary
public int getRowCount()

Implements io.github.spannm.jackcess.Table.getRowCount.

Doc from io.github.spannm.jackcess.Table.getRowCount.

Returns the number of rows currently stored in this table.

Annotations
@Override
getUpdatedDateback to summary
public LocalDateTime getUpdatedDate() throws IOException

Implements io.github.spannm.jackcess.Table.getUpdatedDate.

Doc from io.github.spannm.jackcess.Table.getUpdatedDate.

Note

jackcess does not automatically update the modified date of a Table.

Annotations
@Override
isAllowAutoNumberInsertback to summary
public boolean isAllowAutoNumberInsert()

Implements io.github.spannm.jackcess.Table.isAllowAutoNumberInsert.

Doc from io.github.spannm.jackcess.Table.isAllowAutoNumberInsert.

Gets the currently configured auto number insert policy.

Annotations
@Override
isHiddenback to summary
public boolean isHidden()

Implements io.github.spannm.jackcess.Table.isHidden.

Doc from io.github.spannm.jackcess.Table.isHidden.

Whether or not this table has been marked as hidden.

Annotations
@Override
isSystemback to summary
public boolean isSystem()

Implements io.github.spannm.jackcess.Table.isSystem.

Doc from io.github.spannm.jackcess.Table.isSystem.

Whether or not this table is a system (internal) table.

Annotations
@Override
iteratorback to summary
public Iterator<Row> iterator()

Implements io.github.spannm.jackcess.Table.iterator.

Doc from io.github.spannm.jackcess.Table.iterator.

Calls reset on this table and returns a modifiable Iterator which will iterate through all the rows of this table. Use of the Iterator follows the same restrictions as a call to getNextRow.

For more advanced iteration, use the default cursor directly.

Annotations
@Override
newCursorback to summary
public CursorBuilder newCursor()

Implements io.github.spannm.jackcess.Table.newCursor.

Doc from io.github.spannm.jackcess.Table.newCursor.

Convenience method for constructing a new CursorBuilder for this Table.

Annotations
@Override
resetback to summary
public void reset()

Implements io.github.spannm.jackcess.Table.reset.

Doc from io.github.spannm.jackcess.Table.reset.

After calling this method, getNextRow will return the first row in the table, see Cursor#reset (uses the default cursor).

Annotations
@Override
setAllowAutoNumberInsertback to summary
public void setAllowAutoNumberInsert(Boolean arg0)

Implements io.github.spannm.jackcess.Table.setAllowAutoNumberInsert.

Doc from io.github.spannm.jackcess.Table.setAllowAutoNumberInsert.

Sets the new auto number insert policy for the Table. If null, resets to using the policy configured at the Database level.

Annotations
@Override
setErrorHandlerback to summary
public void setErrorHandler(ErrorHandler newErrorHandler)

Implements io.github.spannm.jackcess.Table.setErrorHandler.

Doc from io.github.spannm.jackcess.Table.setErrorHandler.

Sets a new ErrorHandler. If null, resets to using the ErrorHandler configured at the Database level.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override
updateRowback to summary
public Row updateRow(Row row) throws IOException

Implements io.github.spannm.jackcess.Table.updateRow.

Doc from io.github.spannm.jackcess.Table.updateRow.

Update the given row. Provided Row must have previously been returned from this Table.

Annotations
@Override