|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.empire.commons.ErrorObject
org.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)
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.empire.commons.ErrorObject |
---|
ErrorObject.ObjectErrorInfo |
Field Summary | |
---|---|
protected DBCmpType |
cmpop
|
protected DBColumnExpr |
expr
|
protected java.lang.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, log |
Constructor Summary | |
---|---|
DBCompareColExpr(DBColumnExpr expr,
DBCmpType op,
java.lang.Object value)
Constructs a DBCompareColExpr object set the specified parameters to this object. |
Method Summary | |
---|---|
void |
addCompareExpr(java.lang.StringBuilder buf,
long context)
Add the comparison operator and value to the SQL-Command. |
void |
addReferencedColumns(java.util.Set<DBColumn> list)
Internal function to obtain all DBColumnExpr-objects used by this expression. |
void |
addSQL(java.lang.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. |
java.lang.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(java.lang.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 org.apache.empire.db.DBObject |
---|
error, error |
Methods inherited from class org.apache.empire.commons.ErrorObject |
---|
clearError, clearErrorInfo, error, error, error, error, error, getErrorInfo, getErrorMessage, getErrorParams, getErrorSource, getErrorType, getMessage, hasError, internalSetError, isExceptionsEnabled, setExceptionsEnabled, success |
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 java.lang.Object value
Constructor Detail |
---|
public DBCompareColExpr(DBColumnExpr expr, DBCmpType op, java.lang.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 java.lang.Object getValue()
public void setValue(java.lang.Object value)
value
- the comparison valuepublic void addReferencedColumns(java.util.Set<DBColumn> list)
DBExpr
addReferencedColumns
in class DBExpr
list
- list to which all used column expressions must be addedDBExpr.addReferencedColumns(Set)
public void addCompareExpr(java.lang.StringBuilder buf, long context)
buf
- the SQL-Commandcontext
- the comparative context e.g. (CMP_EQUAL, CMP_SMALLER)public void addSQL(java.lang.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 |