Class SqlEvaluator

  • All Implemented Interfaces:
    Evaluator

    public class SqlEvaluator
    extends java.lang.Object
    implements Evaluator
    A boolean evaluator for JMS Sql selector expressions.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean evaluate​(java.util.Map<java.lang.String,​java.lang.Object> env)
      Evaluates the (given) expression with the environment given.
      boolean evaluatorOk()
      This call is idempotent.
      java.lang.String getErrorMessage()
      This call is idempotent.
      com.rabbitmq.jms.parse.sql.SqlParseTree typedParseTree()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • evaluate

        public boolean evaluate​(java.util.Map<java.lang.String,​java.lang.Object> env)
        Description copied from interface: Evaluator
        Evaluates the (given) expression with the environment given. This call should not fail, provided Evaluator.evaluatorOk() is true.
        Specified by:
        evaluate in interface Evaluator
        Parameters:
        env - - the values of the variables used when evaluating the expression
        Returns:
        the evaluated result: true or false
      • typedParseTree

        public com.rabbitmq.jms.parse.sql.SqlParseTree typedParseTree()
        Returns:
        the type-checked parse tree used for evaluation; null if evaluatorOk() is false.
      • evaluatorOk

        public boolean evaluatorOk()
        Description copied from interface: Evaluator
        This call is idempotent.
        Specified by:
        evaluatorOk in interface Evaluator
        Returns:
        true if the evaluator can run cleanly; false otherwise
      • getErrorMessage

        public java.lang.String getErrorMessage()
        Description copied from interface: Evaluator
        This call is idempotent.
        Specified by:
        getErrorMessage in interface Evaluator
        Returns:
        null if evaluatorOk() is false; otherwise an error message denoting the type of failure to initialise.