Class CollectionExpressionStateObject

    • Constructor Detail

      • CollectionExpressionStateObject

        public CollectionExpressionStateObject​(StateObject parent,
                                               java.util.List<? extends StateObject> items)
        Creates a new CollectionExpressionStateObject.
        Parameters:
        parent - The parent of this state object, which cannot be null
        items - The list of children owned by this state object
        Throws:
        java.lang.NullPointerException - The given parent cannot be null
    • Method Detail

      • areChildrenEquivalent

        protected boolean areChildrenEquivalent​(CollectionExpressionStateObject stateObject)
        Determines whether the children of this StateObject are equivalent to the children of the given one, i.e. the information of the StateObjects is the same.
        Parameters:
        stateObject - The StateObject to compare its children to this one's children
        Returns:
        true if both have equivalent children; false otherwise
      • setExpression

        public void setExpression​(CollectionExpression expression)
        Keeps a reference of the parsed object object, which should only be done when this object is instantiated during the conversion of a parsed JPQL query into StateObjects.
        Parameters:
        expression - The parsed object representing a collection expression
      • toTextInternal

        protected void toTextInternal​(java.lang.Appendable writer)
                               throws java.io.IOException
        Prints out a string representation of this StateObject, which should not be used to define a true string representation of a JPQL query but should be used for debugging purposes.
        Specified by:
        toTextInternal in class AbstractStateObject
        Parameters:
        writer - The writer used to print out the string representation
        Throws:
        java.io.IOException - This should never happens, it is only required because Appendable is used instead of any concrete class