|
||||||||||
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.DBCompareColExpr
public class DBCompareColExpr
This class is used for defining filter constraints based on a column expression in SQL
There is no need to explicitly create instances of this class.
Instead use any of the following functions:
DBColumnExpr.is(Object)
, DBColumnExpr.isBetween(Object, Object)
, DBColumnExpr.isGreaterThan(Object)
,
DBColumnExpr.isLessOrEqual(Object)
, DBColumnExpr.isMoreOrEqual(Object)
, DBColumnExpr.isNot(Object)
,
DBColumnExpr.isNotBetween(Object, Object)
, DBColumnExpr.isSmallerThan(Object)
, DBColumnExpr.like(Object)
,
DBColumnExpr.like(String, char)
, DBColumnExpr.likeLower(String)
, DBColumnExpr.likeUpper(String)
Field Summary | |
---|---|
protected DBCmpType |
cmpop
|
protected DBColumnExpr |
expr
|
protected Object |
value
|
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 | |
---|---|
DBCompareColExpr(DBColumnExpr expr,
DBCmpType op,
Object value)
Constructs a DBCompareColExpr object set the specified parameters to this object. |
Method Summary | |
---|---|
void |
addCompareExpr(StringBuilder buf,
long context)
Add the comparison operator and value to the SQL-Command. |
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. |
DBCmpType |
getCmpop()
Gets the comparison operator |
DBColumnExpr |
getColumnExpr()
Gets the DBColumnExpr object |
DBDatabase |
getDatabase()
Returns the current DBDatabase object. |
Object |
getValue()
Gets the value to compare the column expression with |
boolean |
isMutuallyExclusive(DBCompareExpr other)
Returns whether the constraint should replace another one or not. |
void |
setValue(Object value)
The value to compare the column expression with |
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 DBColumnExpr expr
protected final DBCmpType cmpop
protected Object value
Constructor Detail |
---|
public DBCompareColExpr(DBColumnExpr expr, DBCmpType op, Object value)
expr
- the DBColumnExpr objectop
- the comparative context e.g. (CMP_EQUAL, CMP_SMALLER)value
- the comparative valueMethod Detail |
---|
public DBDatabase getDatabase()
getDatabase
in class DBObject
public DBColumnExpr getColumnExpr()
public DBCmpType getCmpop()
public Object getValue()
public void setValue(Object value)
value
- the comparison valuepublic 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 addCompareExpr(StringBuilder buf, long context)
buf
- the SQL-Commandcontext
- the comparative context e.g. (CMP_EQUAL, CMP_SMALLER)public void addSQL(StringBuilder buf, long context)
addSQL
in class DBExpr
buf
- the SQL-Commandcontext
- the current SQL-Command contextpublic boolean isMutuallyExclusive(DBCompareExpr other)
isMutuallyExclusive
in class DBCompareExpr
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |