APIdia Launch Partner
Top Description Methods
net.ucanaccess.commands

public Interface ICursorCommand

extends ICommand
Known Direct Implementers
net.ucanaccess.commands.AbstractCursorCommand
Imports
io.github.spannm.jackcess.Cursor, java.io.IOException, java.util.Map

Extension of ICommand for commands that require a Jackcess Cursor to identify or manipulate records.

This interface provides methods to match patterns against the current database state and to persist changes specifically at the current cursor position.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if the row matches the pattern, false otherwise
currentRowMatches
(Cursor
the active database cursor
cur
,
Map<String, Object>
the data of the row to compare
currentRow
)

Verifies if the current row at the cursor position matches the provided data pattern.

public IndexSelector

Returns:

the index selector
getIndexSelector
()

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

public Map<String, Object>

Returns:

the row pattern map
getRowPattern
()

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

public IFeedbackAction

Returns:

a feedback action to be executed after persistence
persistCurrentRow
(Cursor
the cursor positioned at the target row
cur
)

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

Inherited from net.ucanaccess.commands.ICommand:
getExecIdgetTableNamegetTypepersistrollbacktoIdentString

Method Detail

currentRowMatchesback to summary
public boolean currentRowMatches(Cursor cur, Map<String, Object> currentRow)

Verifies if the current row at the cursor position matches the provided data pattern.

Parameters
cur:Cursor

the active database cursor

currentRow:Map<String, Object>

the data of the row to compare

Returns:boolean

true if the row matches the pattern, false otherwise

getIndexSelectorback to summary
public IndexSelector getIndexSelector()

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

Returns:IndexSelector

the index selector

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

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

Returns:Map<String, Object>

the row pattern map

persistCurrentRowback to summary
public IFeedbackAction persistCurrentRow(Cursor cur) throws IOException

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.

Parameters
cur:Cursor

the cursor positioned at the target row

Returns:IFeedbackAction

a feedback action to be executed after persistence

Exceptions
IOException:
if an I/O error occurs during the Jackcess operation