Examples of ASTPrinter


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

    catch ( Throwable t ) {
      throw new HibernateException( "Unable to parse order-by fragment", t );
    }

    if ( LOG.isTraceEnabled() ) {
      ASTPrinter printer = new ASTPrinter( OrderByTemplateTokenTypes.class );
      LOG.trace( printer.showAsString( parser.getAST(), "--- {order-by fragment} ---" ) );
    }

    // Render the parsed tree to text.
    OrderByFragmentRenderer renderer = new OrderByFragmentRenderer( context.getSessionFactory() );
    try {
View Full Code Here

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

    this.sessionFactoryHelper = new SessionFactoryHelper( sfi );
    this.literalProcessor = new LiteralProcessor( this );
    this.tokenReplacements = tokenReplacements;
    this.collectionFilterRole = collectionRole;
    this.hqlParser = parser;
    this.printer = new ASTPrinter( SqlTokenTypes.class );
  }
View Full Code Here

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

    catch ( Throwable t ) {
      throw new HibernateException( "Unable to parse order-by fragment", t );
    }

    if ( LOG.isTraceEnabled() ) {
      ASTPrinter printer = new ASTPrinter( OrderByTemplateTokenTypes.class );
      LOG.trace( printer.showAsString( parser.getAST(), "--- {order-by fragment} ---" ) );
    }

    OrderByFragmentRenderer renderer = new OrderByFragmentRenderer();
    try {
      renderer.orderByFragment( parser.getAST() );
View Full Code Here

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

    // Transform the tree.
    w.statement( hqlAst );

    if ( LOG.isDebugEnabled() ) {
      ASTPrinter printer = new ASTPrinter( SqlTokenTypes.class );
      LOG.debug( printer.showAsString( w.getAST(), "--- SQL AST ---" ) );
    }

    w.getParseErrorHandler().throwQueryException();

    return w;
View Full Code Here

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

    return parser;
  }

  void showHqlAst(AST hqlAst) {
    if ( LOG.isDebugEnabled() ) {
      ASTPrinter printer = new ASTPrinter( HqlTokenTypes.class );
      LOG.debug( printer.showAsString( hqlAst, "--- HQL AST ---" ) );
    }
  }
View Full Code Here

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

    // Transform the tree.
    w.statement( hqlAst );

    if ( LOG.isDebugEnabled() ) {
      ASTPrinter printer = new ASTPrinter( SqlTokenTypes.class );
      LOG.debug( printer.showAsString( w.getAST(), "--- SQL AST ---" ) );
    }

    w.getParseErrorHandler().throwQueryException();

    return w;
View Full Code Here

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

    return parser;
  }

  void showHqlAst(AST hqlAst) {
    if ( LOG.isDebugEnabled() ) {
      ASTPrinter printer = new ASTPrinter( HqlTokenTypes.class );
      LOG.debug( printer.showAsString( hqlAst, "--- HQL AST ---" ) );
    }
  }
View Full Code Here

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

    for ( AST n = firstChild; n != null; n = n.getNextSibling() ) {
      if ( n instanceof SelectExpression ) {
        list.add( n );
      }
      else {
        throw new IllegalStateException( "Unexpected AST: " + n.getClass().getName() + " " + new ASTPrinter( SqlTokenTypes.class ).showAsString( n, "" ) );
      }
    }
    return ( SelectExpression[] ) list.toArray( new SelectExpression[list.size()] );
  }
View Full Code Here

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

    this.sessionFactoryHelper = new SessionFactoryHelper( sfi );
    this.literalProcessor = new LiteralProcessor( this );
    this.tokenReplacements = tokenReplacements;
    this.collectionFilterRole = collectionRole;
    this.hqlParser = parser;
    this.printer = new ASTPrinter( SqlTokenTypes.class );
  }
View Full Code Here

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

    catch ( Throwable t ) {
      throw new HibernateException( "Unable to parse order-by fragment", t );
    }

    if ( LOG.isTraceEnabled() ) {
      ASTPrinter printer = new ASTPrinter( OrderByTemplateTokenTypes.class );
      LOG.trace( printer.showAsString( parser.getAST(), "--- {order-by fragment} ---" ) );
    }

    // Render the parsed tree to text.
    OrderByFragmentRenderer renderer = new OrderByFragmentRenderer( context.getSessionFactory() );
    try {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.