Package org.hibernate.hql.ast.util

Examples of org.hibernate.hql.ast.util.ASTPrinter


  public void testSimpleTree() throws Exception {
    String input = "select foo from foo in class org.hibernate.test.Foo, fee in class org.hibernate.test.Fee where foo.dependent = fee order by foo.string desc, foo.component.count asc, fee.id";
    HqlParser parser = HqlParser.getInstance( input );
    parser.statement();
    AST ast = parser.getAST();
    ASTPrinter printer = new ASTPrinter( HqlTokenTypes.class );
    printer.showAst( ast, new PrintWriter( System.out ) );
    ASTIterator iterator = new ASTIterator( ast );
    int count = 0;
    while ( iterator.hasNext() ) {
      assertTrue( iterator.next() instanceof AST );
      count++;
View Full Code Here


  public void testSimpleTree() throws Exception {
    String input = "select foo from foo in class org.hibernate.test.Foo, fee in class org.hibernate.test.Fee where foo.dependent = fee order by foo.string desc, foo.component.count asc, fee.id";
    HqlParser parser = HqlParser.getInstance( input );
    parser.statement();
    AST ast = parser.getAST();
    ASTPrinter printer = new ASTPrinter( HqlTokenTypes.class );
    printer.showAst( ast, new PrintWriter( System.out ) );
    ASTIterator iterator = new ASTIterator( ast );
    int count = 0;
    while ( iterator.hasNext() ) {
      assertTrue( iterator.next() instanceof AST );
      count++;
View Full Code Here

TOP

Related Classes of org.hibernate.hql.ast.util.ASTPrinter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.