Package com.mckoi.database
Class GTCurrentConnectionsDataSource
- java.lang.Object
-
- com.mckoi.database.GTDataSource
-
- com.mckoi.database.GTCurrentConnectionsDataSource
-
- All Implemented Interfaces:
MutableTableDataSource
,TableDataSource
final class GTCurrentConnectionsDataSource extends GTDataSource
An implementation of MutableTableDataSource that presents the current list of connections on the database.NOTE: This is not designed to be a long kept object. It must not last beyond the lifetime of a transaction.
-
-
Field Summary
Fields Modifier and Type Field Description private DatabaseConnection
database
The DatabaseConnection object that this is table is modelling the information within.(package private) static DataTableDef
DEF_DATA_TABLE_DEF
The data table def that describes this table of data source.private java.util.ArrayList
key_value_pairs
The list of info keys/values in this object.
-
Constructor Summary
Constructors Constructor Description GTCurrentConnectionsDataSource(DatabaseConnection connection)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
Disposes this table data source.TObject
getCellContents(int column, int row)
Returns an object that represents the information in the given cell in the table.DataTableDef
getDataTableDef()
Returns a DataTableDef object that defines the layout of the table that this data is in.int
getRowCount()
Returns the number of rows in this data source.GTCurrentConnectionsDataSource
init()
Initialize the data source.-
Methods inherited from class com.mckoi.database.GTDataSource
addRootLock, addRow, booleanColumn, columnValue, constraintIntegrityCheck, dateColumn, flushIndexChanges, getColumnScheme, getJournal, getSystem, numericColumn, removeRootLock, removeRow, rowEnumeration, stringColumn, updateRow
-
-
-
-
Field Detail
-
database
private DatabaseConnection database
The DatabaseConnection object that this is table is modelling the information within.
-
key_value_pairs
private java.util.ArrayList key_value_pairs
The list of info keys/values in this object.
-
DEF_DATA_TABLE_DEF
static final DataTableDef DEF_DATA_TABLE_DEF
The data table def that describes this table of data source.
-
-
Constructor Detail
-
GTCurrentConnectionsDataSource
public GTCurrentConnectionsDataSource(DatabaseConnection connection)
Constructor.
-
-
Method Detail
-
init
public GTCurrentConnectionsDataSource init()
Initialize the data source.
-
getDataTableDef
public DataTableDef getDataTableDef()
Description copied from interface:TableDataSource
Returns a DataTableDef object that defines the layout of the table that this data is in.This may return 'null' if there is no table definition.
- Specified by:
getDataTableDef
in interfaceTableDataSource
- Specified by:
getDataTableDef
in classGTDataSource
-
getRowCount
public int getRowCount()
Description copied from interface:TableDataSource
Returns the number of rows in this data source.NOTE: Returns 'n' - getCellContents(column, row) is not necessarily valid for row = [0..n]. Use 'rowEnumerator' to generate an iterator for valid row values over this data source.
- Specified by:
getRowCount
in interfaceTableDataSource
- Specified by:
getRowCount
in classGTDataSource
-
getCellContents
public TObject getCellContents(int column, int row)
Description copied from interface:TableDataSource
Returns an object that represents the information in the given cell in the table. This may be an expensive operation, so calls to it should be kept to a minimum. Note that the offset between two rows is not necessarily 1. Use 'rowEnumeration' to create a row iterator.- Specified by:
getCellContents
in interfaceTableDataSource
- Specified by:
getCellContents
in classGTDataSource
-
dispose
public void dispose()
Description copied from interface:MutableTableDataSource
Disposes this table data source. After this method is called, most use of this object is undefined, except for the 'getCellContent' and 'compareCellContent' methods which are valid provided the source is under a root lock.- Specified by:
dispose
in interfaceMutableTableDataSource
- Overrides:
dispose
in classGTDataSource
-
-