Class ConnectByClause

  • All Implemented Interfaces:

    public final class ConnectByClause
    extends AbstractExpression
    The CONNECT BY clause allows selecting rows in a hierarchical order using the hierarchical query clause. CONNECT BY specifies the relationship between parent rows and child rows of the hierarchy.
    BNF: connectby_clause ::= CONNECT BY { single_valued_object_path_expression | collection_valued_path_expression }

    Pascal Filion
    • Constructor Detail

      • ConnectByClause

        public ConnectByClause​(AbstractExpression parent)
        Creates a new ConnectByClause.
        parent - The parent of this expression
    • Method Detail

      • getActualIdentifier

        public String getActualIdentifier()
        Returns the actual CONNECT BY identifier found in the string representation of the JPQL query, which has the actual case that was used.
        The CONNECT BY identifier that was actually parsed, or an empty string if it was not parsed
      • getExpression

        public Expression getExpression()
        Returns the Expression representing the relationship expression.
        The expression representing the relationship expression
      • hasExpression

        public boolean hasExpression()
        Determines whether the relationship expression was parsed.
        true if the relationship expression was parsed; false if it was not parsed
      • hasSpaceAfterConnectBy

        public boolean hasSpaceAfterConnectBy()
        Determines whether a whitespace was found after CONNECT BY.
        true if there was a whitespace after CONNECT BY; false otherwise
      • parse

        protected void parse​(WordParser wordParser,
                             boolean tolerant)
        Description copied from class: AbstractExpression
        Parses the query by starting at the current position, which is part of the given WordParser.
        Specified by:
        parse in class AbstractExpression
        wordParser - The text to parse based on the current position of the cursor
        tolerant - Determines whether the parsing system should be tolerant, meaning if it should try to parse invalid or incomplete queries
      • toParsedText

        protected void toParsedText​(StringBuilder writer,
                                    boolean actual)
        Description copied from class: AbstractExpression
        Generates a string representation of this Expression, including its children, if it has any.
        Specified by:
        toParsedText in class AbstractExpression
        writer - The buffer used to append this Expression's string representation
        actual - Determines whether the string representation should represent what was parsed, i.e. include any "virtual" whitespace (such as ending whitespace) and the actual case of the JPQL identifiers