ModSQL
Class Operator_Not

java.lang.Object
  |
  +--ModSQL.AbstractFunction
        |
        +--ModSQL.Operator
              |
              +--ModSQL.Operator_Not
All Implemented Interfaces:
Function

final class Operator_Not
extends Operator

SQL operator NOT.

Author:
chris.studholme@utoronto.ca

Fields inherited from class ModSQL.AbstractFunction
all_constant, constant_non_null, evaluate_order, evaluate_order_array, out_of_order, parameter_constant, parameter_value, parameters, parameters_array
 
Fields inherited from interface ModSQL.Function
MATCH_BEGINS, MATCH_EQU, MATCH_GT, MATCH_GTE, MATCH_LT, MATCH_LTE, MATCH_NE
 
Constructor Summary
Operator_Not()
          Default constructor.
Operator_Not(Function parameter)
          Constructor with parameter.
 
Method Summary
 Object evaluate(boolean aggregate)
          Evaluate parameter and invert.
 Object evaluate(int match_op, Object match_value)
          Evaluate parameter and invert.
 String functionName()
          Returns "#NOT".
 int getMaxResultSize()
          Returns -1 as this operator will never return a String object.
 int getSQLType()
          Returns Types.BIT.
 void optimize()
          Prepare the function for use.
 
Methods inherited from class ModSQL.Operator
addAllParameters, addAllParametersNegate, addAllParametersNot, removeDoubleNegation, removeDoubleNot
 
Methods inherited from class ModSQL.AbstractFunction
addParameter, convertToSQLType, evaluateConstantParameters, evaluateOrder, evaluateParameters, evaluateParameters, getCompatableType, getObjectSQLType, getParameter, getParameterCount, isAggregate, isConstant, postfixParameters, prefixParameters, registerWith, reset, toString
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Constructor Detail

Operator_Not

public Operator_Not()
Default constructor.

Operator_Not

public Operator_Not(Function parameter)
             throws SQLException
Constructor with parameter.
Parameters:
parameter - first (and only) parameter
Throws:
SQLException - if there is an error with the parameter
Method Detail

optimize

public void optimize()
              throws SQLException

Prepare the function for use.

Overrides:
optimize in class AbstractFunction
Throws:
SQLException - if the parameter is invalid

functionName

public String functionName()
Returns "#NOT".
Overrides:
functionName in class AbstractFunction
Returns:
name of function

getSQLType

public int getSQLType()
Returns Types.BIT.
Returns:
SQL type of data to be returned

getMaxResultSize

public int getMaxResultSize()
Returns -1 as this operator will never return a String object.
Returns:
maximum size of String returned or -1 if unknown

evaluate

public Object evaluate(boolean aggregate)
                throws SQLException,
                       EndOfTable
Evaluate parameter and invert.
Parameters:
aggregate - passed to parameter
Returns:
result object
Throws:
SQLException - if a database-access error occurs
EndOfTable - if thrown by a parameter

evaluate

public Object evaluate(int match_op,
                       Object match_value)
                throws SQLException,
                       EndOfTable
Evaluate parameter and invert.
Overrides:
evaluate in class AbstractFunction
Parameters:
match_op - how the value should be matched
match_value - desired value
Returns:
result object
Throws:
SQLException - if a database-access error occurs
EndOfTable - if thrown by a parameter