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

public Class UpdateCommand

extends AbstractCursorCommand
Class Inheritance
Imports
io.github.spannm.jackcess.Column, .Cursor, .DataType, .Table, .Table.ColumnOrder, io.github.spannm.jackcess.complex.ComplexValueForeignKey, net.ucanaccess.complex.Attachment, .SingleValue, .Version, net.ucanaccess.converters.Persist2Jet, net.ucanaccess.exception.UcanaccessSQLException, net.ucanaccess.util.Try, java.io.IOException, java.lang.System.Logger, .System.Logger.Level, java.sql.SQLException, java.time.LocalDateTime, .ZoneId, java.util.ArrayList, .List, .Map

Field Summary

Modifier and TypeField and Description
private List<Column>
private final String
private final IndexSelector
private boolean
private static final System.Logger
private final Object[]
private final Map<String, Object>
private final Table
private final List<? extends Column>

Constructor Summary

AccessConstructor and Description
public
UpdateCommand(Table table, Map<String, Object> rowPattern, Object[] modifiedRow, String execId)

Method Summary

Modifier and TypeMethod and Description
private void
checkBlob(Object[] newRow2)

public String
getExecId()

Implements net.ucanaccess.commands.ICommand.getExecId.

Returns the unique execution identifier.

public IndexSelector
getIndexSelector()

Implements net.ucanaccess.commands.ICursorCommand.getIndexSelector.

Returns the IndexSelector used to obtain the appropriate cursor for this command.

public Map<String, Object>
getRowPattern()

Implements net.ucanaccess.commands.ICursorCommand.getRowPattern.

Returns the pattern of column names and values used to identify the target row.

public String
getTableName()

Implements net.ucanaccess.commands.ICommand.getTableName.

Returns the name of the table affected by this command.

public ICommand.CommandType
getType()

Implements net.ucanaccess.commands.ICommand.getType.

Returns the type of this command.

public IFeedbackAction
persist()

Implements net.ucanaccess.commands.ICommand.persist.

Persists the changes to the underlying Access database file.

private void
public IFeedbackAction
persistCurrentRow(Cursor cur)

Implements net.ucanaccess.commands.ICursorCommand.persistCurrentRow.

Persists the command's changes to the row currently pointed to by the cursor.

public IFeedbackAction
rollback()

Implements net.ucanaccess.commands.ICommand.rollback.

Reverts the changes made by this command.

public String
toString()

Overrides net.ucanaccess.commands.AbstractCursorCommand.toString.

Returns a string representation of the object.

private void
Inherited from net.ucanaccess.commands.AbstractCursorCommand:
currentRowMatchesreplaceAutoincrement

Field Detail

blobColumnsback to summary
private List<Column> blobColumns
execIdback to summary
private final String execId
indexSelectorback to summary
private final IndexSelector indexSelector
isRollbackingback to summary
private boolean isRollbacking
LOGGERback to summary
private static final System.Logger LOGGER

Hides net.ucanaccess.commands.AbstractCursorCommand.LOGGER.

modifiedRowback to summary
private final Object[] modifiedRow
rowPatternback to summary
private final Map<String, Object> rowPattern
tableback to summary
private final Table table
tableColumnsback to summary
private final List<? extends Column> tableColumns

Constructor Detail

UpdateCommandback to summary
public UpdateCommand(Table table, Map<String, Object> rowPattern, Object[] modifiedRow, String execId)

Method Detail

checkBlobback to summary
private void checkBlob(Object[] newRow2)
getExecIdback to summary
public String getExecId()

Implements net.ucanaccess.commands.ICommand.getExecId.

Doc from net.ucanaccess.commands.ICommand.getExecId.

Returns the unique execution identifier.

Annotations
@Override
getIndexSelectorback to summary
public IndexSelector getIndexSelector()

Implements net.ucanaccess.commands.ICursorCommand.getIndexSelector.

Doc from net.ucanaccess.commands.ICursorCommand.getIndexSelector.

Returns the IndexSelector used to obtain the appropriate cursor for this command.

Annotations
@Override
getRowPatternback to summary
public Map<String, Object> getRowPattern()

Implements net.ucanaccess.commands.ICursorCommand.getRowPattern.

Doc from net.ucanaccess.commands.ICursorCommand.getRowPattern.

Returns the pattern of column names and values used to identify the target row.

Annotations
@Override
getTableNameback to summary
public String getTableName()

Implements net.ucanaccess.commands.ICommand.getTableName.

Doc from net.ucanaccess.commands.ICommand.getTableName.

Returns the name of the table affected by this command.

Annotations
@Override
getTypeback to summary
public ICommand.CommandType getType()

Implements net.ucanaccess.commands.ICommand.getType.

Doc from net.ucanaccess.commands.ICommand.getType.

Returns the type of this command.

Annotations
@Override
persistback to summary
public IFeedbackAction persist() throws SQLException

Implements net.ucanaccess.commands.ICommand.persist.

Doc from net.ucanaccess.commands.ICommand.persist.

Persists the changes to the underlying Access database file.

Annotations
@Override
Exceptions
SQLException:
if a database error occurs during persistence
persistback to summary
private void persist(Cursor cur) throws IOException
persistCurrentRowback to summary
public IFeedbackAction persistCurrentRow(Cursor cur) throws IOException

Implements net.ucanaccess.commands.ICursorCommand.persistCurrentRow.

Doc from net.ucanaccess.commands.ICursorCommand.persistCurrentRow.

Persists the command's changes to the row currently pointed to by the cursor.

This is typically used by CompositeCommand to perform batch-like updates while iterating over a table.

Annotations
@Override
Exceptions
IOException:
if an I/O error occurs during the Jackcess operation
rollbackback to summary
public IFeedbackAction rollback() throws SQLException

Implements net.ucanaccess.commands.ICommand.rollback.

Doc from net.ucanaccess.commands.ICommand.rollback.

Reverts the changes made by this command.

Annotations
@Override
Exceptions
SQLException:
if a database error occurs during rollback
toStringback to summary
public String toString()

Overrides net.ucanaccess.commands.AbstractCursorCommand.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
updateComplexback to summary
private void updateComplex(Cursor cur) throws IOException