Interface QuantityBasedRule
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
OfferItemCriteria
,PageItemCriteria
,StructuredContentItemCriteria
- All Known Implementing Classes:
OfferItemCriteriaImpl
,OfferQualifyingCriteriaXrefImpl
,OfferTargetCriteriaXrefImpl
,PageItemCriteriaImpl
,StructuredContentItemCriteriaImpl
Represents a class containing an MVEL rule and an associated quantity.
- Author:
- Jeff Fischer
-
Method Summary
Modifier and TypeMethodDescriptiongetId()
The primary key value for this rule objectThe rule in the form of an MVEL expressionThe quantity for which a match must be found using the rule.void
The primary key value for this rule objectvoid
setMatchRule
(String matchRule) Sets the match rule used to test this item.void
setQuantity
(Integer quantity) The quantity for which a match must be found using the rule.
-
Method Details
-
getQuantity
Integer getQuantity()The quantity for which a match must be found using the rule. This generally equates to order item quantity (e.g. 2 shirts matching the rule are required in order to receive a discount)- Returns:
- the quantity of matches required
-
setQuantity
The quantity for which a match must be found using the rule. This generally equates to order item quantity (e.g. 2 shirts matching the rule are required in order to receive a discount)- Parameters:
quantity
- the quantity of matches required
-
getMatchRule
String getMatchRule()The rule in the form of an MVEL expression- Returns:
- the rule as an MVEL string
-
setMatchRule
Sets the match rule used to test this item.- Parameters:
matchRule
- the rule as an MVEL string
-
getId
Long getId()The primary key value for this rule object- Returns:
- the primary key value
-
setId
The primary key value for this rule object- Parameters:
id
- the primary key value
-