Class SimpleStateObject

    • Constructor Detail

      • SimpleStateObject

        protected SimpleStateObject​(StateObject parent)
        Creates a new SimpleStateObject.
        Parameters:
        parent - The parent of this state object, which cannot be null
        Throws:
        NullPointerException - The given parent cannot be null
      • SimpleStateObject

        protected SimpleStateObject​(StateObject parent,
                                    String text)
        Creates a new SimpleStateObject.
        Parameters:
        parent - The parent of this state object, which cannot be null
        text - The text held by this state object
        Throws:
        NullPointerException - The given parent cannot be null
    • Method Detail

      • getText

        public String getText()
        Returns the text held by this state object.
        Returns:
        This model's text value
      • hasText

        public boolean hasText()
        Determines whether this state object is holding a non-empty string.
        Returns:
        true if the text is non-empty; false otherwise
      • setText

        public void setText​(String text)
        Sets the text held by this state object.
        Parameters:
        text - This model's text value
      • setTextInternally

        protected void setTextInternally​(String text)
        Sets the text to the given value without notifying the listeners.
        Parameters:
        text - This model's text value
      • toTextInternal

        protected void toTextInternal​(Appendable writer)
                               throws IOException
        Description copied from class: AbstractStateObject
        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:
        IOException - This should never happens, it is only required because Appendable is used instead of any concrete class