org.objectweb.jonas_ejb.lib
Class EjbqlAbstractVisitor

java.lang.Object
  |
  +--org.objectweb.jonas_ejb.lib.EjbqlAbstractVisitor
All Implemented Interfaces:
EJBQLVisitor
Direct Known Subclasses:
EjbqlQueryFilterVisitor, EjbqlSelectVisitor, EjbqlVariableVisitor

public class EjbqlAbstractVisitor
extends java.lang.Object
implements EJBQLVisitor

Base class with visitor utility class and default implementation of visit methods Created on Sep 12, 2002

Author:
Christophe Ney [cney@batisseurs.com]

Inner Class Summary
protected  class EjbqlAbstractVisitor.IdValue
          Values associated with each declared identifiers
protected  class EjbqlAbstractVisitor.VisitorException
          Runtime Exception used to wrap exceptions thrown in visit methods
 
Constructor Summary
EjbqlAbstractVisitor()
           
 
Method Summary
protected  org.objectweb.medor.api.Field getMedorFieldFromPath(java.lang.String path, java.util.Map ids)
          return the JormField for a given path (hjoanin note: Is this method useful ?
protected  java.lang.String mergePath(java.lang.String[] path, int begin, int length)
           
protected  java.lang.String[] splitPath(java.lang.String path)
          split a dot separated path into tokens
 java.lang.Object visit(ASTAbstractSchemaName node, java.lang.Object data)
          null implementation of the visit method for the corresponding parameter type
 java.lang.Object visit(ASTArithmeticExpression node, java.lang.Object data)
          null implementation of the visit method for the corresponding parameter type
 java.lang.Object visit(ASTArithmeticFactor node, java.lang.Object data)
          null implementation of the visit method for the corresponding parameter type
 java.lang.Object visit(ASTArithmeticLiteral node, java.lang.Object data)
          null implementation of the visit method for the corresponding parameter type
 java.lang.Object visit(ASTArithmeticTerm node, java.lang.Object data)
          null implementation of the visit method for the corresponding parameter type
 java.lang.Object visit(ASTBetweenExpression node, java.lang.Object data)
          null implementation of the visit method for the corresponding parameter type
 java.lang.Object visit(ASTBooleanExpression node, java.lang.Object data)
          null implementation of the visit method for the corresponding parameter type
 java.lang.Object visit(ASTBooleanLiteral node, java.lang.Object data)
          null implementation of the visit method for the corresponding parameter type
 java.lang.Object visit(ASTCollectionMemberDeclaration node, java.lang.Object data)
          null implementation of the visit method for the corresponding parameter type
 java.lang.Object visit(ASTCollectionMemberExpression node, java.lang.Object data)
          null implementation of the visit method for the corresponding parameter type
 java.lang.Object visit(ASTCollectionValuedPathExpression node, java.lang.Object data)
          null implementation of the visit method for the corresponding parameter type
 java.lang.Object visit(ASTComparisonExpression node, java.lang.Object data)
          null implementation of the visit method for the corresponding parameter type
 java.lang.Object visit(ASTConditionalExpression node, java.lang.Object data)
          null implementation of the visit method for the corresponding parameter type
 java.lang.Object visit(ASTConditionalFactor node, java.lang.Object data)
          null implementation of the visit method for the corresponding parameter type
 java.lang.Object visit(ASTConditionalTerm node, java.lang.Object data)
          null implementation of the visit method for the corresponding parameter type
 java.lang.Object visit(ASTDatetimeExpression node, java.lang.Object data)
          null implementation of the visit method for the corresponding parameter type
 java.lang.Object visit(ASTEJBQL node, java.lang.Object data)
          null implementation of the visit method for the corresponding parameter type
 java.lang.Object visit(ASTEmptyCollectionComparisonExpression node, java.lang.Object data)
          null implementation of the visit method for the corresponding parameter type
 java.lang.Object visit(ASTEntityBeanExpression node, java.lang.Object data)
          null implementation of the visit method for the corresponding parameter type
 java.lang.Object visit(ASTFromClause node, java.lang.Object data)
          null implementation of the visit method for the corresponding parameter type
 java.lang.Object visit(ASTFunctionsReturningNumerics node, java.lang.Object data)
          null implementation of the visit method for the corresponding parameter type
 java.lang.Object visit(ASTFunctionsReturningStrings node, java.lang.Object data)
          null implementation of the visit method for the corresponding parameter type
 java.lang.Object visit(ASTIdentificationVariable node, java.lang.Object data)
          null implementation of the visit method for the corresponding parameter type
 java.lang.Object visit(ASTIdentifier node, java.lang.Object data)
          null implementation of the visit method for the corresponding parameter type
 java.lang.Object visit(ASTInExpression node, java.lang.Object data)
          null implementation of the visit method for the corresponding parameter type
 java.lang.Object visit(ASTInputParameter node, java.lang.Object data)
          null implementation of the visit method for the corresponding parameter type
 java.lang.Object visit(ASTLikeExpression node, java.lang.Object data)
          null implementation of the visit method for the corresponding parameter type
 java.lang.Object visit(ASTNullComparisonExpression node, java.lang.Object data)
          null implementation of the visit method for the corresponding parameter type
 java.lang.Object visit(ASTPath node, java.lang.Object data)
          null implementation of the visit method for the corresponding parameter type
 java.lang.Object visit(ASTRangeVariableDeclaration node, java.lang.Object data)
          null implementation of the visit method for the corresponding parameter type
 java.lang.Object visit(ASTSelectClause node, java.lang.Object data)
          null implementation of the visit method for the corresponding parameter type
 java.lang.Object visit(ASTSingleValuedNavigation node, java.lang.Object data)
          null implementation of the visit method for the corresponding parameter type
 java.lang.Object visit(ASTSingleValuedPathExpression node, java.lang.Object data)
          null implementation of the visit method for the corresponding parameter type
 java.lang.Object visit(ASTStringExpression node, java.lang.Object data)
          null implementation of the visit method for the corresponding parameter type
 java.lang.Object visit(ASTStringLiteral node, java.lang.Object data)
          null implementation of the visit method for the corresponding parameter type
 java.lang.Object visit(ASTWhereClause node, java.lang.Object data)
          null implementation of the visit method for the corresponding parameter type
 java.lang.Object visit(SimpleNode node)
          Visit method to call from constructor.
 java.lang.Object visit(SimpleNode node, java.lang.Object data)
          Generic visit method that traverses all child nodes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EjbqlAbstractVisitor

public EjbqlAbstractVisitor()
Method Detail

splitPath

protected java.lang.String[] splitPath(java.lang.String path)
split a dot separated path into tokens

mergePath

protected java.lang.String mergePath(java.lang.String[] path,
                                     int begin,
                                     int length)

getMedorFieldFromPath

protected org.objectweb.medor.api.Field getMedorFieldFromPath(java.lang.String path,
                                                              java.util.Map ids)
                                                       throws org.objectweb.medor.api.MedorException,
                                                              ParseException
return the JormField for a given path (hjoanin note: Is this method useful ? It seems to be called anywhere)
Parameters:
path - the path of the JormField to return
ids - the map of (id,QueryTree)pairs;
Throws:
ParseException - if identification variable not found.
org.objectweb.medor.api.MedorException - if corresponding fielc does not exist

visit

public java.lang.Object visit(SimpleNode node)
                       throws java.lang.Exception
Visit method to call from constructor. Child node visitors get a java.util.Stack as data parameter.
Throws:
java.lang.Exception - any nested exception thrown from other visit method

visit

public java.lang.Object visit(SimpleNode node,
                              java.lang.Object data)
Generic visit method that traverses all child nodes
Specified by:
visit in interface EJBQLVisitor

visit

public java.lang.Object visit(ASTEJBQL node,
                              java.lang.Object data)
null implementation of the visit method for the corresponding parameter type
Specified by:
visit in interface EJBQLVisitor

visit

public java.lang.Object visit(ASTFromClause node,
                              java.lang.Object data)
null implementation of the visit method for the corresponding parameter type
Specified by:
visit in interface EJBQLVisitor

visit

public java.lang.Object visit(ASTCollectionMemberDeclaration node,
                              java.lang.Object data)
null implementation of the visit method for the corresponding parameter type
Specified by:
visit in interface EJBQLVisitor

visit

public java.lang.Object visit(ASTRangeVariableDeclaration node,
                              java.lang.Object data)
null implementation of the visit method for the corresponding parameter type
Specified by:
visit in interface EJBQLVisitor

visit

public java.lang.Object visit(ASTSingleValuedPathExpression node,
                              java.lang.Object data)
null implementation of the visit method for the corresponding parameter type
Specified by:
visit in interface EJBQLVisitor

visit

public java.lang.Object visit(ASTSingleValuedNavigation node,
                              java.lang.Object data)
null implementation of the visit method for the corresponding parameter type
Specified by:
visit in interface EJBQLVisitor

visit

public java.lang.Object visit(ASTCollectionValuedPathExpression node,
                              java.lang.Object data)
null implementation of the visit method for the corresponding parameter type
Specified by:
visit in interface EJBQLVisitor

visit

public java.lang.Object visit(ASTSelectClause node,
                              java.lang.Object data)
null implementation of the visit method for the corresponding parameter type
Specified by:
visit in interface EJBQLVisitor

visit

public java.lang.Object visit(ASTWhereClause node,
                              java.lang.Object data)
null implementation of the visit method for the corresponding parameter type
Specified by:
visit in interface EJBQLVisitor

visit

public java.lang.Object visit(ASTConditionalExpression node,
                              java.lang.Object data)
null implementation of the visit method for the corresponding parameter type
Specified by:
visit in interface EJBQLVisitor

visit

public java.lang.Object visit(ASTConditionalTerm node,
                              java.lang.Object data)
null implementation of the visit method for the corresponding parameter type
Specified by:
visit in interface EJBQLVisitor

visit

public java.lang.Object visit(ASTConditionalFactor node,
                              java.lang.Object data)
null implementation of the visit method for the corresponding parameter type
Specified by:
visit in interface EJBQLVisitor

visit

public java.lang.Object visit(ASTBetweenExpression node,
                              java.lang.Object data)
null implementation of the visit method for the corresponding parameter type
Specified by:
visit in interface EJBQLVisitor

visit

public java.lang.Object visit(ASTInExpression node,
                              java.lang.Object data)
null implementation of the visit method for the corresponding parameter type
Specified by:
visit in interface EJBQLVisitor

visit

public java.lang.Object visit(ASTLikeExpression node,
                              java.lang.Object data)
null implementation of the visit method for the corresponding parameter type
Specified by:
visit in interface EJBQLVisitor

visit

public java.lang.Object visit(ASTNullComparisonExpression node,
                              java.lang.Object data)
null implementation of the visit method for the corresponding parameter type
Specified by:
visit in interface EJBQLVisitor

visit

public java.lang.Object visit(ASTEmptyCollectionComparisonExpression node,
                              java.lang.Object data)
null implementation of the visit method for the corresponding parameter type
Specified by:
visit in interface EJBQLVisitor

visit

public java.lang.Object visit(ASTCollectionMemberExpression node,
                              java.lang.Object data)
null implementation of the visit method for the corresponding parameter type
Specified by:
visit in interface EJBQLVisitor

visit

public java.lang.Object visit(ASTComparisonExpression node,
                              java.lang.Object data)
null implementation of the visit method for the corresponding parameter type
Specified by:
visit in interface EJBQLVisitor

visit

public java.lang.Object visit(ASTArithmeticExpression node,
                              java.lang.Object data)
null implementation of the visit method for the corresponding parameter type
Specified by:
visit in interface EJBQLVisitor

visit

public java.lang.Object visit(ASTArithmeticTerm node,
                              java.lang.Object data)
null implementation of the visit method for the corresponding parameter type
Specified by:
visit in interface EJBQLVisitor

visit

public java.lang.Object visit(ASTArithmeticFactor node,
                              java.lang.Object data)
null implementation of the visit method for the corresponding parameter type
Specified by:
visit in interface EJBQLVisitor

visit

public java.lang.Object visit(ASTStringExpression node,
                              java.lang.Object data)
null implementation of the visit method for the corresponding parameter type
Specified by:
visit in interface EJBQLVisitor

visit

public java.lang.Object visit(ASTDatetimeExpression node,
                              java.lang.Object data)
null implementation of the visit method for the corresponding parameter type
Specified by:
visit in interface EJBQLVisitor

visit

public java.lang.Object visit(ASTBooleanExpression node,
                              java.lang.Object data)
null implementation of the visit method for the corresponding parameter type
Specified by:
visit in interface EJBQLVisitor

visit

public java.lang.Object visit(ASTEntityBeanExpression node,
                              java.lang.Object data)
null implementation of the visit method for the corresponding parameter type
Specified by:
visit in interface EJBQLVisitor

visit

public java.lang.Object visit(ASTFunctionsReturningStrings node,
                              java.lang.Object data)
null implementation of the visit method for the corresponding parameter type
Specified by:
visit in interface EJBQLVisitor

visit

public java.lang.Object visit(ASTFunctionsReturningNumerics node,
                              java.lang.Object data)
null implementation of the visit method for the corresponding parameter type
Specified by:
visit in interface EJBQLVisitor

visit

public java.lang.Object visit(ASTAbstractSchemaName node,
                              java.lang.Object data)
null implementation of the visit method for the corresponding parameter type
Specified by:
visit in interface EJBQLVisitor

visit

public java.lang.Object visit(ASTIdentificationVariable node,
                              java.lang.Object data)
null implementation of the visit method for the corresponding parameter type
Specified by:
visit in interface EJBQLVisitor

visit

public java.lang.Object visit(ASTIdentifier node,
                              java.lang.Object data)
null implementation of the visit method for the corresponding parameter type
Specified by:
visit in interface EJBQLVisitor

visit

public java.lang.Object visit(ASTPath node,
                              java.lang.Object data)
null implementation of the visit method for the corresponding parameter type
Specified by:
visit in interface EJBQLVisitor

visit

public java.lang.Object visit(ASTStringLiteral node,
                              java.lang.Object data)
null implementation of the visit method for the corresponding parameter type
Specified by:
visit in interface EJBQLVisitor

visit

public java.lang.Object visit(ASTArithmeticLiteral node,
                              java.lang.Object data)
null implementation of the visit method for the corresponding parameter type
Specified by:
visit in interface EJBQLVisitor

visit

public java.lang.Object visit(ASTBooleanLiteral node,
                              java.lang.Object data)
null implementation of the visit method for the corresponding parameter type
Specified by:
visit in interface EJBQLVisitor

visit

public java.lang.Object visit(ASTInputParameter node,
                              java.lang.Object data)
null implementation of the visit method for the corresponding parameter type
Specified by:
visit in interface EJBQLVisitor