jrun.ejb.ejbql
Interface Operator

All Superinterfaces:
Element
All Known Implementing Classes:
OperatorBase

public interface Operator
extends Element

Behavior common to all EJBQL operators.

Author:
Enrique Duvos

Fields inherited from interface jrun.ejb.ejbql.Element
UNSPECIFIED_TRAVERSAL_ORDER
 
Method Summary
 void acceptOperatorExpression(Visitor visitor, OperatorExpression operatorExpr)
          In certain cases, an operator expression will delegate to an operator to perform the dispatch to the appropriate visitor method.
 java.util.Iterator getPrintStrings(java.util.Vector expressions)
          Return the operator strings to be used to print out the entire expression.
 java.lang.String getResultType(java.util.Vector expressions)
          The stringified version of the java Class type that results from applying the operator to the given set of expressions.
 boolean isBinary()
           
 boolean isFunction()
           
 boolean isNary()
           
 boolean isUnary()
           
 boolean operatesOn(java.util.Vector expressions)
          True if an operator can be applied to a given set of expressions.
 
Methods inherited from interface jrun.ejb.ejbql.Element
accept, getChildren
 

Method Detail

acceptOperatorExpression

public void acceptOperatorExpression(Visitor visitor,
                                     OperatorExpression operatorExpr)
In certain cases, an operator expression will delegate to an operator to perform the dispatch to the appropriate visitor method.

operatesOn

public boolean operatesOn(java.util.Vector expressions)
True if an operator can be applied to a given set of expressions. E.g. The Plus operator can only operate on exactly two expressions, each of which has numeric type.

getResultType

public java.lang.String getResultType(java.util.Vector expressions)
The stringified version of the java Class type that results from applying the operator to the given set of expressions.

getPrintStrings

public java.util.Iterator getPrintStrings(java.util.Vector expressions)
Return the operator strings to be used to print out the entire expression. Might be multiple strings, e.g. Expr1 BETWEEN Expr2 AND Expr3 print strings = { "BETWEEN", "AND" }

isUnary

public boolean isUnary()

isBinary

public boolean isBinary()

isNary

public boolean isNary()

isFunction

public boolean isFunction()


Copyright � 2002 Macromedia Corporation. All Rights Reserved.