public final class SimpleTableQuery extends Object
Constructor and Description |
---|
SimpleTableQuery(TableDataSource in_table)
Constructs the SimpleTableQuery with the given MutableTableDataSource
object.
|
Modifier and Type | Method and Description |
---|---|
void |
deleteRows(IntegerVector list)
Deletes all the given indexes in this table.
|
boolean |
deleteSingle(int col,
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,
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.
|
Object |
getVar(int value_column,
int key_column,
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,
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,
Object val1,
int col2,
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,
Object[] vals)
Adds a new key/value mapping in this table.
|
public SimpleTableQuery(TableDataSource in_table)
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, 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, Object val1, int col2, 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, Object val)
public Object getVar(int value_column, int key_column, Object key_value)
public void setVar(int key_column, 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, 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()
Copyright © 2015. All rights reserved.