Class DBCompareParenthesisExpr
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.DBCompareParenthesisExpr
- All Implemented Interfaces:
Unwrappable<DBCompareExpr>,DBPreparable
This class wraps an existing compare expression with parenthesis.
-
Field Summary
Fields 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) Used to build the SQL command.internally used for command cloningfinal DBDatabaseReturns the database object to which this object belongs to.Returns the underlying rowset containing this column For functions involving none or more than one physical column this function return the first onebooleanisConstraintOn(DBColumnExpr colExpr) booleanisMutuallyExclusive(DBCompareExpr other) booleanReturns true if the object is a wrapper for another objectvoidprepareParams(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.unwrap()Unwrapps am object that is wrapped by this object If the object is not a wrapper then it must return itself (this)!Methods inherited from class org.apache.empire.db.expr.compare.DBCompareExpr
and, not, orMethods inherited from class org.apache.empire.db.DBObject
checkParamNull
-
Constructor Details
-
DBCompareParenthesisExpr
-
-
Method Details
-
isWrapper
public boolean isWrapper()Description copied from interface:UnwrappableReturns true if the object is a wrapper for another object- Specified by:
isWrapperin interfaceUnwrappable<DBCompareExpr>- Returns:
- true if its a wrapper or false otherwise
-
unwrap
Description copied from interface:UnwrappableUnwrapps am object that is wrapped by this object If the object is not a wrapper then it must return itself (this)!- Specified by:
unwrapin interfaceUnwrappable<DBCompareExpr>- Returns:
- the original object
-
getDatabase
Description copied from class:DBObjectReturns the database object to which this object belongs to. For the database object itself this function will return the this pointer.- Specified by:
getDatabasein classDBObject- Returns:
- the database object
-
getRowSet
Description copied from class:DBCompareExprReturns the underlying rowset containing this column For functions involving none or more than one physical column this function return the first one- Specified by:
getRowSetin classDBCompareExpr- Returns:
- a column used for this expression
-
isMutuallyExclusive
- Specified by:
isMutuallyExclusivein classDBCompareExpr
-
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!- Specified by:
prepareParamsin interfaceDBPreparable- Parameters:
cmd- the command to which to add the parametersparent- the parent expression holding the value
-
copy
Description copied from class:DBCompareExprinternally used for command cloning- 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
-
addSQL
Description copied from class:DBExprUsed to build the SQL command. SQL for this expression must be appended to StringBuilder. -
isConstraintOn
- Specified by:
isConstraintOnin classDBCompareExpr
-