org.apache.jackrabbit.core.query.sql
Class JCRSQLQueryBuilder

java.lang.Object
  extended byorg.apache.jackrabbit.core.query.sql.JCRSQLQueryBuilder

public class JCRSQLQueryBuilder
extends Object

Implements the query builder for the JCR SQL syntax.


Method Summary
static QueryRootNode createQuery(String statement, NamespaceResolver resolver)
          Creates a QueryNode tree from a SQL statement.
static String toString(QueryRootNode root, NamespaceResolver resolver)
          Creates a String representation of the query node tree in SQL syntax.
 Object visit(SimpleNode node, Object data)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createQuery

public static QueryRootNode createQuery(String statement,
                                        NamespaceResolver resolver)
                                 throws InvalidQueryException
Creates a QueryNode tree from a SQL statement.

Parameters:
statement - the SQL statement.
resolver - the namespace resolver to use.
Returns:
the QueryNode tree.
Throws:
InvalidQueryException - if statement is malformed.

toString

public static String toString(QueryRootNode root,
                              NamespaceResolver resolver)
                       throws InvalidQueryException
Creates a String representation of the query node tree in SQL syntax.

Parameters:
root - the root of the query node tree.
resolver - to resolve QNames.
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 SQL.

visit

public Object visit(SimpleNode node,
                    Object data)


Copyright © 2004-2006 The Apache Software Foundation. All Rights Reserved.