Class AttributeModifierCriteria
- java.lang.Object
-
- de.hybris.platform.servicelayer.type.AttributeModifierCriteria
-
- Direct Known Subclasses:
ImmutableAttributeModifierCriteria
public class AttributeModifierCriteria extends java.lang.ObjectClass that contains combined criteria for searching and filtering attribute descriptors. Criteria are defined as three sections:- exclusive - they should be matched exactly
- alternative - all set modifiers should be matched
- disallowed - none of set modifiers should be matched
AttributeModifiersto build the criteria.
-
-
Constructor Summary
Constructors Constructor Description AttributeModifierCriteria(int exclusive, int alternative, int disallowed)Instantiates a new attribute modifier criteria with the given parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAlternative(int modifier)Adds the alternative attribute modifier for filtering.voidaddDisallowed(int modifier)Adds the disallowed attribute modifier for filtering.voidaddRequired(int modifier)Adds the required attribute modifier for filtering.booleanmatches(int actualAttributeModifiers)Function checks if the given combined attribute modifier matches current state of this criteria.
-
-
-
Method Detail
-
addRequired
public void addRequired(int modifier)
Adds the required attribute modifier for filtering. Selected attribute modifier is mandatory in the search result.- Parameters:
modifier- the modifier
-
addAlternative
public void addAlternative(int modifier)
Adds the alternative attribute modifier for filtering. At least one of the alternative modifiers is mandatory in the search result.- Parameters:
modifier- the modifier
-
addDisallowed
public void addDisallowed(int modifier)
Adds the disallowed attribute modifier for filtering. None of the disallowed modifiers must be present in the attribute descriptor that is in the search result.- Parameters:
modifier- the modifier
-
matches
public boolean matches(int actualAttributeModifiers)
Function checks if the given combined attribute modifier matches current state of this criteria.- Parameters:
actualAttributeModifiers- the actual attribute modifiers- Returns:
- true, if successful
-
-