org.apache.empire.db.expr.compare
Class DBExistsExpr
java.lang.Object
org.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.DBExistsExpr
- All Implemented Interfaces:
- ErrorInfo
public class DBExistsExpr
- extends DBCompareExpr
This class is used for building up the SQL-Command for the EXISTS syntax.
Methods inherited from class org.apache.empire.commons.ErrorObject |
clearError, clearErrorInfo, error, error, 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 |
cmd
public final DBCommandExpr cmd
compareExpr
public final DBCompareExpr compareExpr
DBExistsExpr
public DBExistsExpr(DBCommandExpr cmd)
- Constructs a DBExistsExpr object set the specified parameters to this object.
- Parameters:
cmd
- the DBCommandExpr object
DBExistsExpr
public DBExistsExpr(DBCommandExpr cmd,
DBCompareExpr compareExpr)
- Constructs a DBExistsExpr object set the specified parameters to this object.
- Parameters:
cmd
- the DBCommandExpr objectcompareExpr
- The expression to append to the end of the exists statement
getDatabase
public DBDatabase getDatabase()
- Returns the current DBDatabase object.
- Specified by:
getDatabase
in class DBObject
- Returns:
- the current DBDatabase object
addReferencedColumns
public void addReferencedColumns(java.util.Set<DBColumn> list)
- Description copied from class:
DBExpr
- Internal function to obtain all DBColumnExpr-objects used by this expression.
- Specified by:
addReferencedColumns
in class DBExpr
- Parameters:
list
- list to which all used column expressions must be added- See Also:
DBExpr.addReferencedColumns(Set)
addSQL
public void addSQL(java.lang.StringBuilder buf,
long context)
- Creates the SQL-Command.
- Specified by:
addSQL
in class DBExpr
- Parameters:
buf
- the SQL-Commandcontext
- the current SQL-Command context (CTX_DEFAULT, CTX_SELECT, CTX_NAME, CTX_VALUE)
isMutuallyExclusive
public boolean isMutuallyExclusive(DBCompareExpr other)
- Returns wheter the constraint should replace another one or not.
- Specified by:
isMutuallyExclusive
in class DBCompareExpr
- Returns:
- true it the constraints are mutually exclusive or false otherwise
Copyright © 2008-2009 Apache Software Foundation. All Rights Reserved.