Best code examples for Hibernate ORM ASTPrinter class (org.hibernate.hql.internal.ast.util.ASTPrinter)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Hibernate ORM ASTPrinter class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Hibernate ORM ASTPrinter examples from Open Source projects
This code example shows how to use the following methods: showAsString
		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() ); 
		} 
		catch ( HibernateException e ) { 
			throw e; 
		} 
		catch ( Throwable t ) { 
			throw new HibernateException( "Unable to render parsed order-by fragment", t ); 
		} 
 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods:
 */ 
public class OrderByFragmentRenderer extends GeneratedOrderByFragmentRenderer { 
 
    private static final CoreMessageLogger LOG = Logger.getMessageLogger(CoreMessageLogger.class, 
                                                                       OrderByFragmentRenderer.class.getName()); 
	private static final ASTPrinter printer = new ASTPrinter( GeneratedOrderByFragmentRendererTokenTypes.class ); 
 
	@Override 
    protected void out(AST ast) { 
		out( ( ( Node ) ast ).getRenderableText() ); 
	} 
 
 
	// handle trace logging ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
 
    private int traceDepth = 0; 
 
	@Override 
    public void traceIn(String ruleName, AST tree) { 
		if ( inputState.guessing > 0 ) { 
Full Snippet Info
4
CodeRank
See Code Examples for Hibernate ORM ASTPrinter Methods: