|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.empire.db.DBObject
org.apache.empire.db.DBExpr
org.apache.empire.db.expr.compare.DBCompareExpr
org.apache.empire.db.expr.compare.DBCompareAndOrExpr
public class DBCompareAndOrExpr
This class is used for combining two filter constraints by and / or operator
There is no need to explicitly create instances of this class.
Instead use DBCompareExpr.and(DBCompareExpr)
or DBCompareExpr.or(DBCompareExpr)
Field Summary | |
---|---|
protected DBCompareExpr |
left
|
protected boolean |
or
|
protected DBCompareExpr |
right
|
Fields inherited from class org.apache.empire.db.DBExpr |
---|
CTX_ALIAS, CTX_ALL, CTX_DEFAULT, CTX_FULLNAME, CTX_NAME, CTX_NOPARENTHESES, CTX_VALUE |
Constructor Summary | |
---|---|
DBCompareAndOrExpr(DBCompareExpr left,
DBCompareExpr right,
boolean or)
Constructs a DBCompareColExpr object |
Method Summary | |
---|---|
void |
addReferencedColumns(Set<DBColumn> list)
Internal function to obtain all DBColumnExpr-objects used by this expression. |
void |
addSQL(StringBuilder buf,
long context)
Creates the SQL-Command sets the specified compare value (the varible boolOP) between the two DBCompareExpr objects. |
DBDatabase |
getDatabase()
Returns the current DBDatabase object. |
DBCompareExpr |
getLeft()
|
DBCompareExpr |
getRight()
|
boolean |
isMutuallyExclusive(DBCompareExpr other)
Returns wheter the constraint should replace another one or not. |
boolean |
isOr()
|
DBCompareExpr |
parenthesis()
wraps the current expression with parenthesis. |
Methods inherited from class org.apache.empire.db.expr.compare.DBCompareExpr |
---|
and, not, or |
Methods inherited from class org.apache.empire.db.DBExpr |
---|
getObjectValue, getValueClass |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final DBCompareExpr left
protected final DBCompareExpr right
protected final boolean or
Constructor Detail |
---|
public DBCompareAndOrExpr(DBCompareExpr left, DBCompareExpr right, boolean or)
left
- the left side of the expressionright
- the right side of the expressionor
- true for OR operation, false for ANDMethod Detail |
---|
public DBCompareExpr getLeft()
public DBCompareExpr getRight()
public boolean isOr()
public DBDatabase getDatabase()
getDatabase
in class DBObject
public void addReferencedColumns(Set<DBColumn> list)
DBExpr
addReferencedColumns
in class DBExpr
list
- list to which all used column expressions must be addedDBExpr.addReferencedColumns(Set)
public void addSQL(StringBuilder buf, long context)
addSQL
in class DBExpr
buf
- the SQL statmentcontext
- the current SQL-Command contextpublic boolean isMutuallyExclusive(DBCompareExpr other)
isMutuallyExclusive
in class DBCompareExpr
public DBCompareExpr parenthesis()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |