Class QuerySpaceTreePrinter


  • public class QuerySpaceTreePrinter
    extends Object
    Prints a QuerySpaces graph as a tree structure.

    Intended for use in debugging, logging, etc.

    • Method Detail

      • asString

        public String asString​(QuerySpaces spaces,
                               AliasResolutionContext aliasResolutionContext)
        Returns a String containing the QuerySpaces graph as a tree structure.
        Parameters:
        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..
        Returns:
        the String containing the QuerySpaces graph as a tree structure.
      • asString

        public String asString​(QuerySpaces spaces,
                               int depth,
                               AliasResolutionContext aliasResolutionContext)
        Returns a String containing the 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.
        Parameters:
        spaces - The QuerySpaces object.
        depth - The initial number of indentations
        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..
        Returns:
        the String containing the QuerySpaces graph as a tree structure.
      • write

        public void write​(QuerySpaces spaces,
                          int depth,
                          AliasResolutionContext aliasResolutionContext,
                          PrintStream printStream)
        Returns a String containing the 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.
        Parameters:
        spaces - The QuerySpaces object.
        depth - The initial number of indentations
        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.
        printStream - The print stream for writing.
      • write

        public void write​(QuerySpaces spaces,
                          int depth,
                          AliasResolutionContext aliasResolutionContext,
                          PrintWriter printWriter)
        Returns a String containing the 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.
        Parameters:
        spaces - The QuerySpaces object.
        depth - The initial number of indentations
        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.
        printWriter - The print writer for writing.