|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object isql.predicate.WhereView
public class WhereView
Contains the tables involved in a predicate (a section of the where clause) with the indices of their rows that are resulting from the predicate filter. For example the predicate: user.name = 'brian' will return a view containing, for the table user, the indices of all the rows that have the field name content equal to the text "brian". You can see the content of the object as a view in the database, where instead to have all the values that have been filtered and joined for the view, you have the indices of the tables rows
Field Summary | |
---|---|
static java.lang.Integer |
NO_ROW
since WhereView is equivalent to a VIEW in the database, the row of the view must have values for each involved table, even if the table rows don't match the filter. |
Method Summary | |
---|---|
void |
addAll(WhereView otherView)
Adds the content of another view to this one |
void |
addEmptyTable(java.lang.String table)
Adds a table (if it does not already exist) in the view, without any index |
void |
addEmptyTables(java.lang.String[] arrTable)
add tables without any index |
void |
addRowIndex(int index)
Adds a single row index for each table of the view |
void |
addTableWithRowIndices(java.lang.String table,
java.util.List<java.lang.Integer> lstRowIndices)
Adds a table to the view with all the indices |
static WhereView |
fromColumns(ColumnValues values)
Builds the view from the column values. |
static WhereView |
fromExpression(IExpression exp)
Builds a view from an expression (the expression contains the involved columns, and therefore the involved tables). |
java.util.List<java.lang.Integer> |
getIndicesInTable(java.lang.String table)
Returns the indices for one specific table in this view |
int |
getRowsNumber()
Since all the tables have by definition the same number of rows (possibly empty) the number of rows of the view is the same as the number of rows of the first table |
java.lang.String[] |
getTableNames()
Retursn the names of the tables that are included in the view |
static java.lang.String[] |
getTablesFromColumnKeys(java.util.Collection<ColumnKey> colKey)
column keys identifies columns and they are composed by the table and column name. |
boolean |
hasTable(java.lang.String table)
Checks if a table already exists in the view |
static WhereView |
none(java.lang.String[] arrTable)
Builds a view that, for all tables, does not contain any row index |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.Integer NO_ROW
Method Detail |
---|
public static WhereView fromColumns(ColumnValues values)
values
- the column values
public static WhereView none(java.lang.String[] arrTable)
arrTable
- the tables
public static WhereView fromExpression(IExpression exp)
exp
- the expression
public void addAll(WhereView otherView)
otherView
- the other viewpublic void addRowIndex(int index)
index
- the row indexpublic void addTableWithRowIndices(java.lang.String table, java.util.List<java.lang.Integer> lstRowIndices)
table
- lstRowIndices
- public java.util.List<java.lang.Integer> getIndicesInTable(java.lang.String table)
table
- the table to get the indices for
public void addEmptyTables(java.lang.String[] arrTable)
arrTable
- public java.lang.String[] getTableNames()
public void addEmptyTable(java.lang.String table)
table
- the name of the table to addpublic boolean hasTable(java.lang.String table)
table
- the name of the table to check
public static java.lang.String[] getTablesFromColumnKeys(java.util.Collection<ColumnKey> colKey)
colKey
- a collection of column keys
public int getRowsNumber() throws ISQLException
ISQLException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |