org.apache.jackrabbit.commons.query.sql2
Class Parser

java.lang.Object
  extended by org.apache.jackrabbit.commons.query.sql2.Parser
Direct Known Subclasses:
Parser

public class Parser
extends Object

The SQL2 parser can convert a JCR-SQL2 query to a QueryObjectModel.


Constructor Summary
Parser(QueryObjectModelFactory factory, ValueFactory valueFactory)
          Create a new parser.
 
Method Summary
 QueryObjectModel createQueryObjectModel(String query)
          Parse a JCR-SQL2 query and return the query object model
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Parser

public Parser(QueryObjectModelFactory factory,
              ValueFactory valueFactory)
Create a new parser. A parser can be re-used, but it is not thread safe.

Parameters:
factory - the query object model factory
valueFactory - the value factory
Method Detail

createQueryObjectModel

public QueryObjectModel createQueryObjectModel(String query)
                                        throws RepositoryException
Parse a JCR-SQL2 query and return the query object model

Parameters:
query - the query string
Returns:
the query object model
Throws:
RepositoryException - if parsing failed


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