Class DBCompareNotExpr

All Implemented Interfaces:
DBPreparable

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 Details

  • Constructor Details

    • DBCompareNotExpr

      public DBCompareNotExpr(DBCompareExpr expr)
      Constructs a DBCompareColExpr object
      Parameters:
      expr - the compare expression to negate
  • Method Details

    • getExpr

      public DBCompareExpr getExpr()
      Returns the wrapped expression
      Returns:
      the expression wrapped by not()
    • getDatabase

      public final DBDatabase getDatabase()
      Returns the current DBDatabase object.
      Specified by:
      getDatabase in class DBObject
      Returns:
      the current DBDatabase object
    • getRowSet

      public DBRowSet getRowSet()
      Returns the underlying rowset containing this column
      Specified by:
      getRowSet in class DBCompareExpr
      Returns:
      a column used for this expression
    • prepareParams

      public void prepareParams(DBCommand cmd, DBExpr parent)
      Description copied from interface: DBPreparable
      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. Do not call yourself!
      Parameters:
      cmd - the command to which to add the parameters
      parent - the parent expression holding the value
    • copy

      public DBCompareExpr copy(DBCommand newCmd)
      Copy Command
      Specified by:
      copy in class DBCompareExpr
      Parameters:
      newCmd - the new command object
      Returns:
      the cloned compare expression
    • addReferencedColumns

      public void addReferencedColumns(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:
    • addSQL

      public void addSQL(DBSQLBuilder sql, 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:
      sql - the SQL statment
      context - the current SQL-Command context
    • isMutuallyExclusive

      public boolean isMutuallyExclusive(DBCompareExpr other)
      Returns whether 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
    • isConstraintOn

      public boolean isConstraintOn(DBColumnExpr colExpr)
      Returns whether the constraint is on the given column
      Specified by:
      isConstraintOn in class DBCompareExpr
      Returns:
      true it the constraint is on the given column or false otherwise