public class JCRSQLQueryBuilder extends java.lang.Object implements JCRSQLParserVisitor
Modifier and Type | Method and Description |
---|---|
static QueryRootNode |
createQuery(java.lang.String statement,
NameResolver resolver,
QueryNodeFactory factory)
Creates a
QueryNode tree from a SQL statement
using the passed query node factory . |
static java.lang.String |
toString(QueryRootNode root,
NameResolver resolver)
Creates a String representation of the query node tree in SQL syntax.
|
java.lang.Object |
visit(ASTAndExpression node,
java.lang.Object data) |
java.lang.Object |
visit(ASTAscendingOrderSpec node,
java.lang.Object data) |
java.lang.Object |
visit(ASTBracketExpression node,
java.lang.Object data) |
java.lang.Object |
visit(ASTContainsExpression node,
java.lang.Object data) |
java.lang.Object |
visit(ASTDescendingOrderSpec node,
java.lang.Object data) |
java.lang.Object |
visit(ASTExcerptFunction node,
java.lang.Object data) |
java.lang.Object |
visit(ASTFromClause node,
java.lang.Object data) |
java.lang.Object |
visit(ASTIdentifier node,
java.lang.Object data) |
java.lang.Object |
visit(ASTLiteral node,
java.lang.Object data) |
java.lang.Object |
visit(ASTLowerFunction node,
java.lang.Object data) |
java.lang.Object |
visit(ASTNotExpression node,
java.lang.Object data) |
java.lang.Object |
visit(ASTOrderByClause node,
java.lang.Object data) |
java.lang.Object |
visit(ASTOrderSpec node,
java.lang.Object data) |
java.lang.Object |
visit(ASTOrExpression node,
java.lang.Object data) |
java.lang.Object |
visit(ASTPredicate node,
java.lang.Object data) |
java.lang.Object |
visit(ASTQuery node,
java.lang.Object data) |
java.lang.Object |
visit(ASTSelectList node,
java.lang.Object data) |
java.lang.Object |
visit(ASTUpperFunction node,
java.lang.Object data) |
java.lang.Object |
visit(ASTWhereClause node,
java.lang.Object data) |
java.lang.Object |
visit(SimpleNode node,
java.lang.Object data) |
public static QueryRootNode createQuery(java.lang.String statement, NameResolver resolver, QueryNodeFactory factory) throws InvalidQueryException
QueryNode
tree from a SQL statement
using the passed query node factory
.statement
- the SQL statement.resolver
- the namespace resolver to use.QueryNode
tree.InvalidQueryException
- if statement
is malformed.public static java.lang.String toString(QueryRootNode root, NameResolver resolver) throws InvalidQueryException
root
- the root of the query node tree.resolver
- to resolve QNames.InvalidQueryException
- if the query node tree cannot be converted
into a String representation due to restrictions in SQL.public java.lang.Object visit(SimpleNode node, java.lang.Object data)
visit
in interface JCRSQLParserVisitor
public java.lang.Object visit(ASTQuery node, java.lang.Object data)
visit
in interface JCRSQLParserVisitor
public java.lang.Object visit(ASTSelectList node, java.lang.Object data)
visit
in interface JCRSQLParserVisitor
public java.lang.Object visit(ASTFromClause node, java.lang.Object data)
visit
in interface JCRSQLParserVisitor
public java.lang.Object visit(ASTWhereClause node, java.lang.Object data)
visit
in interface JCRSQLParserVisitor
public java.lang.Object visit(ASTPredicate node, java.lang.Object data)
visit
in interface JCRSQLParserVisitor
public java.lang.Object visit(ASTOrExpression node, java.lang.Object data)
visit
in interface JCRSQLParserVisitor
public java.lang.Object visit(ASTAndExpression node, java.lang.Object data)
visit
in interface JCRSQLParserVisitor
public java.lang.Object visit(ASTNotExpression node, java.lang.Object data)
visit
in interface JCRSQLParserVisitor
public java.lang.Object visit(ASTBracketExpression node, java.lang.Object data)
visit
in interface JCRSQLParserVisitor
public java.lang.Object visit(ASTLiteral node, java.lang.Object data)
visit
in interface JCRSQLParserVisitor
public java.lang.Object visit(ASTIdentifier node, java.lang.Object data)
visit
in interface JCRSQLParserVisitor
public java.lang.Object visit(ASTOrderByClause node, java.lang.Object data)
visit
in interface JCRSQLParserVisitor
public java.lang.Object visit(ASTOrderSpec node, java.lang.Object data)
visit
in interface JCRSQLParserVisitor
public java.lang.Object visit(ASTAscendingOrderSpec node, java.lang.Object data)
visit
in interface JCRSQLParserVisitor
public java.lang.Object visit(ASTDescendingOrderSpec node, java.lang.Object data)
visit
in interface JCRSQLParserVisitor
public java.lang.Object visit(ASTContainsExpression node, java.lang.Object data)
visit
in interface JCRSQLParserVisitor
public java.lang.Object visit(ASTLowerFunction node, java.lang.Object data)
visit
in interface JCRSQLParserVisitor
public java.lang.Object visit(ASTUpperFunction node, java.lang.Object data)
visit
in interface JCRSQLParserVisitor
public java.lang.Object visit(ASTExcerptFunction node, java.lang.Object data)
visit
in interface JCRSQLParserVisitor
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"