public class QueryBuilder extends java.lang.Object implements QueryTreeBuilder
Constructor and Description |
---|
QueryBuilder() |
Modifier and Type | Method and Description |
---|---|
boolean |
canHandle(java.lang.String language)
Returns
true if this query tree builder can handle a
statement in language . |
QueryRootNode |
createQueryTree(java.lang.String statement,
NameResolver resolver,
QueryNodeFactory factory)
Creates a
QueryNode tree from a statement using the passed
query node factory. |
java.lang.String[] |
getSupportedLanguages()
This builder supports
Query#SQL . |
java.lang.String |
toString(QueryRootNode root,
NameResolver resolver)
Creates a String representation of the query node tree in the syntax this
QueryTreeBuilder can handle. |
public QueryRootNode createQueryTree(java.lang.String statement, NameResolver resolver, QueryNodeFactory factory) throws InvalidQueryException
QueryNode
tree from a statement using the passed
query node factory.createQueryTree
in interface QueryTreeBuilder
statement
- the statement.resolver
- the name resolver to use.factory
- the query node factory to use.QueryNode
tree for the statement.InvalidQueryException
public boolean canHandle(java.lang.String language)
true
if this query tree builder can handle a
statement in language
.canHandle
in interface QueryTreeBuilder
language
- the language of a query statement to build a query tree.true
if this builder can handle language
;
false
otherwise.public java.lang.String[] getSupportedLanguages()
Query#SQL
.
Returns the set of query languages supported by this builder.getSupportedLanguages
in interface QueryTreeBuilder
public java.lang.String toString(QueryRootNode root, NameResolver resolver) throws InvalidQueryException
QueryTreeBuilder
can handle.toString
in interface QueryTreeBuilder
root
- the root of the query node tree.resolver
- to resolve Names.InvalidQueryException
- if the query node tree cannot be converted
into a String representation due to
restrictions in this syntax."Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"