Class QueryBuilderConstraintForm

  • All Implemented Interfaces:
    java.io.Serializable

    public class QueryBuilderConstraintForm
    extends org.apache.struts.action.ActionForm
    The form used for editing QueryBuilder constraints
    Author:
    Mark Woodbridge, Thomas Riley
    See Also:
    Serialized Form
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addRange​(java.lang.String range)  
      java.lang.String getAttributeOp()
      Gets the value of attributeOp
      java.lang.String getAttributeOptions()
      Gets the value of attributeValue
      java.lang.String getAttributeValue()
      Gets the value of attributeValue
      java.lang.String getBagOp()
      Gets the value of bagOp
      java.lang.String getBagValue()
      Gets the value of bagValue
      java.lang.String getEditingConstraintCode()
      Get the constraint that is being edited or null if creating a new constraint.
      java.lang.String getExtraValue()
      Gets the value of extraValue
      java.lang.String getJoinType()  
      java.lang.String getLoopQueryOp()
      Gets the value of loopQueryOp
      java.lang.String getLoopQueryValue()
      Gets the value of loopQueryValue
      java.lang.String getMultiValueAttribute()
      Returs the value of multiValueAttribute
      java.lang.String getNullConstraint()
      Get the null/not null constraint value.
      java.lang.String getOperator()
      Get the operator.
      java.lang.String getPath()
      Gets the value of path
      java.lang.String getRangeConstraint()
      Get the range constraint value.
      java.lang.String getRangeOp()  
      java.util.Set<java.lang.String> getRanges()  
      java.lang.String getSubclassValue()
      Gets the value of subclassValue
      java.lang.String getSwitchable()
      Get the switchable value (on, off, locked).
      java.lang.String getTemplateLabel()
      Get the template label.
      java.lang.String getUseJoin()  
      boolean isEditable()
      Get the editable flag (when building a template).
      static java.lang.Object parseValue​(java.lang.String value, java.lang.Class<?> type, org.apache.struts.action.ActionMessages errors)
      Parse an attribute value
      void reset​(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request)
      void setAttributeOp​(java.lang.String attributeOp)
      Sets the value of attributeOp
      void setAttributeOptions​(java.lang.String attributeOptions)
      Sets the value of attributeOptions
      void setAttributeValue​(java.lang.String attributeValue)
      Sets the value of attributeValue
      void setBagOp​(java.lang.String bagOp)
      Sets the value of bagOp
      void setBagValue​(java.lang.String bagValue)
      Sets the value of bagValue
      void setEditable​(boolean editable)
      Set the editable flag (when building a template).
      void setEditingConstraintCode​(java.lang.String code)
      Set the code of an existing constraint that is being edited.
      void setExtraValue​(java.lang.String extraValue)
      Sets the value of extraValue
      void setJoinType​(java.lang.String joinType)  
      void setLoopQueryOp​(java.lang.String loopOp)
      Sets the value of loopQueryOp
      void setLoopQueryValue​(java.lang.String loopQuery)
      Sets the value of loopQueryValue
      void setMultiValueAttribute​(java.lang.String multiValueAttribute)
      Sets the value of multiValueAttribute, a string representing the values selected by the user separated by a comma.
      void setNullConstraint​(java.lang.String nullConstraint)
      Set the null/not null constraint.
      void setOperator​(java.lang.String operator)
      Set the operator, "and" or "or"
      void setPath​(java.lang.String path)
      Sets the value of path
      void setRangeConstraint​(java.lang.String rangeConstraint)
      Set the range constraint value.
      void setRangeOp​(java.lang.String rangeOp)  
      void setSubclassValue​(java.lang.String subclassValue)
      Sets the value of subclassValue
      void setSwitchable​(java.lang.String switchable)  
      void setTemplateLabel​(java.lang.String templateLabel)
      Set the template label.
      void setUseJoin​(java.lang.String useJoin)  
      org.apache.struts.action.ActionErrors validate​(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request)
      • Methods inherited from class org.apache.struts.action.ActionForm

        getMultipartRequestHandler, getServlet, getServletWrapper, reset, setMultipartRequestHandler, setServlet, validate
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • bagOp

        protected java.lang.String bagOp
      • bagValue

        protected java.lang.String bagValue
      • attributeOp

        protected java.lang.String attributeOp
      • attributeValue

        protected java.lang.String attributeValue
      • attributeOptions

        protected java.lang.String attributeOptions
      • extraValue

        protected java.lang.String extraValue
      • multiValueAttribute

        protected java.lang.String multiValueAttribute
      • subclassValue

        protected java.lang.String subclassValue
      • loopQueryOp

        protected java.lang.String loopQueryOp
      • loopQueryValue

        protected java.lang.String loopQueryValue
      • joinType

        protected java.lang.String joinType
      • useJoin

        protected java.lang.String useJoin
      • path

        protected java.lang.String path
      • operator

        protected java.lang.String operator
      • nullConstraint

        protected java.lang.String nullConstraint
      • rangeOp

        protected java.lang.String rangeOp
      • rangeConstraint

        protected java.lang.String rangeConstraint
      • ranges

        protected java.util.Set<java.lang.String> ranges
      • editable

        protected boolean editable
      • templateLabel

        protected java.lang.String templateLabel
      • switchable

        protected java.lang.String switchable
    • Constructor Detail

      • QueryBuilderConstraintForm

        public QueryBuilderConstraintForm()
    • Method Detail

      • setEditingConstraintCode

        public void setEditingConstraintCode​(java.lang.String code)
        Set the code of an existing constraint that is being edited.
        Parameters:
        code - the code of the constraint in the query
      • getEditingConstraintCode

        public java.lang.String getEditingConstraintCode()
        Get the constraint that is being edited or null if creating a new constraint.
        Returns:
        the constraint being edited or null
      • getLoopQueryOp

        public java.lang.String getLoopQueryOp()
        Gets the value of loopQueryOp
        Returns:
        the value of loopQueryOp
      • setLoopQueryOp

        public void setLoopQueryOp​(java.lang.String loopOp)
        Sets the value of loopQueryOp
        Parameters:
        loopOp - Value to assign to loopQueryOp
      • getLoopQueryValue

        public java.lang.String getLoopQueryValue()
        Gets the value of loopQueryValue
        Returns:
        the value of loopQueryValue
      • setLoopQueryValue

        public void setLoopQueryValue​(java.lang.String loopQuery)
        Sets the value of loopQueryValue
        Parameters:
        loopQuery - value to assign to loopQueryValue
      • getBagOp

        public java.lang.String getBagOp()
        Gets the value of bagOp
        Returns:
        the value of bagOp
      • setBagOp

        public void setBagOp​(java.lang.String bagOp)
        Sets the value of bagOp
        Parameters:
        bagOp - Value to assign to bagOp
      • getBagValue

        public java.lang.String getBagValue()
        Gets the value of bagValue
        Returns:
        the value of bagValue
      • setBagValue

        public void setBagValue​(java.lang.String bagValue)
        Sets the value of bagValue
        Parameters:
        bagValue - value to assign to bagValue
      • getAttributeOp

        public java.lang.String getAttributeOp()
        Gets the value of attributeOp
        Returns:
        the value of attributeOp
      • setAttributeOp

        public void setAttributeOp​(java.lang.String attributeOp)
        Sets the value of attributeOp
        Parameters:
        attributeOp - value to assign to attributeOp
      • getAttributeValue

        public java.lang.String getAttributeValue()
        Gets the value of attributeValue
        Returns:
        the value of attributeValue
      • setAttributeValue

        public void setAttributeValue​(java.lang.String attributeValue)
        Sets the value of attributeValue
        Parameters:
        attributeValue - value to assign to attributeValue
      • getExtraValue

        public java.lang.String getExtraValue()
        Gets the value of extraValue
        Returns:
        the value of extraValue
      • setExtraValue

        public void setExtraValue​(java.lang.String extraValue)
        Sets the value of extraValue
        Parameters:
        extraValue - the value to assign to extraValue
      • getMultiValueAttribute

        public java.lang.String getMultiValueAttribute()
        Returs the value of multiValueAttribute
        Returns:
        a String rapresenting the value of multiValueAttribute
      • setMultiValueAttribute

        public void setMultiValueAttribute​(java.lang.String multiValueAttribute)
        Sets the value of multiValueAttribute, a string representing the values selected by the user separated by a comma.
        Parameters:
        multiValueAttribute - the value to assign to multiValueAttribute
      • getAttributeOptions

        public java.lang.String getAttributeOptions()
        Gets the value of attributeValue
        Returns:
        the value of attributeValue
      • setAttributeOptions

        public void setAttributeOptions​(java.lang.String attributeOptions)
        Sets the value of attributeOptions
        Parameters:
        attributeOptions - value to assign to attributeOptions
      • getSubclassValue

        public java.lang.String getSubclassValue()
        Gets the value of subclassValue
        Returns:
        the value of subclassValue
      • setSubclassValue

        public void setSubclassValue​(java.lang.String subclassValue)
        Sets the value of subclassValue
        Parameters:
        subclassValue - value to assign to subclassValue
      • getPath

        public java.lang.String getPath()
        Gets the value of path
        Returns:
        the value of path
      • setPath

        public void setPath​(java.lang.String path)
        Sets the value of path
        Parameters:
        path - value to assign to path
      • getOperator

        public java.lang.String getOperator()
        Get the operator.
        Returns:
        "and" or "or"
      • setOperator

        public void setOperator​(java.lang.String operator)
        Set the operator, "and" or "or"
        Parameters:
        operator - the operator
      • getNullConstraint

        public java.lang.String getNullConstraint()
        Get the null/not null constraint value. Returned value will be either "NULL" or "NotNULL".
        Returns:
        null/not null constraint value
      • setNullConstraint

        public void setNullConstraint​(java.lang.String nullConstraint)
        Set the null/not null constraint. Parameter should be either "NULL" or "NotNULL".
        Parameters:
        nullConstraint - null/not null constraint
      • setRangeConstraint

        public void setRangeConstraint​(java.lang.String rangeConstraint)
        Set the range constraint value. Will be one or more ranges separated by commas
        Parameters:
        rangeConstraint - the range constraint value
      • getRangeConstraint

        public java.lang.String getRangeConstraint()
        Get the range constraint value. Will be one or more ranges separated by commas
        Returns:
        the range constraint value
      • getRanges

        public java.util.Set<java.lang.String> getRanges()
        Returns:
        the ranges to constrain by, e.g. 2R:123..456
      • addRange

        public void addRange​(java.lang.String range)
        Parameters:
        range - the range to constrain by, e.g. 2R:123..456
      • getRangeOp

        public java.lang.String getRangeOp()
        Returns:
        the operator for this range constraint, e.g. OVERLAPS
      • setRangeOp

        public void setRangeOp​(java.lang.String rangeOp)
        Parameters:
        rangeOp - the operator for this range constraint, e.g. OVERLAPS
      • getTemplateLabel

        public java.lang.String getTemplateLabel()
        Get the template label.
        Returns:
        the template label
      • setTemplateLabel

        public void setTemplateLabel​(java.lang.String templateLabel)
        Set the template label.
        Parameters:
        templateLabel - the template label
      • getJoinType

        public java.lang.String getJoinType()
        Returns:
        the joinType
      • setJoinType

        public void setJoinType​(java.lang.String joinType)
        Parameters:
        joinType - the joinType to set
      • getUseJoin

        public java.lang.String getUseJoin()
        Returns:
        the useJoin
      • setUseJoin

        public void setUseJoin​(java.lang.String useJoin)
        Parameters:
        useJoin - the useJoin to set
      • isEditable

        public boolean isEditable()
        Get the editable flag (when building a template).
        Returns:
        whether this constraint is editable
      • setEditable

        public void setEditable​(boolean editable)
        Set the editable flag (when building a template).
        Parameters:
        editable - whether or not this constraint should be editable
      • getSwitchable

        public java.lang.String getSwitchable()
        Get the switchable value (on, off, locked).
        Returns:
        switchable
      • setSwitchable

        public void setSwitchable​(java.lang.String switchable)
        Parameters:
        switchable - the switchable values (on, off, locked) to set
      • validate

        public org.apache.struts.action.ActionErrors validate​(org.apache.struts.action.ActionMapping mapping,
                                                              javax.servlet.http.HttpServletRequest request)
        Overrides:
        validate in class org.apache.struts.action.ActionForm
      • parseValue

        public static java.lang.Object parseValue​(java.lang.String value,
                                                  java.lang.Class<?> type,
                                                  org.apache.struts.action.ActionMessages errors)
        Parse an attribute value
        Parameters:
        value - the value as a String
        type - the type of the parsed value
        errors - ActionErrors to which any parse errors are added
        Returns:
        the parsed value
      • reset

        public void reset​(org.apache.struts.action.ActionMapping mapping,
                          javax.servlet.http.HttpServletRequest request)
        Overrides:
        reset in class org.apache.struts.action.ActionForm