|
||||||||||
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.
Constructor Summary | |
DbExpr(DbDatabase db)
Constructor for the DbExpr object |
Method Summary | |
DbExpr |
and(DbExpr e)
Returns an expression created as an "and" between the current expression and another expression. |
DbExpr |
containsAllStrings(java.util.List values)
Creates an expression to be used to search in char columns containing one of the specified strings. |
DbExpr |
containsAllStrings(java.lang.String[] values)
Creates an expression to be used to search in char columns containing one of the specified strings. |
DbExpr |
count()
Returns the count expression for the current expression. |
DbExpr |
dateTrunc()
Truncs the date? |
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. |
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.util.Collection valueList)
Returns an expression that means "IN (value1, value2, ..., valuen)" |
DbCriterion |
in(java.lang.Object o)
Returns an expression to represent the "in" clause. |
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()
Returns an expression in which it will take the lowercase value for current expression. |
DbExpr |
max()
Returns an expression in which it will take the max value for current expression. |
DbExpr |
min()
Returns an expression in which it will take the max value for current expression. |
DbCriterion |
notEqual(java.lang.Object o)
Return an expression representing this column being equal to another value. |
DbCriterion |
notIn(java.util.Collection valueList)
Returns an expression that means "NOT IN (value1, value2, ..., valuen)" |
DbCriterion |
notIn(java.lang.Object o)
Returns an expression to represent the "not in" clause. |
DbExpr |
or(DbExpr e)
Returns an expression created as an "or" between the current expression and another expression. |
abstract int |
setSqlValues(java.sql.PreparedStatement ps,
int i)
Any DbExpr needs to be able to substitute any parameters as per JDBC "?" |
DbExpr |
upper()
Returns an expression in which it will take the uppercase value for current expression. |
void |
usesTables(java.util.Set c)
Adds to the passed set all the tables used by this expression. |
static void |
usesTables(java.util.Set c,
java.lang.Object o)
Adds to the passed set all the tables used by an expression. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DbExpr(DbDatabase db)
db
- The database to be used.Method Detail |
public static void usesTables(java.util.Set c, java.lang.Object o)
c
- The set to add used tables to.o
- The expression to find tables from.public abstract int setSqlValues(java.sql.PreparedStatement ps, int i) throws DbException, java.sql.SQLException
ps
- The PreparedStatementi
- The new sqlValues value
DbException
- If something goes wrong.
java.sql.SQLException
- If something goes wrong.public abstract java.lang.String getQueryString() throws DbException
DbException
- If something goes wrong.public DbCriterion isNull()
public DbCriterion isNotNull()
public void usesTables(java.util.Set c)
usesTables
in interface DbTableUser
c
- The set to add tables to.public DbExpr and(DbExpr e)
e
- The expression with which it will build the "and" expression.
public DbExpr or(DbExpr e)
e
- The expression with which it will build the "and" expression.
public DbExpr max()
public DbExpr min()
public DbExpr upper()
public DbExpr lower()
public DbExpr count()
DbLiteral
expression, containing "*"
.
public DbExpr dateTrunc() throws DbException
DbException
- If something goes wrong.public DbCriterion equal(java.lang.Object o)
o
- The object that the current expression should be equal to.
public DbCriterion notEqual(java.lang.Object o)
o
- The object that the current expression should be not equal to.
public DbCriterion like(java.lang.Object o)
o
- The object that the current expression should be LIKE.
public DbExpr containsAllStrings(java.lang.String[] values)
values
- The array of strings.
public DbExpr containsAllStrings(java.util.List values)
values
- The list of strings.
public DbCriterion greaterThan(java.lang.Object o)
o
- The object that the current expression should be greater than.
public DbCriterion greaterThanOrEqual(java.lang.Object o)
o
- The object that the current expression should be greater than or equal.
public DbCriterion lessThan(java.lang.Object o)
o
- The object that the current expression should be less than.
public DbCriterion lessThanOrEqual(java.lang.Object o)
o
- The object that the current expression should be less than or equal.
public DbCriterion in(java.lang.Object o)
o
- The object representing usually the selector in which the expression should
find its values.
public DbCriterion in(java.util.Collection valueList)
valueList
- The value list.
public DbCriterion notIn(java.lang.Object o)
o
- The object representing usually the selector in which the expression should NOT
find its values.
public DbCriterion notIn(java.util.Collection valueList)
valueList
- The list of values.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |