Interface QueryTreeBuilder
- All Known Implementing Classes:
QueryBuilder,QueryBuilder
public interface QueryTreeBuilder
Specifies an interface for a query tree builder.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanReturnstrueif this query tree builder can handle a statement inlanguage.createQueryTree(String statement, NameResolver resolver, QueryNodeFactory factory) Creates aQueryNodetree from a statement using the passed query node factory.String[]Returns the set of query languages supported by this builder.toString(QueryRootNode root, NameResolver resolver) Creates a String representation of the query node tree in the syntax thisQueryTreeBuildercan handle.
-
Method Details
-
createQueryTree
QueryRootNode createQueryTree(String statement, NameResolver resolver, QueryNodeFactory factory) throws InvalidQueryException Creates aQueryNodetree from a statement using the passed query node factory.- Parameters:
statement- the statement.resolver- the name resolver to use.factory- the query node factory to use.- Returns:
- the
QueryNodetree for the statement. - Throws:
InvalidQueryException- if the statement is malformed.
-
canHandle
Returnstrueif this query tree builder can handle a statement inlanguage.- Parameters:
language- the language of a query statement to build a query tree.- Returns:
trueif this builder can handlelanguage;falseotherwise.
-
getSupportedLanguages
String[] getSupportedLanguages()Returns the set of query languages supported by this builder.- Returns:
- String array containing the names of the supported languages.
-
toString
Creates a String representation of the query node tree in the syntax thisQueryTreeBuildercan handle.- Parameters:
root- the root of the query node tree.resolver- to resolve Names.- Returns:
- a String representation of the query node tree.
- Throws:
InvalidQueryException- if the query node tree cannot be converted into a String representation due to restrictions in this syntax.
-