|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javatools.db.DbExpr
An sql expression class. This is the abstract base class for any type of SQL expression.
Field Summary | |
(package private) DbDatabase |
db
|
Constructor Summary | |
DbExpr(DbDatabase db)
Constructor for the DbExpr object |
Method Summary | |
DbExpr |
and(DbExpr e)
Description of the Method |
DbExpr |
dateTrunc()
Description of the Method |
DbCriterion |
equal(java.lang.Object o)
Return an expression representing this column being equal to another value. |
abstract java.lang.String |
getQueryString()
Any DbExpr needs to be able to convert into the SQL string equivilent. |
(package private) static java.lang.String |
getString(java.lang.Object o)
Utility function to turn o into an SQL expression. |
DbCriterion |
greaterThan(java.lang.Object o)
Return an expression representing this column being greater than another value. |
DbCriterion |
greaterThanOrEqual(java.lang.Object o)
Return an expression representing this column being greater than or equal to another value. |
DbCriterion |
in(java.lang.Object o)
Description of the Method |
DbCriterion |
isNotNull()
Gets the notNull attribute of the DbExpr object |
DbCriterion |
isNull()
Gets the null attribute of the DbExpr object |
DbCriterion |
lessThan(java.lang.Object o)
Return an expression representing this column being less than another value. |
DbCriterion |
lessThanOrEqual(java.lang.Object o)
Return an expression representing this column being less than or equal to another value. |
DbCriterion |
like(java.lang.Object o)
Return an expression representing this column being LIKE another value. |
DbExpr |
lower()
Description of the Method |
DbExpr |
max()
Description of the Method |
DbExpr |
min()
Description of the Method |
DbCriterion |
notEqual(java.lang.Object o)
Description of the Method |
DbCriterion |
notIn(java.lang.Object o)
Description of the Method |
DbExpr |
or(DbExpr e)
Description of the Method |
(package private) static int |
setSqlValue(java.sql.PreparedStatement stmt,
int i,
java.lang.Object col,
DbColumn intocol)
Substitute the literal value in the Prepared Statement. |
abstract int |
setSqlValues(java.sql.PreparedStatement ps,
int i)
Any DbExpr needs to be able to substitute any parameters as per JDBC "?" substitutions. |
DbExpr |
upper()
Description of the Method |
void |
usesTables(java.util.Set c)
Description of the Method |
static void |
usesTables(java.util.Set c,
java.lang.Object o)
Description of the Method |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
DbDatabase db
Constructor Detail |
public DbExpr(DbDatabase db)
db
- Description of ParameterMethod Detail |
public static void usesTables(java.util.Set c, java.lang.Object o)
c
- Description of Parametero
- Description of Parameterstatic int setSqlValue(java.sql.PreparedStatement stmt, int i, java.lang.Object col, DbColumn intocol) throws DbException, java.sql.SQLException
stmt
- the PreparedStatementi
- the parameter number we are up tointocol
- optional list of columns the result will be
selected intocol
- The new sqlValue value
java.sql.SQLException
- Description of Exception
DbException
- Description of Exceptionstatic java.lang.String getString(java.lang.Object o) throws DbException
o
- Description of Parameter
DbException
- Description of Exceptionpublic abstract int setSqlValues(java.sql.PreparedStatement ps, int i) throws DbException, java.sql.SQLException
ps
- The new sqlValues valuei
- The new sqlValues value
DbException
- Description of Exception
java.sql.SQLException
- Description of Exceptionpublic abstract java.lang.String getQueryString() throws DbException
DbException
- Description of Exceptionpublic DbCriterion isNull()
public DbCriterion isNotNull()
public void usesTables(java.util.Set c)
c
- Description of Parameterpublic DbExpr and(DbExpr e)
e
- Description of Parameter
public DbExpr or(DbExpr e)
e
- Description of Parameter
public DbExpr max()
public DbExpr min()
public DbExpr upper()
public DbExpr lower()
public DbExpr dateTrunc() throws DbException
DbException
- Description of Exceptionpublic DbCriterion equal(java.lang.Object o)
o
- Description of Parameter
public DbCriterion notEqual(java.lang.Object o)
o
- Description of Parameter
public DbCriterion like(java.lang.Object o)
o
- Description of Parameter
public DbCriterion greaterThan(java.lang.Object o)
o
- Description of Parameter
public DbCriterion greaterThanOrEqual(java.lang.Object o)
o
- Description of Parameter
public DbCriterion lessThan(java.lang.Object o)
o
- Description of Parameter
public DbCriterion lessThanOrEqual(java.lang.Object o)
o
- Description of Parameter
public DbCriterion in(java.lang.Object o)
o
- Description of Parameter
public DbCriterion notIn(java.lang.Object o)
o
- Description of Parameter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |