Top Description Fields Constructors Methods
org.hibernate.sql.ast

public Class SqlTreePrinter

extends Object
Class Inheritance
Imports
java.util.List, org.hibernate.sql.ast.tree.SqlAstTreeLogger, .Statement, org.hibernate.sql.ast.tree.delete.DeleteStatement, org.hibernate.sql.ast.tree.from.FromClause, .FunctionTableReference, .NamedTableReference, .QueryPartTableReference, .TableGroup, .TableGroupJoin, .TableReferenceJoin, .ValuesTableReference, org.hibernate.sql.ast.tree.insert.InsertSelectStatement, .InsertStatement, org.hibernate.sql.ast.tree.select.QueryGroup, .QueryPart, .QuerySpec, .SelectStatement, org.hibernate.sql.ast.tree.update.UpdateStatement

Logs a debug representation of the SQL AST.

Implementation Note

At the moment, we only render the from-elements.

Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private final StringBuffer
private int

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private void
private void
logNode(String text, Runnable subTreeHandler)

private void
logNode(String text, Runnable subTreeHandler, boolean indentContinuation)

public static void
logSqlAst(Statement sqlAstStatement)

private void
private void
private void
private void
logWithIndentation(String pattern, Object arg1, Object arg2)

private void
logWithIndentation(String pattern, Object arg1, Object arg2, Object arg3)

private void
pad(int depth)

private String
private void
private void
private void
private void
private void
visitStatement(Statement sqlAstStatement)

private void
private void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bufferback to summary
private final StringBuffer buffer
depthback to summary
private int depth

Constructor Detail

SqlTreePrinterback to summary
private SqlTreePrinter()

Method Detail

logNodeback to summary
private void logNode(String text)
logNodeback to summary
private void logNode(String text, Runnable subTreeHandler)
logNodeback to summary
private void logNode(String text, Runnable subTreeHandler, boolean indentContinuation)
logSqlAstback to summary
public static void logSqlAst(Statement sqlAstStatement)
logTableGroupDetailsback to summary
private void logTableGroupDetails(TableGroup tableGroup)
logWithIndentationback to summary
private void logWithIndentation(Object line)
logWithIndentationback to summary
private void logWithIndentation(String pattern, Object arg1)
logWithIndentationback to summary
private void logWithIndentation(String pattern, Object arg1, Object arg2)
logWithIndentationback to summary
private void logWithIndentation(String pattern, Object arg1, Object arg2, Object arg3)
padback to summary
private void pad(int depth)
toDisplayTextback to summary
private String toDisplayText(TableGroup tableGroup)
visitFromClauseback to summary
private void visitFromClause(FromClause fromClause)
visitQueryGroupback to summary
private void visitQueryGroup(QueryGroup queryGroup)
visitQueryPartback to summary
private void visitQueryPart(QueryPart queryPart)
visitQuerySpecback to summary
private void visitQuerySpec(QuerySpec querySpec)
visitStatementback to summary
private void visitStatement(Statement sqlAstStatement)
visitTableGroupback to summary
private void visitTableGroup(TableGroup tableGroup)
visitTableGroupJoinback to summary
private void visitTableGroupJoin(TableGroupJoin tableGroupJoin)