public class ComplexValueUtils
extends java.lang.Object
ComplexValue objects. The helper
methods are mainly condition checkers (checking if a specific condition is true or false based on the data contained
in a ComplexValue object).| Modifier and Type | Method and Description |
|---|---|
static boolean |
applyCondition(ComplexValue cv,
java.lang.String subAttrName,
int comparisonValue,
Operator operator,
ComparisonType comparisonType)
Indicates if the sub-attribute found in the complex value matches the condition described by the given
parameters.
|
static boolean |
applyCondition(ComplexValue cv,
java.lang.String subAttrName,
java.lang.String comparisonValue,
Operator operator,
ComparisonType comparisonType)
Indicates if the sub-attribute found in the complex value matches the condition described by the given
parameters.
|
static java.util.List<java.lang.String> |
getSubAttributeValues(ChangeEvent changeEvent,
java.lang.String complexAttrName,
java.lang.String subAttrName)
Returns the values for the sub-attribute of the given complex attribute inside the ChangeEvent.
|
static java.util.List<java.lang.String> |
getSubAttributeValues(ChangeEvent changeEvent,
java.lang.String complexAttrName,
java.lang.String subAttrName,
java.util.function.Predicate<ComplexValue> complexValueFilter)
Returns the values that match the complex value filter for the sub-attribute of the given complex
attribute inside the ChangeEvent.
|
static boolean |
hasEmptySubAttributeValues(ChangeEvent changeEvent,
java.lang.String complexAttrName,
java.lang.String subAttrName)
Indicates whether the sub-attribute of the complex attribute inside the specified change event contains only
empty value(s).
|
static boolean |
hasEmptySubAttributeValues(ComplexValue complexValue,
java.lang.String subAttrName)
Indicates whether the sub-attribute of the specified complex value object contains only empty value(s).
|
static boolean |
hasNonEmptySubAttributeValues(ChangeEvent changeEvent,
java.lang.String complexAttrName,
java.lang.String subAttrName)
Indicates whether the sub-attribute of the complex attribute inside the specified change event contains only
non-empty value(s).
|
static boolean |
hasNonEmptySubAttributeValues(ComplexValue complexValue,
java.lang.String subAttrName)
Indicates whether the sub-attribute of the specified complex value object contains only non-empty value(s).
|
static boolean |
hasSubAttribute(ChangeEvent changeEvent,
java.lang.String complexAttrName,
java.lang.String subAttrName)
Indicates whether the given ChangeEvent object has a complex attribute that contains the given sub-attribute.
|
public static boolean hasNonEmptySubAttributeValues(ComplexValue complexValue, java.lang.String subAttrName)
complexValue - A complex value.subAttrName - The sub-attribute name to verify the condition on.true if the given sub-attribute for the given complex value contains only non-empty value(s).
Returns false if the given sub-attribute has empty value(s), or has no value(s).public static boolean hasNonEmptySubAttributeValues(ChangeEvent changeEvent, java.lang.String complexAttrName, java.lang.String subAttrName)
changeEvent - A change event.complexAttrName - The name of a complex attribute.subAttrName - The name of the sub-attribute of the complex attribute.true if the given sub-attribute for the given complex attribute contains only non-empty value(s).
Returns false if the given sub-attribute has empty value(s), or has no value(s).public static boolean hasEmptySubAttributeValues(ComplexValue complexValue, java.lang.String subAttrName)
complexValue - A complex value.subAttrName - The sub-attribute name to verify the condition on.true if the given sub-attribute for the given complex value contains only empty value(s).
Returns false if the given sub-attribute has non-empty value(s), or has no value(s).public static boolean hasEmptySubAttributeValues(ChangeEvent changeEvent, java.lang.String complexAttrName, java.lang.String subAttrName)
changeEvent - A change event.complexAttrName - The name of a complex attribute.subAttrName - The name of the sub-attribute of the complex attribute.true if the given sub-attribute for the given complex attribute contains only empty value(s).
Returns false if the given sub-attribute has non-empty value(s), or has no value(s).public static boolean hasSubAttribute(ChangeEvent changeEvent, java.lang.String complexAttrName, java.lang.String subAttrName)
changeEvent - A change event.complexAttrName - The name of a complex attribute.subAttrName - The name of the sub-attribute of the complex attribute.true if the given ChangeEvent object has a complex attribute that contains the given
sub-attribute. Returns false otherwise.public static java.util.List<java.lang.String> getSubAttributeValues(ChangeEvent changeEvent, java.lang.String complexAttrName, java.lang.String subAttrName)
changeEvent - A change event.complexAttrName - The name of a complex attribute.subAttrName - The name of the sub-attribute of the complex attribute.public static java.util.List<java.lang.String> getSubAttributeValues(ChangeEvent changeEvent, java.lang.String complexAttrName, java.lang.String subAttrName, java.util.function.Predicate<ComplexValue> complexValueFilter)
changeEvent - A change event.complexAttrName - The name of a complex attribute.subAttrName - The name of the sub-attribute of the complex attribute.complexValueFilter - A predicate on a complex value used to filter the values.public static boolean applyCondition(ComplexValue cv, java.lang.String subAttrName, int comparisonValue, Operator operator, ComparisonType comparisonType)
cv - A complex valuesubAttrName - The name of the sub-attribute on which the condition will be
checked.comparisonValue - A value used for checking a condition, if the operator
requires a comparison value.operator - The operator for the condition.comparisonType - The comparison type for the condition.true if the condition for the sub-attribute matches, or false otherwise.public static boolean applyCondition(ComplexValue cv, java.lang.String subAttrName, java.lang.String comparisonValue, Operator operator, ComparisonType comparisonType)
cv - A complex valuesubAttrName - The name of the sub-attribute on which the condition will be
checked.comparisonValue - A value used for checking a condition, if the operator
requires a comparison value.operator - The operator for the condition.comparisonType - The comparison type for the condition.true if the condition for the sub-attribute matches, or false otherwise.