org.castor.cpa.query.castorql
Class CastorQLParserAdapter

java.lang.Object
  extended by org.castor.cpa.query.AbstractParser
      extended by org.castor.cpa.query.castorql.CastorQLParserAdapter
All Implemented Interfaces:
Parser

public final class CastorQLParserAdapter
extends AbstractParser

Class that implements abstract parser generator.

Since:
1.3
Version:
$Revision: 8994 $ $Date: 2011-08-02 01:40:59 +0200 (Di, 02 Aug 2011) $
Author:
Udai Gupta, Ralf Joachim

Constructor Summary
CastorQLParserAdapter()
           
 
Method Summary
 CastorQLParserTokenManager createTkmgr(String oql)
          Creates the TokenManager instance.
 SimpleNode getSimpleNode(String oql)
          Gets the root SimpleNode instance of JJTREE.
 QueryObject parse(String oql)
          Parse the given OQL query string and return a tree of query objects that represent it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CastorQLParserAdapter

public CastorQLParserAdapter()
Method Detail

parse

public QueryObject parse(String oql)
                  throws UnsupportedEncodingException,
                         ParseException
Parse the given OQL query string and return a tree of query objects that represent it.

Parameters:
oql - OQL query string passed to the parser generator.
Returns:
Tree of query objects that represent the query.
Throws:
UnsupportedEncodingException
ParseException
ParseException - If query is invalid.

getSimpleNode

public SimpleNode getSimpleNode(String oql)
                         throws UnsupportedEncodingException,
                                ParseException
Gets the root SimpleNode instance of JJTREE.

Parameters:
oql - the query string
Returns:
the root SimpleNode of JJTREE
Throws:
UnsupportedEncodingException - the unsupported encoding exception of query string
ParseException - the QL parse exception
ParseException

createTkmgr

public CastorQLParserTokenManager createTkmgr(String oql)
                                       throws UnsupportedEncodingException
Creates the TokenManager instance.

Parameters:
oql - the query string
Returns:
the castor ql parser token manager
Throws:
UnsupportedEncodingException - the unsupported encoding exception


Copyright © 2012. All Rights Reserved.