Package com.mckoi.database
Class TableCommitModificationEvent
- java.lang.Object
-
- com.mckoi.database.TableCommitModificationEvent
-
public class TableCommitModificationEvent extends java.lang.Object
An object that encapsulates all row modification information about a table when a change to the table is about to be committed. The object provides information about what rows in the table were changed (inserted/updated/deleted).
-
-
Field Summary
Fields Modifier and Type Field Description private int[]
added_rows
A normalized list of all rows that were added by the transaction being committed.private int[]
removed_rows
A normalized list of all rows that were removed by the transaction being committed.private TableName
table_name
The name of the table that is being changed.private SimpleTransaction
transaction
A SimpleTransaction that can be used to query tables in the database - the view of which will be the view when the transaction is committed.
-
Constructor Summary
Constructors Constructor Description TableCommitModificationEvent(SimpleTransaction transaction, TableName table_name, int[] added, int[] removed)
Constructs the event.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int[]
getAddedRows()
Returns the normalized list of all rows that were inserted or updated in this table of the transaction being committed.int[]
getRemovedRows()
Returns the normalized list of all rows that were deleted or updated in this table of the transaction being committed.TableName
getTableName()
Returns the name of the table.SimpleTransaction
getTransaction()
Returns the Transaction that represents the view of the database when the changes to the table have been committed.
-
-
-
Field Detail
-
transaction
private SimpleTransaction transaction
A SimpleTransaction that can be used to query tables in the database - the view of which will be the view when the transaction is committed.
-
table_name
private TableName table_name
The name of the table that is being changed.
-
added_rows
private int[] added_rows
A normalized list of all rows that were added by the transaction being committed.
-
removed_rows
private int[] removed_rows
A normalized list of all rows that were removed by the transaction being committed.
-
-
Constructor Detail
-
TableCommitModificationEvent
public TableCommitModificationEvent(SimpleTransaction transaction, TableName table_name, int[] added, int[] removed)
Constructs the event.
-
-
Method Detail
-
getTransaction
public SimpleTransaction getTransaction()
Returns the Transaction that represents the view of the database when the changes to the table have been committed.
-
getTableName
public TableName getTableName()
Returns the name of the table.
-
getAddedRows
public int[] getAddedRows()
Returns the normalized list of all rows that were inserted or updated in this table of the transaction being committed. This is a normalized list which means if a row is inserted and then deleted in the transaction then it is not considered important and does not appear in this list.
-
getRemovedRows
public int[] getRemovedRows()
Returns the normalized list of all rows that were deleted or updated in this table of the transaction being committed. This is a normalized list which means if a row is inserted and then deleted in the transaction then it is not considered important and does not appear in this list.
-
-