Package org.apache.cayenne.access.translator.select

## Class JoinStack

- java.lang.Object
- - org.apache.cayenne.access.translator.select.JoinStack

-     public class JoinStack
      extends Object

  Encapsulates join reuse/split logic used in SelectQuery processing. All expression path's that exist in the query (in the qualifier, etc.) are processed to produce a combined join tree.
  Since:
    3.0

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `protected JoinTreeNode` | `rootNode` |
    `protected JoinTreeNode` | `topNode` |

  - ### Constructor Summary

    Constructors
    Modifier | Constructor | Description
    --- | --- | ---
    `protected` | `JoinStack​(DbAdapter dbAdapter, QueryAssembler assembler)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected void` | `appendJoins​(StringBuilder out)` | Appends all configured joins to the provided output object.
    `protected void` | `appendJoinSubtree​(StringBuilder out, JoinTreeNode node)` |
    `protected void` | `appendQualifier​(StringBuilder out, boolean firstQualifierElement)` | Append join information to the qualifier - the part after "WHERE".
    `protected String` | `newAlias()` |
    `protected int` | `size()` | Returns the number of configured joins.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### rootNode

          protected JoinTreeNode rootNode

    - #### topNode

          protected JoinTreeNode topNode

  - ### Constructor Detail

    - #### JoinStack

          protected JoinStack​(DbAdapter dbAdapter,
                              QueryAssembler assembler)

  - ### Method Detail

    - #### size

          protected int size()

      Returns the number of configured joins.

    - #### appendJoins

          protected void appendJoins​(StringBuilder out)

      Appends all configured joins to the provided output object.

    - #### appendJoinSubtree

          protected void appendJoinSubtree​(StringBuilder out,
                                           JoinTreeNode node)

    - #### appendQualifier

          protected void appendQualifier​(StringBuilder out,
                                         boolean firstQualifierElement)

      Append join information to the qualifier - the part after "WHERE".

    - #### newAlias

          protected String newAlias()