|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mckoi.database.SimpleTableQuery
public final class SimpleTableQuery
A simple convenience interface for querying a MutableTableDataSource instance. This is used as a very lightweight interface for changing a table. It is most useful for internal low level users of a database table which doesn't need the overhead of the Mckoi table hierarchy mechanism.
Constructor Summary | |
---|---|
SimpleTableQuery(TableDataSource in_table)
Constructs the SimpleTableQuery with the given MutableTableDataSource object. |
Method Summary | |
---|---|
void |
deleteRows(IntegerVector list)
Deletes all the given indexes in this table. |
boolean |
deleteSingle(int col,
java.lang.Object val)
Deletes a single entry from the table where the given column equals the given value. |
void |
dispose()
Disposes this object and frees any resources associated with it. |
boolean |
existsSingle(int col,
java.lang.Object val)
Returns true if there is a single row in the table where the given column is equal to the given value, otherwise returns false. |
void |
finalize()
To be save we call dispose from the finalize method. |
TObject |
get(int column,
int row)
Gets the TObject at the given cell in the table. |
int |
getRowCount()
Returns the total number of rows in this table. |
java.lang.Object |
getVar(int value_column,
int key_column,
java.lang.Object key_value)
Assuming the table stores a key/value mapping, this returns the contents of value_column for any rows where key_column is equal to the key_value. |
RowEnumeration |
rowEnumeration()
Returns a RowEnumeration that is used to iterate through the entire list of valid rows in the table. |
IntegerVector |
selectIndexesEqual(int column,
java.lang.Object value)
Finds the index of all the rows in the table where the given column is equal to the given object. |
IntegerVector |
selectIndexesEqual(int col1,
java.lang.Object val1,
int col2,
java.lang.Object val2)
Finds the index of all the rows in the table where the given column is equal to the given object for both of the clauses. |
IntegerVector |
selectIndexesEqual(int column,
TObject cell)
Finds the index of all the rows in the table where the given column is equal to the given object. |
IntegerVector |
selectIndexesEqual(int col1,
TObject cell1,
int col2,
TObject cell2)
Finds the index of all the rows in the table where the given column is equal to the given object for both of the clauses. |
void |
setVar(int key_column,
java.lang.Object[] vals)
Adds a new key/value mapping in this table. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleTableQuery(TableDataSource in_table)
Method Detail |
---|
public RowEnumeration rowEnumeration()
public int getRowCount()
public TObject get(int column, int row)
public IntegerVector selectIndexesEqual(int column, TObject cell)
public IntegerVector selectIndexesEqual(int column, java.lang.Object value)
We assume value is not null, and it is either a BigNumber to represent a number, a String, a java.util.Date or a ByteLongObject.
public IntegerVector selectIndexesEqual(int col1, TObject cell1, int col2, TObject cell2)
public IntegerVector selectIndexesEqual(int col1, java.lang.Object val1, int col2, java.lang.Object val2)
We assume value is not null, and it is either a BigNumber to represent a number, a String, a java.util.Date or a ByteLongObject.
public boolean existsSingle(int col, java.lang.Object val)
public java.lang.Object getVar(int value_column, int key_column, java.lang.Object key_value)
public void setVar(int key_column, java.lang.Object[] vals)
NOTE: Change will come into effect globally at the next commit.
NOTE: This method must be assured of exlusive access to the table within the transaction.
NOTE: This only works if the given table implements MutableTableDataSource.
public boolean deleteSingle(int col, java.lang.Object val)
NOTE: This only works if the given table implements MutableTableDataSource.
public void deleteRows(IntegerVector list)
NOTE: This only works if the given table implements MutableTableDataSource.
public void dispose()
public void finalize()
finalize
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |