|
|||||||||
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.AbstractDataTable
com.mckoi.database.DefaultDataTable
com.mckoi.database.TemporaryTable
public final class TemporaryTable
This class represents a temporary table that is built from data that is not related to any underlying DataTable object from the database.
For example, an aggregate function generates data would be put into a TemporaryTable.
Field Summary |
---|
Fields inherited from class com.mckoi.database.DefaultDataTable |
---|
row_count |
Fields inherited from class com.mckoi.database.Table |
---|
DEBUG_QUERY |
Constructor Summary | |
---|---|
TemporaryTable(Database database,
java.lang.String name,
DataTableColumnDef[] fields)
The Constructor. |
|
TemporaryTable(DefaultDataTable based_on)
Constructs this TemporaryTable based on the given Table object. |
|
TemporaryTable(java.lang.String name,
Table based_on)
Constructs this TemporaryTable based on the fields from the given Table object. |
Method Summary | |
---|---|
void |
copyFrom(Table table,
int row)
Copies the contents of the row of the given Table onto the end of this table. |
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 name of the table and the layout of the columns of 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. |
void |
newRow()
Creates a new row where cells can be inserted into. |
RowEnumeration |
rowEnumeration()
Returns an Enumeration of the rows in this table. |
void |
setCellFrom(Table table,
int src_col,
int src_row,
java.lang.String to_col)
Copies the cell from the given table (src_col, src_row) to the last row of the column specified of this table. |
void |
setRowCell(TObject cell,
int column,
int row)
Sets the cell in the given column / row to the given value. |
void |
setRowCell(TObject cell,
java.lang.String col_name)
Sets the cell in the column of the last row of this table to the given TObject. |
void |
setRowObject(TObject ob,
int col_index)
Sets the cell in the column of the last row of this table to the given TObject. |
void |
setRowObject(TObject ob,
int col_index,
int row)
Sets the cell in the column of the last row of this table to the given TObject. |
void |
setRowObject(TObject ob,
java.lang.String col_name)
Sets the cell in the column of the last row of this table to the given TObject. |
void |
setupAllSelectableSchemes()
This should be called if you want to perform table operations on this TemporaryTable. |
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 com.mckoi.database.DefaultDataTable |
---|
blankSelectableSchemes, blankSelectableSchemes, clearColumnScheme, findFieldName, getColumnCount, getDatabase, getResolvedVariable, getRootColumnScheme, getRowCount |
Methods inherited from class com.mckoi.database.AbstractDataTable |
---|
getTableName, toString, typeEquals |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TemporaryTable(Database database, java.lang.String name, DataTableColumnDef[] fields)
public TemporaryTable(java.lang.String name, Table based_on)
public TemporaryTable(DefaultDataTable based_on)
Method Detail |
---|
public void newRow()
public void setRowCell(TObject cell, int column, int row)
public void setRowCell(TObject cell, java.lang.String col_name)
public void setRowObject(TObject ob, int col_index, int row)
public void setRowObject(TObject ob, java.lang.String col_name)
public void setRowObject(TObject ob, int col_index)
public void setCellFrom(Table table, int src_col, int src_row, java.lang.String to_col)
public void copyFrom(Table table, int row)
public void setupAllSelectableSchemes()
public DataTableDef getDataTableDef()
Table
getDataTableDef
in interface TableDataSource
getDataTableDef
in class Table
public TObject getCellContents(int column, int row)
getCellContents
in interface TableDataSource
getCellContents
in class Table
public RowEnumeration rowEnumeration()
rowEnumeration
in interface TableDataSource
rowEnumeration
in class Table
public void lockRoot(int lock_key)
lockRoot
in class Table
public void unlockRoot(int lock_key)
unlockRoot
in class Table
public boolean hasRootsLocked()
hasRootsLocked
in class Table
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |