|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mckoi.database.Table
com.mckoi.database.CompositeTable
public class CompositeTable
A composite of two or more datasets used to implement UNION, INTERSECTION, and DIFFERENCE.
Field Summary | |
---|---|
static int |
EXCEPT
The composite function for finding the difference of the tables. |
static int |
INTERSECT
The composite function for finding the interestion of the tables. |
static int |
UNION
The composite function for finding the union of the tables. |
Fields inherited from class com.mckoi.database.Table |
---|
DEBUG_QUERY |
Constructor Summary | |
---|---|
CompositeTable(Table[] composite_list)
Consturcts the composite table assuming the first item in the list is the master table. |
|
CompositeTable(Table master_table,
Table[] composite_list)
Constructs the composite table given the 'master_table' (the field structure this composite dataset is based on), and a list of tables to be the composite of this table. |
Method Summary | |
---|---|
int |
findFieldName(Variable v)
Given a fully qualified variable field name, ie. |
TObject |
getCellContents(int column,
int row)
Returns an object that represents the information in the given cell in the table. |
int |
getColumnCount()
Returns the number of columns in the table. |
Database |
getDatabase()
Returns the Database object that this table is derived from. |
DataTableDef |
getDataTableDef()
Returns a DataTableDef object that defines the name of the table and the layout of the columns of the table. |
Variable |
getResolvedVariable(int column)
Returns a fully qualified Variable object that represents the name of the column at the given index. |
int |
getRowCount()
Returns the number of rows stored in the table. |
boolean |
hasRootsLocked()
Returns true if the table has its row roots locked (via the lockRoot(int) method. |
void |
lockRoot(int lock_key)
Locks the root table(s) of this table so that it is impossible to overwrite the underlying rows that may appear in this table. |
RowEnumeration |
rowEnumeration()
Returns an Enumeration of the rows in this table. |
void |
setupIndexesForCompositeFunction(int function,
boolean all)
Sets up the indexes in this composite table by performing for composite function on the tables. |
boolean |
typeEquals(RootTable table)
This is function is used to check that two root tables are identical. |
void |
unlockRoot(int lock_key)
Unlocks the root tables so that the underlying rows may once again be used if they are not locked and have been removed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static int UNION
public static int INTERSECT
public static int EXCEPT
Constructor Detail |
---|
public CompositeTable(Table master_table, Table[] composite_list)
NOTE: This does not set up table indexes for a composite function.
public CompositeTable(Table[] composite_list)
Method Detail |
---|
public void setupIndexesForCompositeFunction(int function, boolean all)
public Database getDatabase()
Table
getDatabase
in class Table
public int getColumnCount()
Table
getColumnCount
in class Table
public int getRowCount()
Table
getRowCount
in interface TableDataSource
getRowCount
in class Table
public int findFieldName(Variable v)
Table
findFieldName
in class Table
public DataTableDef getDataTableDef()
Table
getDataTableDef
in interface TableDataSource
getDataTableDef
in class Table
public Variable getResolvedVariable(int column)
Table
getResolvedVariable
in class Table
public TObject getCellContents(int column, int row)
Table
getCellContents
in interface TableDataSource
getCellContents
in class Table
public RowEnumeration rowEnumeration()
Table
If you want the rows to be returned by a specific column order then use the 'selectxxx' methods.
rowEnumeration
in interface TableDataSource
rowEnumeration
in class Table
public void lockRoot(int lock_key)
Table
lockRoot
in class Table
public void unlockRoot(int lock_key)
Table
unlockRoot
in class Table
public boolean hasRootsLocked()
Table
hasRootsLocked
in class Table
public boolean typeEquals(RootTable table)
RootTable
typeEquals
in interface RootTable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |