public class DBCompareColExpr extends DBCompareExpr
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)
Modifier and Type | Field and Description |
---|---|
protected DBCmpType |
cmpop |
protected DBColumnExpr |
expr |
protected Object |
value |
CTX_ALIAS, CTX_ALL, CTX_DEFAULT, CTX_FULLNAME, CTX_NAME, CTX_NOPARENTHESIS, CTX_VALUE
Constructor and Description |
---|
DBCompareColExpr(DBColumnExpr expr,
DBCmpType op,
Object value)
Constructs a DBCompareColExpr object set the specified parameters to this object.
|
Modifier and Type | Method and Description |
---|---|
void |
addCompareExpr(DBSQLBuilder sql,
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(DBSQLBuilder sql,
long context)
Creates the SQL-Command.
|
DBCompareExpr |
copy(DBCommand newCmd)
Copy Command
|
DBCmpType |
getCmpOperator()
Gets the comparison operator
|
DBColumnExpr |
getColumnExpr()
Gets the DBColumnExpr object
|
DBDatabase |
getDatabase()
Returns the current DBDatabase object.
|
DBRowSet |
getRowSet()
Returns the underlying rowset containing this column
|
Object |
getValue()
Gets the value to compare the column expression with
|
boolean |
isConstraintOn(DBColumnExpr colExpr)
Returns whether the constraint is on the given column
|
boolean |
isMutuallyExclusive(DBCompareExpr other)
Returns whether the constraint should replace another one or not.
|
void |
prepareCommand(DBCommand cmd)
Prepare function
|
void |
setValue(Object value)
The value to compare the column expression with
|
String |
toString()
For Debugging
|
and, not, or
checkParamNull
protected final DBColumnExpr expr
protected final DBCmpType cmpop
protected Object value
public DBCompareColExpr(DBColumnExpr expr, DBCmpType op, Object value)
expr
- the DBColumnExpr objectop
- the comparative context e.g. (CMP_EQUAL, CMP_SMALLER)value
- the comparative valuepublic final DBDatabase getDatabase()
getDatabase
in class DBObject
public DBRowSet getRowSet()
getRowSet
in class DBCompareExpr
public DBColumnExpr getColumnExpr()
public DBCmpType getCmpOperator()
public Object getValue()
public void setValue(Object value)
value
- the comparison valuepublic void prepareCommand(DBCommand cmd)
prepareCommand
in class DBCompareExpr
cmd
- public DBCompareExpr copy(DBCommand newCmd)
copy
in class DBCompareExpr
newCmd
- the new command objectpublic 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(DBSQLBuilder sql, long context)
sql
- the SQL-Commandcontext
- the comparative context e.g. (CMP_EQUAL, CMP_SMALLER)public void addSQL(DBSQLBuilder sql, long context)
public boolean isMutuallyExclusive(DBCompareExpr other)
isMutuallyExclusive
in class DBCompareExpr
public boolean isConstraintOn(DBColumnExpr colExpr)
isConstraintOn
in class DBCompareExpr
Copyright © 2008–2023 Apache Software Foundation. All rights reserved.