Package com.mckoi.database.jdbcserver
Class AbstractJDBCDatabaseInterface.ResultSetInfo
- java.lang.Object
-
- com.mckoi.database.jdbcserver.AbstractJDBCDatabaseInterface.ResultSetInfo
-
- Enclosing class:
- AbstractJDBCDatabaseInterface
private static final class AbstractJDBCDatabaseInterface.ResultSetInfo extends java.lang.ObjectWhenever a ResultSet is generated, this object contains the result set. This class only allows calls to safe methods in Table.NOTE: This is safe provided, a) The column topology doesn't change (NOTE: issues with ALTER command) b) Root locking prevents modification to rows.
-
-
Field Summary
Fields Modifier and Type Field Description private ColumnDescription[]col_descA set of ColumnDescription that describes each column in the ResultSet.private intlockedIncremented when we lock roots.private SQLQueryqueryThe SQLQuery that was executed to produce this result.private TableresultThe table that is the result.private booleanresult_is_simple_enumSet to true if the result table has a SimpleRowEnumeration, therefore guarenteeing we do not need to store a row lookup list.private intresult_row_countThe number of rows in the result.private IntegerVectorrow_index_mapIntegerVector that contains the row index into the table for each row of the result.private java.util.HashMapstreamable_blob_mapA HashMap of blob_reference_id values to Ref objects used to handle and streamable objects in this result.
-
Constructor Summary
Constructors Constructor Description ResultSetInfo(SQLQuery query, Table table)Constructs the result set.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voiddispose()Disposes this object.(package private) TObjectgetCellContents(int column, int row)Gets the cell contents of the cell at the given row/column.(package private) intgetColumnCount()Returns the column count.(package private) ColumnDescription[]getFields()Returns the ColumnDescription array of all the columns in the result.(package private) RefgetRef(long id)Returns a Ref that has been cached in this table object by its identifier value.(package private) intgetRowCount()Returns the row count.(package private) SQLQuerygetSQLQuery()Returns the SQLQuery that was used to produce this result.(package private) voidlockRoot(int key)Locks the root of the result set.(package private) voidremoveRef(long id)Removes a Ref that has been cached in this table object by its identifier value.(package private) voidunlockRoot(int key)Unlocks the root of the result set.
-
-
-
Field Detail
-
query
private SQLQuery query
The SQLQuery that was executed to produce this result.
-
result
private Table result
The table that is the result.
-
col_desc
private ColumnDescription[] col_desc
A set of ColumnDescription that describes each column in the ResultSet.
-
row_index_map
private IntegerVector row_index_map
IntegerVector that contains the row index into the table for each row of the result. For example, row.intAt(5) will return the row index of 'result' of the 5th row item.
-
result_is_simple_enum
private boolean result_is_simple_enum
Set to true if the result table has a SimpleRowEnumeration, therefore guarenteeing we do not need to store a row lookup list.
-
result_row_count
private int result_row_count
The number of rows in the result.
-
locked
private int locked
Incremented when we lock roots.
-
streamable_blob_map
private java.util.HashMap streamable_blob_map
A HashMap of blob_reference_id values to Ref objects used to handle and streamable objects in this result.
-
-
Method Detail
-
getSQLQuery
SQLQuery getSQLQuery()
Returns the SQLQuery that was used to produce this result.
-
getRef
Ref getRef(long id)
Returns a Ref that has been cached in this table object by its identifier value.
-
removeRef
void removeRef(long id)
Removes a Ref that has been cached in this table object by its identifier value.
-
dispose
void dispose()
Disposes this object.
-
getCellContents
TObject getCellContents(int column, int row)
Gets the cell contents of the cell at the given row/column.Safe only if roots are locked.
-
getColumnCount
int getColumnCount()
Returns the column count.
-
getRowCount
int getRowCount()
Returns the row count.
-
getFields
ColumnDescription[] getFields()
Returns the ColumnDescription array of all the columns in the result.
-
lockRoot
void lockRoot(int key)
Locks the root of the result set.
-
unlockRoot
void unlockRoot(int key)
Unlocks the root of the result set.
-
-