| java.lang.Object org.objectweb.jonas_ejb.lib.EjbqlAbstractVisitor
All known Subclasses: org.objectweb.jonas_ejb.lib.EjbqlQueryFilterVisitor, org.objectweb.jonas_ejb.lib.EjbqlLimitVisitor, org.objectweb.jonas_ejb.lib.EjbqlVariableVisitor, org.objectweb.jonas_ejb.lib.EjbqlSelectVisitor, org.objectweb.jonas_ejb.lib.EjbqlOrderByVisitor,
EjbqlAbstractVisitor | public class EjbqlAbstractVisitor implements EJBQLVisitor(Code) | | Base class with visitor utility class and default implementation of
visit methods
Created on Sep 12, 2002
author: Christophe Ney [cney@batisseurs.com]: Initial developer author: Helene Joanin: Add the toString() method to IdValue. author: Helene Joanin: Add some utility methods as endsWith(), basePath(). author: Helene Joanin: Take into account the ORDER BY clause. author: Helene Joanin: Take into account the EJBQL version 2.1 syntax. |
Inner Class :protected class IdValue | |
Method Summary | |
protected String[] | basePath(String[] path) merge the first tokens into a dot separated path. | protected boolean | endsWith(String[] path, String suffix) | protected String | mergePath(String[] path, int begin, int length) | protected String | mergePath(String[] path) | protected String[] | splitPath(String path) | public Object | visit(SimpleNode node) Visit method to call from constructor. | public Object | visit(SimpleNode node, Object data) | public Object | visit(ASTEJBQL node, Object data) | public Object | visit(ASTFromClause node, Object data) | public Object | visit(ASTCollectionMemberDeclaration node, Object data) | public Object | visit(ASTRangeVariableDeclaration node, Object data) | public Object | visit(ASTSingleValuedPathExpression node, Object data) | public Object | visit(ASTCmpPathExpression node, Object data) | public Object | visit(ASTSingleValuedCmrPathExpression node, Object data) | public Object | visit(ASTCollectionValuedPathExpression node, Object data) | public Object | visit(ASTSelectClause node, Object data) | public Object | visit(ASTSelectExpression node, Object data) | public Object | visit(ASTAggregateSelectExpression node, Object data) | public Object | visit(ASTOrderByClause node, Object data) | public Object | visit(ASTOrderByItem node, Object data) | public Object | visit(ASTLimitClause node, Object data) | public Object | visit(ASTLimitExpression node, Object data) | public Object | visit(ASTWhereClause node, Object data) | public Object | visit(ASTConditionalExpression node, Object data) | public Object | visit(ASTConditionalTerm node, Object data) | public Object | visit(ASTConditionalFactor node, Object data) | public Object | visit(ASTBetweenExpression node, Object data) | public Object | visit(ASTInExpression node, Object data) | public Object | visit(ASTLikeExpression node, Object data) | public Object | visit(ASTNullComparisonExpression node, Object data) | public Object | visit(ASTEmptyCollectionComparisonExpression node, Object data) | public Object | visit(ASTCollectionMemberExpression node, Object data) | public Object | visit(ASTComparisonExpression node, Object data) | public Object | visit(ASTArithmeticExpression node, Object data) | public Object | visit(ASTIntegerLiteral node, Object data) | public Object | visit(ASTFloatingPointLiteral node, Object data) | public Object | visit(ASTArithmeticTerm node, Object data) | public Object | visit(ASTArithmeticFactor node, Object data) | public Object | visit(ASTStringExpression node, Object data) | public Object | visit(ASTDatetimeExpression node, Object data) | public Object | visit(ASTBooleanExpression node, Object data) | public Object | visit(ASTEntityBeanExpression node, Object data) | public Object | visit(ASTFunctionsReturningStrings node, Object data) | public Object | visit(ASTFunctionsReturningNumerics node, Object data) | public Object | visit(ASTAbstractSchemaName node, Object data) | public Object | visit(ASTIdentificationVariable node, Object data) | public Object | visit(ASTIdentifier node, Object data) | public Object | visit(ASTPath node, Object data) | public Object | visit(ASTLiteral node, Object data) | public Object | visit(ASTStringLiteral node, Object data) | public Object | visit(ASTArithmeticLiteral node, Object data) | public Object | visit(ASTBooleanLiteral node, Object data) | public Object | visit(ASTInputParameter node, Object data) |
basePath | protected String[] basePath(String[] path)(Code) | | merge the first tokens into a dot separated path.
(The last token is left)
Parameters: path - the input path the base path |
endsWith | protected boolean endsWith(String[] path, String suffix)(Code) | | Parameters: path - the input path Parameters: suffix - the input suffix true if the last token of the path is equal to the suffix. |
mergePath | protected String mergePath(String[] path, int begin, int length)(Code) | | Parameters: path - the input path Parameters: begin - the beginning index Parameters: length - the length the merge of the tokens (from the begin index to the (begin+length) index into a dot separated path |
mergePath | protected String mergePath(String[] path)(Code) | | Parameters: path - the input path the merge tokens into a dot separated path |
splitPath | protected String[] splitPath(String path)(Code) | | split a dot separated path into tokens
Parameters: path - the input path the splitted path |
visit | public Object visit(SimpleNode node) throws Exception(Code) | | Visit method to call from constructor.
Child node visitors get a java.util.Stack as data parameter.
Parameters: node - the node to visit the stack throws: Exception - any nested exception thrown from other visit method |
visit | public Object visit(SimpleNode node, Object data)(Code) | | Generic visit method that traverses all child nodes
Parameters: node - the node to visit Parameters: data - the current stack the stack |
visit | public Object visit(ASTEJBQL node, Object data)(Code) | | null implementation of the visit method for the corresponding parameter type
Parameters: node - the node to visit Parameters: data - the current stack null |
visit | public Object visit(ASTFromClause node, Object data)(Code) | | null implementation of the visit method for the corresponding parameter type
Parameters: node - the node to visit Parameters: data - the current stack null |
visit | public Object visit(ASTRangeVariableDeclaration node, Object data)(Code) | | null implementation of the visit method for the corresponding parameter type
Parameters: node - the node to visit Parameters: data - the current stack null |
visit | public Object visit(ASTCmpPathExpression node, Object data)(Code) | | null implementation of the visit method for the corresponding parameter type
Parameters: node - the node to visit Parameters: data - the current stack null |
visit | public Object visit(ASTSelectClause node, Object data)(Code) | | null implementation of the visit method for the corresponding parameter type
Parameters: node - the node to visit Parameters: data - the current stack null |
visit | public Object visit(ASTSelectExpression node, Object data)(Code) | | null implementation of the visit method for the corresponding parameter type
Parameters: node - the node to visit Parameters: data - the current stack null |
visit | public Object visit(ASTAggregateSelectExpression node, Object data)(Code) | | null implementation of the visit method for the corresponding parameter type
Parameters: node - the node to visit Parameters: data - the current stack null |
visit | public Object visit(ASTOrderByClause node, Object data)(Code) | | null implementation of the visit method for the corresponding parameter type
Parameters: node - the node to visit Parameters: data - the current stack null |
visit | public Object visit(ASTOrderByItem node, Object data)(Code) | | null implementation of the visit method for the corresponding parameter type
Parameters: node - the node to visit Parameters: data - the current stack null |
visit | public Object visit(ASTLimitClause node, Object data)(Code) | | null implementation of the visit method for the corresponding parameter type
Parameters: node - the node to visit Parameters: data - the current stack null |
visit | public Object visit(ASTLimitExpression node, Object data)(Code) | | null implementation of the visit method for the corresponding parameter type
Parameters: node - the node to visit Parameters: data - the current stack null |
visit | public Object visit(ASTWhereClause node, Object data)(Code) | | null implementation of the visit method for the corresponding parameter type
Parameters: node - the node to visit Parameters: data - the current stack null |
visit | public Object visit(ASTConditionalExpression node, Object data)(Code) | | null implementation of the visit method for the corresponding parameter type
Parameters: node - the node to visit Parameters: data - the current stack null |
visit | public Object visit(ASTConditionalTerm node, Object data)(Code) | | null implementation of the visit method for the corresponding parameter type
Parameters: node - the node to visit Parameters: data - the current stack null |
visit | public Object visit(ASTConditionalFactor node, Object data)(Code) | | null implementation of the visit method for the corresponding parameter type
Parameters: node - the node to visit Parameters: data - the current stack null |
visit | public Object visit(ASTBetweenExpression node, Object data)(Code) | | null implementation of the visit method for the corresponding parameter type
Parameters: node - the node to visit Parameters: data - the current stack null |
visit | public Object visit(ASTInExpression node, Object data)(Code) | | null implementation of the visit method for the corresponding parameter type
Parameters: node - the node to visit Parameters: data - the current stack null |
visit | public Object visit(ASTLikeExpression node, Object data)(Code) | | null implementation of the visit method for the corresponding parameter type
Parameters: node - the node to visit Parameters: data - the current stack null |
visit | public Object visit(ASTNullComparisonExpression node, Object data)(Code) | | null implementation of the visit method for the corresponding parameter type
Parameters: node - the node to visit Parameters: data - the current stack null |
visit | public Object visit(ASTComparisonExpression node, Object data)(Code) | | null implementation of the visit method for the corresponding parameter type
Parameters: node - the node to visit Parameters: data - the current stack null |
visit | public Object visit(ASTArithmeticExpression node, Object data)(Code) | | null implementation of the visit method for the corresponding parameter type
Parameters: node - the node to visit Parameters: data - the current stack null |
visit | public Object visit(ASTIntegerLiteral node, Object data)(Code) | | null implementation of the visit method for the corresponding parameter type
Parameters: node - the node to visit Parameters: data - the current stack null |
visit | public Object visit(ASTFloatingPointLiteral node, Object data)(Code) | | null implementation of the visit method for the corresponding parameter type
Parameters: node - the node to visit Parameters: data - the current stack null |
visit | public Object visit(ASTArithmeticTerm node, Object data)(Code) | | null implementation of the visit method for the corresponding parameter type
Parameters: node - the node to visit Parameters: data - the current stack null |
visit | public Object visit(ASTArithmeticFactor node, Object data)(Code) | | null implementation of the visit method for the corresponding parameter type
Parameters: node - the node to visit Parameters: data - the current stack null |
visit | public Object visit(ASTStringExpression node, Object data)(Code) | | null implementation of the visit method for the corresponding parameter type
Parameters: node - the node to visit Parameters: data - the current stack null |
visit | public Object visit(ASTDatetimeExpression node, Object data)(Code) | | null implementation of the visit method for the corresponding parameter type
Parameters: node - the node to visit Parameters: data - the current stack null |
visit | public Object visit(ASTBooleanExpression node, Object data)(Code) | | null implementation of the visit method for the corresponding parameter type
Parameters: node - the node to visit Parameters: data - the current stack null |
visit | public Object visit(ASTEntityBeanExpression node, Object data)(Code) | | null implementation of the visit method for the corresponding parameter type
Parameters: node - the node to visit Parameters: data - the current stack null |
visit | public Object visit(ASTFunctionsReturningStrings node, Object data)(Code) | | null implementation of the visit method for the corresponding parameter type
Parameters: node - the node to visit Parameters: data - the current stack null |
visit | public Object visit(ASTAbstractSchemaName node, Object data)(Code) | | null implementation of the visit method for the corresponding parameter type
Parameters: node - the node to visit Parameters: data - the current stack null |
visit | public Object visit(ASTIdentificationVariable node, Object data)(Code) | | null implementation of the visit method for the corresponding parameter type
Parameters: node - the node to visit Parameters: data - the current stack null |
visit | public Object visit(ASTIdentifier node, Object data)(Code) | | null implementation of the visit method for the corresponding parameter type
Parameters: node - the node to visit Parameters: data - the current stack null |
visit | public Object visit(ASTPath node, Object data)(Code) | | null implementation of the visit method for the corresponding parameter type
Parameters: node - the node to visit Parameters: data - the current stack null |
visit | public Object visit(ASTLiteral node, Object data)(Code) | | null implementation of the visit method for the corresponding parameter type
Parameters: node - the node to visit Parameters: data - the current stack null |
visit | public Object visit(ASTStringLiteral node, Object data)(Code) | | null implementation of the visit method for the corresponding parameter type
Parameters: node - the node to visit Parameters: data - the current stack null |
visit | public Object visit(ASTArithmeticLiteral node, Object data)(Code) | | null implementation of the visit method for the corresponding parameter type
Parameters: node - the node to visit Parameters: data - the current stack null |
visit | public Object visit(ASTBooleanLiteral node, Object data)(Code) | | null implementation of the visit method for the corresponding parameter type
Parameters: node - the node to visit Parameters: data - the current stack null |
visit | public Object visit(ASTInputParameter node, Object data)(Code) | | null implementation of the visit method for the corresponding parameter type
Parameters: node - the node to visit Parameters: data - the current stack null |
|
|