Package com.mckoi.database
Class TableAccessState
- java.lang.Object
-
- com.mckoi.database.TableAccessState
-
public final class TableAccessState extends java.lang.Object
This class provides very limited access to a Table object. The purpose of this object is to define the functionality of a table when the root table(s) are locked via the 'Table.lockRoot(int)' method, and when the Table is no longer READ or WRITE locked via the 'LockingMechanism' system. During these conditions, the table is in a semi-volatile state, so this class provides a safe way to access the table without having to worry about using some functionality of Table which isn't supported at this time.- Author:
- Tobias Downer
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TObject
getCellContents(int column, int row)
Returns the cell at the given row/column coordinates in the table.DataTableDef
getDataTableDef()
Returns the DataTableDef object that contains information on the columns of the table.Variable
getResolvedVariable(int column)
Returns the TableName of the given column of this table.void
lockRoot(int key)
Locks the root rows of the table.void
unlockRoot(int key)
Unlocks the root rows of the table.
-
-
-
Method Detail
-
getCellContents
public TObject getCellContents(int column, int row)
Returns the cell at the given row/column coordinates in the table. This method is valid because it doesn't use any of the SelectableScheme information in any of its parent tables which could change at any time when there is no READ or WRITE lock on the table.
-
getDataTableDef
public DataTableDef getDataTableDef()
Returns the DataTableDef object that contains information on the columns of the table.
-
getResolvedVariable
public Variable getResolvedVariable(int column)
Returns the TableName of the given column of this table. This, together with 'getDataTableDef' is used to find the fully qualified name of a column of the table.
-
lockRoot
public void lockRoot(int key)
Locks the root rows of the table. This method is a bit of a HACK - why should the contract include being able to lock the root rows? This method only permits the roots to be locked once.
-
unlockRoot
public void unlockRoot(int key)
Unlocks the root rows of the table.
-
-