org.objectweb.jonas_ejb.deployment.ejbql
Class AssertQueryHelper

java.lang.Object
  |
  +--junit.framework.Assert
        |
        +--org.objectweb.jonas_ejb.deployment.ejbql.AssertQueryHelper

public class AssertQueryHelper
extends junit.framework.Assert

Helper used to check the validity of query parsing

Author:
Christophe Ney - cney@batisseurs.com

Constructor Summary
AssertQueryHelper()
           
 
Method Summary
static org.objectweb.jonas_ejb.deployment.ejbql.SimpleNode checkParserFor(java.lang.String query)
          Check the validity of the parsing for a given query.So far, the validation consists in performing a first parsing, counting the nodes of the obtained lexical tree, creating a new string representation of the query from the lexical tree, parsing this string again and comparing the number of nodes of the last tree with the first one.
 
Methods inherited from class junit.framework.Assert
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssertQueryHelper

public AssertQueryHelper()
Method Detail

checkParserFor

public static org.objectweb.jonas_ejb.deployment.ejbql.SimpleNode checkParserFor(java.lang.String query)
                                                                          throws java.lang.Exception
Check the validity of the parsing for a given query.So far, the validation consists in performing a first parsing, counting the nodes of the obtained lexical tree, creating a new string representation of the query from the lexical tree, parsing this string again and comparing the number of nodes of the last tree with the first one.
Parameters:
query - the string containing the EJBQL query
Returns:
the root node of the lexical tree representing the EJBQL query