Package org.apache.unomi.api.conditions
Class ConditionType
- java.lang.Object
-
- org.apache.unomi.api.Item
-
- org.apache.unomi.api.MetadataItem
-
- org.apache.unomi.api.conditions.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
-
-
Field Summary
Fields Modifier and Type Field Description static String
ITEM_TYPE
-
Fields inherited from class org.apache.unomi.api.MetadataItem
metadata
-
-
Constructor Summary
Constructors Constructor Description ConditionType()
Instantiates a new Condition type.ConditionType(Metadata metadata)
Instantiates a new Condition type with the specified metadata
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
String
getConditionEvaluator()
Retrieves the condition evaluator.List<Parameter>
getParameters()
Retrieves the definedParameter
s for this ConditionType.Condition
getParentCondition()
Retrieves the parent condition.String
getQueryBuilder()
Retrieves the query builder.int
hashCode()
void
setConditionEvaluator(String conditionEvaluator)
Sets the condition evaluator.void
setParameters(List<Parameter> parameters)
Sets the List of the definedParameter
s for this ConditionType.void
setParentCondition(Condition parentCondition)
Sets the parent condition.void
setQueryBuilder(String queryBuilder)
Sets the query builder.-
Methods inherited from class org.apache.unomi.api.MetadataItem
getMetadata, getScope, setMetadata
-
Methods inherited from class org.apache.unomi.api.Item
getItemId, getItemType, getItemType, getSystemMetadata, getVersion, setItemId, setItemType, setScope, setSystemMetadata, setVersion
-
-
-
-
Field Detail
-
ITEM_TYPE
public static final String ITEM_TYPE
- See Also:
- Constant Field Values
-
-
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 definedParameter
s for this ConditionType.- Returns:
- a List of the defined
Parameter
s for this ConditionType
-
setParameters
public void setParameters(List<Parameter> parameters)
Sets the List of the definedParameter
s for this ConditionType.- Parameters:
parameters
- a List of the definedParameter
s for this ConditionType
-
-