org.apache.empire.db.expr.compare
Class DBCompareNotExpr

java.lang.Object
  extended by org.apache.empire.commons.ErrorObject
      extended by org.apache.empire.db.DBObject
          extended by org.apache.empire.db.DBExpr
              extended by org.apache.empire.db.expr.compare.DBCompareExpr
                  extended by org.apache.empire.db.expr.compare.DBCompareNotExpr
All Implemented Interfaces:
ErrorInfo

public class DBCompareNotExpr
extends DBCompareExpr

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
 DBCompareExpr expr
           
 
Fields inherited from class org.apache.empire.db.DBExpr
CTX_ALIAS, CTX_ALL, CTX_DEFAULT, CTX_FULLNAME, CTX_NAME, CTX_NOPARENTHESES, CTX_VALUE
 
Constructor Summary
DBCompareNotExpr(DBCompareExpr expr)
          constructs a DBCompareColExpr object set the specified parameters to this object
 
Method Summary
 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 sets the specified compare value (the varible boolOP) between the two DBCompareExpr objects.
 DBDatabase getDatabase()
          Returns the current DBDatabase object.
 boolean isMutuallyExclusive(DBCompareExpr other)
          Returns wheter the constraint should replace another one or not.
 
Methods inherited from class org.apache.empire.db.expr.compare.DBCompareExpr
and, not, or
 
Methods inherited from class org.apache.empire.db.DBExpr
getValueClass
 
Methods inherited from class org.apache.empire.commons.ErrorObject
clearError, getErrorMessage, getErrorParams, getErrorSource, getErrorType, getMessage, hasError, isExceptionsEnabled, setExceptionsEnabled
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

expr

public final DBCompareExpr expr
Constructor Detail

DBCompareNotExpr

public DBCompareNotExpr(DBCompareExpr expr)
constructs a DBCompareColExpr object set the specified parameters to this object

Method Detail

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 sets the specified compare value (the varible boolOP) between the two DBCompareExpr objects.

Specified by:
addSQL in class DBExpr
Parameters:
buf - the SQL statment
context - the current SQL-Command context

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