public final class AttributeCriteria extends Object implements com.tridion.smarttarget.query.builder.LocationCriteria
| Constructor and Description |
|---|
AttributeCriteria(String name,
List<?> values,
com.tridion.smarttarget.query.builder.Operator operator,
boolean negate)
Constructor that can be used for all Operator types (
MultiValueOperator,
SingleValueOperator or RangeOperator). |
AttributeCriteria(String name,
Number lowerBound,
Number upperBound,
RangeOperator operator,
boolean negate)
Constructor for range operations with Number bounds.
|
AttributeCriteria(String name,
Number value,
SingleValueOperator operator,
boolean negate)
Constructor for Single Value operations for a Number value.
|
AttributeCriteria(String name,
OffsetDateTime lowerBound,
OffsetDateTime upperBound,
RangeOperator operator,
boolean negate)
Constructor for range operations with OffsetDateTime bounds.
|
AttributeCriteria(String name,
OffsetDateTime value,
SingleValueOperator operator,
boolean negate)
Constructor for Single Value operations for an OffsetDateTime value.
|
AttributeCriteria(String name,
String value,
SingleValueOperator operator,
boolean negate)
Constructor for Single Value operations for a String value.
|
AttributeCriteria(String name,
String lowerBound,
String upperBound,
RangeOperator operator,
boolean negate)
Constructor for range operations with String bounds.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
String |
getLocation(String universe) |
Object |
getLowerBoundValue()
Gets the lower bound value of the AttributeCriteria in case of a 'Between'
RangeOperator, null otherwise. |
String |
getName()
Gets the name of the AttributeCriteria.
|
com.tridion.smarttarget.query.builder.Operator |
getOperator()
Gets the
Operator of the AttributeCriteria. |
Object |
getUpperBoundValue()
Gets the upper bound value of the AttributeCriteria in case of a 'Between'
RangeOperator, null otherwise. |
List<?> |
getValues()
Get the attributeValues of the AttributeCriteria as a list.
|
int |
hashCode() |
boolean |
isNegate()
A flag indicating if this Attribute's operation should be negated.
|
static com.tridion.smarttarget.query.builder.Operator |
parseOperator(String value)
|
String |
toString() |
List<Object> |
visitCriteria(List<Object> criteriaList) |
public AttributeCriteria(String name, String value, SingleValueOperator operator, boolean negate) throws com.tridion.smarttarget.SmartTargetException
name - The name of the Attribute.value - the value of the Attribute.operator - The operation.negate - A flag that defines if this filter should be negated.com.tridion.smarttarget.SmartTargetExceptionpublic AttributeCriteria(String name, Number value, SingleValueOperator operator, boolean negate) throws com.tridion.smarttarget.SmartTargetException
name - The name of the Attribute.value - the value of the Attribute.operator - The operation.negate - A flag that defines if this filter should be negated.com.tridion.smarttarget.SmartTargetExceptionpublic AttributeCriteria(String name, OffsetDateTime value, SingleValueOperator operator, boolean negate) throws com.tridion.smarttarget.SmartTargetException
name - The name of the Attribute.value - the value of the Attribute.operator - The operation.negate - A flag that defines if this filter should be negated.com.tridion.smarttarget.SmartTargetExceptionpublic AttributeCriteria(String name, List<?> values, com.tridion.smarttarget.query.builder.Operator operator, boolean negate) throws com.tridion.smarttarget.SmartTargetException
MultiValueOperator,
SingleValueOperator or RangeOperator).
Attempts to detect and parse to type.name - The name of the Attribute.values - A list of attributeValues.operator - The operation.negate - A flag that defines if this filter should be negated.com.tridion.smarttarget.SmartTargetExceptionpublic AttributeCriteria(String name, String lowerBound, String upperBound, RangeOperator operator, boolean negate) throws com.tridion.smarttarget.SmartTargetException
name - The name of the Attribute.lowerBound - the lower bound of the range (inclusive).upperBound - the upper bound of the range (exclusive).operator - The operation.negate - A flag that defines if this filter should be negated.com.tridion.smarttarget.SmartTargetExceptionpublic AttributeCriteria(String name, Number lowerBound, Number upperBound, RangeOperator operator, boolean negate) throws com.tridion.smarttarget.SmartTargetException
name - The name of the Attribute.lowerBound - the lower bound of the range (inclusive).upperBound - the upper bound of the range (exclusive).operator - The operation.negate - A flag that defines if this filter should be negated.com.tridion.smarttarget.SmartTargetExceptionpublic AttributeCriteria(String name, OffsetDateTime lowerBound, OffsetDateTime upperBound, RangeOperator operator, boolean negate) throws com.tridion.smarttarget.SmartTargetException
name - The name of the Attribute.lowerBound - the lower bound of the range (inclusive).upperBound - the upper bound of the range (exclusive).operator - The operation.negate - A flag that defines if this filter should be negated.com.tridion.smarttarget.SmartTargetExceptionpublic String getLocation(String universe)
getLocation in interface com.tridion.smarttarget.query.builder.LocationCriteriapublic static com.tridion.smarttarget.query.builder.Operator parseOperator(String value) throws com.tridion.smarttarget.SmartTargetException
value - The string representation of an operator.Operator.com.tridion.smarttarget.SmartTargetException - when the operator is unknown.public String getName()
Gets the name of the AttributeCriteria.
public List<?> getValues()
Get the attributeValues of the AttributeCriteria as a list.
public Object getLowerBoundValue()
Gets the lower bound value of the AttributeCriteria in case of a 'Between' RangeOperator, null otherwise.
public Object getUpperBoundValue()
Gets the upper bound value of the AttributeCriteria in case of a 'Between' RangeOperator, null otherwise.
public com.tridion.smarttarget.query.builder.Operator getOperator()
Gets the Operator of the AttributeCriteria.
public boolean isNegate()
Copyright © 2021 RWS Group for and on behalf of its affiliates and subsidiaries. All rights reserved.