|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javatools.db.DbExpr | +--javatools.db.DbParenthesis
This expression has the result of putting parenthesis around another expression. i.e. "expr" becomes "( expr )". It should be noted that you won't usually use this class in your application code. Normally the order of evaluation of the SQL is implied by the parethesis in your Java code. i.e.
DbExpr x = a.and((b.or(c)).and(d))This will automatically retain the Java evaluation order...
A AND ( (B OR C) AND D)
Constructor Summary | |
DbParenthesis(DbDatabase db,
DbExpr expr)
Constructor for the DbParenthesis object |
Method Summary | |
java.lang.String |
getQueryString()
Gets the queryString attribute of the DbParenthesis object |
int |
setSqlValues(java.sql.PreparedStatement ps,
int i)
Sets the sqlValues attribute of the DbParenthesis object |
void |
usesTables(java.util.Set c)
Puts in the passed set all used tables by this expression. |
Methods inherited from class javatools.db.DbExpr |
and, containsAllStrings, containsAllStrings, count, dateTrunc, equal, greaterThan, greaterThanOrEqual, in, in, isNotNull, isNull, lessThan, lessThanOrEqual, like, lower, max, min, notEqual, notIn, notIn, or, upper, usesTables |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DbParenthesis(DbDatabase db, DbExpr expr)
db
- The database that will be used.expr
- The expression to be put in parenthesis.Method Detail |
public int setSqlValues(java.sql.PreparedStatement ps, int i) throws java.sql.SQLException, DbException
setSqlValues
in class DbExpr
ps
- The statement.i
- The new sqlValues value
java.sql.SQLException
- If something goes wrong.
DbException
- If something goes wrong.public java.lang.String getQueryString() throws DbException
getQueryString
in class DbExpr
DbException
- If something goes wrong.public void usesTables(java.util.Set c)
usesTables
in interface DbTableUser
usesTables
in class DbExpr
c
- The set to put tables into.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |