Class ConditionType

  • All Implemented Interfaces:
    Serializable

    public class ConditionType
    extends MetadataItem
    ConditionTypes define new conditions that can be applied to items (for example to decide whether a rule needs to be triggered or if a profile is considered as taking part in a campaign) or to perform queries against the stored unomi data. They may be implemented in Java when attempting to define a particularly complex test or one that can better be optimized by coding it. They may also be defined as combination of other conditions. A simple condition could be: “User is male”, while a more generic condition with parameters may test whether a given property has a specific value: “User property x has value y”.
    See Also:
    Serialized Form
    • Constructor Detail

      • ConditionType

        public ConditionType()
        Instantiates a new Condition type.
      • ConditionType

        public ConditionType​(Metadata metadata)
        Instantiates a new Condition type with the specified metadata
        Parameters:
        metadata - the metadata
    • Method Detail

      • getConditionEvaluator

        public String getConditionEvaluator()
        Retrieves the condition evaluator.
        Returns:
        the condition evaluator
      • setConditionEvaluator

        public void setConditionEvaluator​(String conditionEvaluator)
        Sets the condition evaluator.
        Parameters:
        conditionEvaluator - the condition evaluator
      • getQueryBuilder

        public String getQueryBuilder()
        Retrieves the query builder.
        Returns:
        the query builder
      • setQueryBuilder

        public void setQueryBuilder​(String queryBuilder)
        Sets the query builder.
        Parameters:
        queryBuilder - the query builder
      • getParentCondition

        public Condition getParentCondition()
        Retrieves the parent condition.
        Returns:
        the parent condition
      • setParentCondition

        public void setParentCondition​(Condition parentCondition)
        Sets the parent condition.
        Parameters:
        parentCondition - the parent condition
      • getParameters

        public List<Parameter> getParameters()
        Retrieves the defined Parameters for this ConditionType.
        Returns:
        a List of the defined Parameters for this ConditionType
      • setParameters

        public void setParameters​(List<Parameter> parameters)
        Sets the List of the defined Parameters for this ConditionType.
        Parameters:
        parameters - a List of the defined Parameters for this ConditionType
      • equals

        public boolean equals​(Object o)
        Overrides:
        equals in class Item
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Item