public class QuerySpaceTreePrinter
extends java.lang.Object
QuerySpaces graph as a tree structure.
Intended for use in debugging, logging, etc.| Modifier and Type | Field and Description |
|---|---|
static QuerySpaceTreePrinter |
INSTANCE
Singleton access
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
asString(QuerySpaces spaces,
AliasResolutionContext aliasResolutionContext)
Returns a String containing the
QuerySpaces graph as a tree structure. |
java.lang.String |
asString(QuerySpaces spaces,
int depth,
AliasResolutionContext aliasResolutionContext)
Returns a String containing the
QuerySpaces graph as a tree structure, starting
at a particular depth. |
java.lang.String |
extractDetails(QuerySpace space)
Returns a String containing high-level details about the
QuerySpace, such as:
query space class name
unique ID
entity name (for EntityQuerySpace
collection role (for CollectionQuerySpace *
|
void |
write(QuerySpaces spaces,
int depth,
AliasResolutionContext aliasResolutionContext,
java.io.PrintStream printStream)
Returns a String containing the
QuerySpaces graph as a tree structure, starting
at a particular depth. |
void |
write(QuerySpaces spaces,
int depth,
AliasResolutionContext aliasResolutionContext,
java.io.PrintWriter printWriter)
Returns a String containing the
QuerySpaces graph as a tree structure, starting
at a particular depth. |
public static final QuerySpaceTreePrinter INSTANCE
public java.lang.String asString(QuerySpaces spaces, AliasResolutionContext aliasResolutionContext)
QuerySpaces graph as a tree structure.spaces - The QuerySpaces object.aliasResolutionContext - The context for resolving table and column aliases
for the QuerySpace references in spaces; if null,
table and column aliases are not included in returned value..QuerySpaces graph as a tree structure.public java.lang.String asString(QuerySpaces spaces, int depth, AliasResolutionContext aliasResolutionContext)
QuerySpaces graph as a tree structure, starting
at a particular depth.
The value for depth indicates the number of indentations that will
prefix all lines in the returned String. Root query spaces will be written with depth + 1
and the depth will be further incremented as joined query spaces are traversed.
An indentation is defined as the number of characters defined by TreePrinterHelper.INDENTATION.spaces - The QuerySpaces object.depth - The intial number of indentationsaliasResolutionContext - The context for resolving table and column aliases
for the QuerySpace references in spaces; if null,
table and column aliases are not included in returned value..QuerySpaces graph as a tree structure.public void write(QuerySpaces spaces, int depth, AliasResolutionContext aliasResolutionContext, java.io.PrintStream printStream)
QuerySpaces graph as a tree structure, starting
at a particular depth.
The value for depth indicates the number of indentations that will
prefix all lines in the returned String. Root query spaces will be written with depth + 1
and the depth will be further incremented as joined query spaces are traversed.
An indentation is defined as the number of characters defined by TreePrinterHelper.INDENTATION.spaces - The QuerySpaces object.depth - The intial number of indentationsaliasResolutionContext - The context for resolving table and column aliases
for the QuerySpace references in spaces; if null,
table and column aliases are not included in returned value.printStream - The print stream for writing.public void write(QuerySpaces spaces, int depth, AliasResolutionContext aliasResolutionContext, java.io.PrintWriter printWriter)
QuerySpaces graph as a tree structure, starting
at a particular depth.
The value for depth indicates the number of indentations that will
prefix all lines in the returned String. Root query spaces will be written with depth + 1
and the depth will be further incremented as joined query spaces are traversed.
An indentation is defined as the number of characters defined by TreePrinterHelper.INDENTATION.spaces - The QuerySpaces object.depth - The intial number of indentationsaliasResolutionContext - The context for resolving table and column aliases
for the QuerySpace references in spaces; if null,
table and column aliases are not included in returned value.printWriter - The print writer for writing.public java.lang.String extractDetails(QuerySpace space)
QuerySpace, such as:
EntityQuerySpaceCollectionQuerySpacespace - The query spaceQuerySpaceCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.