javatools.db
Class DbParenthesis
java.lang.Object
|
+--javatools.db.DbExpr
|
+--javatools.db.DbParenthesis
- public class DbParenthesis
- extends DbExpr
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)
Fields inherited from class javatools.db.DbExpr |
db |
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)
Description of the Method |
Methods inherited from class javatools.db.DbExpr |
and, dateTrunc, equal, getString, greaterThan, greaterThanOrEqual, in, isNotNull, isNull, lessThan, lessThanOrEqual, like, lower, max, min, notEqual, notIn, or, setSqlValue, upper, usesTables |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
expr
DbExpr expr
DbParenthesis
public DbParenthesis(DbDatabase db,
DbExpr expr)
- Constructor for the DbParenthesis object
- Parameters:
db
- Description of Parameterexpr
- Description of Parameter
setSqlValues
public int setSqlValues(java.sql.PreparedStatement ps,
int i)
throws java.sql.SQLException,
DbException
- Sets the sqlValues attribute of the DbParenthesis object
- Specified by:
setSqlValues
in class DbExpr
- Parameters:
ps
- The new sqlValues valuei
- The new sqlValues value
- Returns:
- Description of the
Returned Value
- Throws:
java.sql.SQLException
- Description of Exception
DbException
- Description of Exception
getQueryString
public java.lang.String getQueryString()
throws DbException
- Gets the queryString attribute of the DbParenthesis object
- Specified by:
getQueryString
in class DbExpr
- Returns:
- The queryString value
- Throws:
DbException
- Description of Exception
usesTables
public void usesTables(java.util.Set c)
- Description of the Method
- Overrides:
usesTables
in class DbExpr
- Parameters:
c
- Description of Parameter