// get the parser
JBossQLParser parser = new JBossQLParser(new StringReader(""));
try {
// parse the ejbql into an abstract sytax tree
ASTEJBQL ejbqlNode = parser.parse(catalog, parameterTypes, ejbql);
// translate to sql
sql = ejbqlNode.jjtAccept(this, new StringBuffer()).toString();
if (log.isTraceEnabled()) {
log.trace("ejbql: " + ejbql);
log.trace("sql: " + sql);
}