Class PropertyCondition

  • All Implemented Interfaces:
    Serializable

    public class PropertyCondition
    extends Object
    implements Serializable
    The PropertyCondition class provides support for searching against a single property using a single comparison mechanism, or for nesting further SearchProperties. The use of nestedConditions is mutually exclusive with the use of the property, operator, value construct.
    See Also:
    Serialized Form
    • Constructor Detail

      • PropertyCondition

        public PropertyCondition()
        Typical constructor
      • PropertyCondition

        public PropertyCondition​(PropertyCondition templateProperties)
        Copy/clone constructor.
        Parameters:
        templateProperties - template object to copy.
    • Method Detail

      • getProperty

        public String getProperty()
        Retrieve the name of the property being compared.
        Returns:
        String
      • setProperty

        public void setProperty​(String property)
        Set the name of the property to compare.
        Parameters:
        property - name of the property to compare
      • getOperator

        public PropertyComparisonOperator getOperator()
        Retrieve the operator to use for the comparison.
        Returns:
        SearchOperator
      • setOperator

        public void setOperator​(PropertyComparisonOperator operator)
        Set the operator to use for the comparison.
        Parameters:
        operator - to use for the comparison
      • getValue

        public InstancePropertyValue getValue()
        Retrieve the value of the property against which to compare.
        Returns:
        InstancePropertyValue
      • setValue

        public void setValue​(InstancePropertyValue value)
        Set the value of the property against which to compare.
        Parameters:
        value - against which to compare
      • getNestedConditions

        public SearchProperties getNestedConditions()
        Retrieve any nested conditions.
        Returns:
        SearchProperties
      • setNestedConditions

        public void setNestedConditions​(SearchProperties nestedConditions)
        Set any nested conditions.
        Parameters:
        nestedConditions - conditions to nest
      • toString

        public String toString()
        Standard toString method.
        Overrides:
        toString in class Object
        Returns:
        JSON style description of variables.
      • equals

        public boolean equals​(Object objectToCompare)
        Validate that an object is equal depending on their stored values.
        Overrides:
        equals in class Object
        Parameters:
        objectToCompare - object
        Returns:
        boolean result
      • hashCode

        public int hashCode()
        Return a hash code based on the property values
        Overrides:
        hashCode in class Object
        Returns:
        int hash code