Class DBCompareNotExpr
java.lang.Object
org.apache.empire.db.DBObject
org.apache.empire.db.DBExpr
org.apache.empire.db.expr.compare.DBCompareExpr
org.apache.empire.db.expr.compare.DBCompareNotExpr
- All Implemented Interfaces:
DBPreparable
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 DBCompareExpr.not()
-
Field Summary
FieldsFields inherited from class org.apache.empire.db.expr.compare.DBCompareExpr
logFields inherited from class org.apache.empire.db.DBExpr
CTX_ALIAS, CTX_ALL, CTX_DEFAULT, CTX_FULLNAME, CTX_NAME, CTX_NOPARENTHESIS, CTX_VALUE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddReferencedColumns(Set<DBColumn> list) Internal function to obtain all DBColumnExpr-objects used by this expression.voidaddSQL(DBSQLBuilder sql, long context) Creates the SQL-Command sets the specified compare value (the varible boolOP) between the two DBCompareExpr objects.Copy Commandfinal DBDatabaseReturns the current DBDatabase object.getExpr()Returns the wrapped expressionReturns the underlying rowset containing this columnbooleanisConstraintOn(DBColumnExpr colExpr) Returns whether the constraint is on the given columnbooleanisMutuallyExclusive(DBCompareExpr other) Returns whether the constraint should replace another one or not.voidprepareParams(DBCommand cmd, DBExpr parent) Prepares an expression for a query This function is called by DBCommand in order to add values as query parameters instead of being literally included in the sql statement Please Note: This function is internally called.Methods inherited from class org.apache.empire.db.expr.compare.DBCompareExpr
and, not, orMethods inherited from class org.apache.empire.db.DBObject
checkParamNull
-
Field Details
-
expr
-
-
Constructor Details
-
DBCompareNotExpr
Constructs a DBCompareColExpr object- Parameters:
expr- the compare expression to negate
-
-
Method Details
-
getExpr
Returns the wrapped expression- Returns:
- the expression wrapped by not()
-
getDatabase
Returns the current DBDatabase object.- Specified by:
getDatabasein classDBObject- Returns:
- the current DBDatabase object
-
getRowSet
Returns the underlying rowset containing this column- Specified by:
getRowSetin classDBCompareExpr- Returns:
- a column used for this expression
-
prepareParams
Description copied from interface:DBPreparablePrepares an expression for a query This function is called by DBCommand in order to add values as query parameters instead of being literally included in the sql statement Please Note: This function is internally called. Do not call yourself!- Parameters:
cmd- the command to which to add the parametersparent- the parent expression holding the value
-
copy
Copy Command- Specified by:
copyin classDBCompareExpr- Parameters:
newCmd- the new command object- Returns:
- the cloned compare expression
-
addReferencedColumns
Description copied from class:DBExprInternal function to obtain all DBColumnExpr-objects used by this expression.- Specified by:
addReferencedColumnsin classDBExpr- Parameters:
list- list to which all used column expressions must be added- See Also:
-
addSQL
Creates the SQL-Command sets the specified compare value (the varible boolOP) between the two DBCompareExpr objects. -
isMutuallyExclusive
Returns whether the constraint should replace another one or not.- Specified by:
isMutuallyExclusivein classDBCompareExpr- Returns:
- true it the constraints are mutually exclusive or false otherwise
-
isConstraintOn
Returns whether the constraint is on the given column- Specified by:
isConstraintOnin classDBCompareExpr- Returns:
- true it the constraint is on the given column or false otherwise
-