Package org.castor.cpa.query.ejbql
Class EjbQLParserAdapter
- java.lang.Object
-
- org.castor.cpa.query.AbstractParser
-
- org.castor.cpa.query.ejbql.EjbQLParserAdapter
-
- All Implemented Interfaces:
Parser
public final class EjbQLParserAdapter extends AbstractParser
Class that implements abstract parser generator.- Since:
- 1.3
- Version:
- $Revision: 7121 $ $Date: 2006-04-25 16:09:10 -0600 (Tue, 25 Apr 2006) $
- Author:
- Udai Gupta, Ralf Joachim
-
-
Constructor Summary
Constructors Constructor Description EjbQLParserAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EjbQLParserTokenManager
createTkmgr(java.lang.String oql)
Creates the TokenManager instance.SimpleNode
getSimpleNode(java.lang.String oql)
Gets the root SimpleNode instance of JJTREE.QueryObject
parse(java.lang.String oql)
Parse the given OQL query string and return a tree of query objects that represent it.
-
-
-
Method Detail
-
parse
public QueryObject parse(java.lang.String oql) throws java.io.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:
java.io.UnsupportedEncodingException
ParseException
-
getSimpleNode
public SimpleNode getSimpleNode(java.lang.String oql) throws java.io.UnsupportedEncodingException, ParseException
Gets the root SimpleNode instance of JJTREE.- Parameters:
oql
- the query string- Returns:
- the root SimpleNode of JJTREE
- Throws:
java.io.UnsupportedEncodingException
- the unsupported encoding exceptionParseException
- the QL parse exception
-
createTkmgr
public EjbQLParserTokenManager createTkmgr(java.lang.String oql) throws java.io.UnsupportedEncodingException
Creates the TokenManager instance.- Parameters:
oql
- the query string- Returns:
- the castor ql parser token manager
- Throws:
java.io.UnsupportedEncodingException
- the unsupported encoding exception
-
-