public class OrderRunningTotal
extends java.lang.Object
implements java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COPYRIGHT
IBM Copyright
|
static int |
NO_ADJUSTMENT_APPLIED
No adjustment is applicable
|
static int |
OTHER_ADJUSTMENT_PRESENT
Some other adjustments are present
|
static int |
SOME_MONETARY_ADJUSTMENT_APPLIED
Some monetary adjustment has been applied
|
Constructor and Description |
---|
OrderRunningTotal()
Default constructor
|
OrderRunningTotal(Order order)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
applyAdjustmentsFromAPromotionExecutionRecord(PromotionExecutionRecord record,
PromotionContext context)
Applies all monetary adjustments in a PromotionExecutionRecord.
|
java.lang.Object |
clone() |
AssociatedOrderItem[] |
getClonedItems(AssociatedOrderItem[] items)
A method that returns an array of cloned AssociatedOrderItems
|
java.math.BigDecimal |
getOrderRunningTotal(int type)
Returns the running total for the order with which this
OrderRunningTotalController was initialized.
|
java.math.BigDecimal |
getRunningTotalFor(AssociatedOrderItem[] items,
int type)
Returns the running total for an array of order items or portions of them
as identified by the AssociatedOrderItem array parameter.
|
java.math.BigDecimal |
getRunningTotalFor(AssociatedOrderItem anItem,
int type)
Returns the running total for an order item or a portion of it as
identified by the AssociatedOrderItem parameter.
|
java.math.BigDecimal |
getRunningTotalFor(LineItemSet set,
int type)
Returns the running total for everything in a LineItemSet.
|
java.math.BigDecimal |
getRunningTotalFor(OrderItem oi,
int type)
Returns the running total for subTotal, shipping charge, shipping tax or
tax for an order item.
|
java.lang.String |
toString() |
public static final java.lang.String COPYRIGHT
public static final int NO_ADJUSTMENT_APPLIED
public static final int SOME_MONETARY_ADJUSTMENT_APPLIED
public static final int OTHER_ADJUSTMENT_PRESENT
public OrderRunningTotal()
public OrderRunningTotal(Order order)
order
- the order.public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
Object.clone()
public int applyAdjustmentsFromAPromotionExecutionRecord(PromotionExecutionRecord record, PromotionContext context)
record
- The promotion execution recordcontext
- the promotion contextpublic java.math.BigDecimal getRunningTotalFor(OrderItem oi, int type)
oi
- order itemtype
- the type of running total to returnpublic java.math.BigDecimal getRunningTotalFor(AssociatedOrderItem anItem, int type)
anItem
- the AssociatedOrderItemtype
- the type of running total to returnpublic java.math.BigDecimal getRunningTotalFor(AssociatedOrderItem[] items, int type)
items
- the AssociatedOrderItemstype
- the type of running total to returnpublic java.math.BigDecimal getRunningTotalFor(LineItemSet set, int type)
set
- the LineItemSettype
- the type of running total to returnpublic java.math.BigDecimal getOrderRunningTotal(int type)
type
- the type of running total to returnpublic java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public AssociatedOrderItem[] getClonedItems(AssociatedOrderItem[] items)
items
- the original associatedOrderItems