public interface Adjustment extends XMLizable, java.lang.Cloneable
Adjustment
interface contains the methods common to all
adjustments and is defined as incentives offered to customers. This
interface extends XMLizable
and Cloneable
interfaces. All the adjustments should implement this interface.Modifier and Type | Field and Description |
---|---|
static java.lang.Integer |
ALL_AFFECTED_ITEMS
Indicates all Affected Items.
|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
static java.lang.Integer |
INDIVIDUAL_AFFECTED_ITEMS
Indicates Individual Affected Items.
|
static java.lang.Integer |
WHOLE_ORDER
Indicates Whole Order.
|
Modifier and Type | Method and Description |
---|---|
boolean |
apply(LineItemSet targeted,
java.math.BigDecimal targetedAmount,
int targetedAmountTypes,
LineItemSet affected,
java.util.Vector affectedVector,
java.util.Vector adjustmentVector,
PromotionContext context)
This method evaluates the targeted order items to see if they fulfill the
conditions of this adjustment ( for example, if the quantity of the order
items falls into one of the ranges of the adjustment).
|
java.lang.Object |
clone() |
java.lang.Integer |
getAdjustmentType()
This method gets the type of Adjustment.
|
void |
setAdjustmentType(java.lang.Integer adjustmentType)
This method sets the type of Adjustment.
|
static final java.lang.String COPYRIGHT
static final java.lang.Integer WHOLE_ORDER
static final java.lang.Integer ALL_AFFECTED_ITEMS
static final java.lang.Integer INDIVIDUAL_AFFECTED_ITEMS
java.lang.Integer getAdjustmentType()
WHOLE_ORDER
, ALL_AFFECTED_ITEMS
or INDIVIDUAL_AFFECTED_ITEMS
.void setAdjustmentType(java.lang.Integer adjustmentType)
WHOLE_ORDER
, ALL_AFFECTED_ITEMS
or INDIVIDUAL_AFFECTED_ITEMS
.boolean apply(LineItemSet targeted, java.math.BigDecimal targetedAmount, int targetedAmountTypes, LineItemSet affected, java.util.Vector affectedVector, java.util.Vector adjustmentVector, PromotionContext context) throws PromotionRuntimeException
adjustmentVector
Vector object passed as a parameter. The
affectedVector
Vector object passed as a parameter is
updated by adding the affected order items. This method is called in the
invoke(LineItemSet, BigDecimal, int, Vector, Vector, PromotionContext)
method of AdjustmentFunction
.targeted
- The targeted order items. This is a set of order items (or
portions of order items) that are used to qualify for the
promotion of which this adjustment is a part.affected
- The affected order items. This is a set of order items,
identified by the promotion, to which this adjustment will be
attached.affectedVector
- A Vector which contains the affected LineItemSets.adjustmentVector
- A Vector which contains the Adjustment objects.context
- The PromotionContext
object which may be used to build
the Adjustment to add to the adjustmentVector parameter.PromotionRuntimeException
- when the computation encounters a problem.java.lang.Object clone() throws java.lang.CloneNotSupportedException
java.lang.CloneNotSupportedException
Object.clone()