Class Query

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

    public class Query
    extends Node
    The query class
    See Also:
    Serialized Form
    • Constructor Detail

      • Query

        public Query​(java.lang.String formula,
                     java.lang.String comment)
        Constructor
        Parameters:
        formula - - The formula string
        comment - - The comment string
      • Query

        public Query()
        Constructor
    • Method Detail

      • addQueryListener

        public void addQueryListener​(QueryListener l)
      • removeQueryListener

        public void removeQueryListener​(QueryListener l)
      • getFormula

        public java.lang.String getFormula()
        Get the query property
        Returns:
        The property string
      • getComment

        public java.lang.String getComment()
        Get the comment of the query
        Returns:
        The comment string
      • setFormula

        public void setFormula​(java.lang.String formula)
      • setComment

        public void setComment​(java.lang.String comment)
      • setFormulaAndComment

        public void setFormulaAndComment​(java.lang.String formula,
                                         java.lang.String comment)
        Set the comment and query property. Should be called for redo/undo.
        Parameters:
        formula - - the property formula
        comment - - the user comment
      • setResult

        public void setResult​(QueryResult r)
        Set the result
        Parameters:
        r - the result containing status, errors and messages.
      • getResult

        public QueryResult getResult()
        Get the status of the query
        Returns:
        status - checked or not checked?
      • getShortFormula

        public java.lang.String getShortFormula()
        Get the short property without line breaks
        Returns:
        short property
      • accept

        public void accept​(Visitor visitor)
                    throws java.lang.Exception
        Query property has a visitor
        Overrides:
        accept in class Node
        Parameters:
        visitor - - The visitor
        Throws:
        java.lang.Exception - the visitor threw an exception.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object