public class LineItemSet extends java.lang.Object implements java.io.Serializable, XMLizable, java.lang.Cloneable
XML Snippet for LineItemSet:
<LineItemSet> <AssociatedOrderItem impl="com.ibm.commerce.marketing.promotion.runtime.AssociatedOrderItem" > <OrderItemKey> <OrderItemId>1234</OrderItemId> </OrderItemKey> <StartIndex>2</StartIndex> <Quantity>4</Quantity> </AssociatedOrderItem> <AssociatedOrderItem impl="com.ibm.commerce.marketing.promotion.runtime.AssociatedOrderItem" > <OrderItemKey> <OrderItemId>3456</OrderItemId> </OrderItemKey> <StartIndex>1</StartIndex> <Quantity>9</Quantity> </AssociatedOrderItem> </LineItemSet>
Modifier and Type | Field and Description |
---|---|
static java.lang.String | COPYRIGHT
IBM Copyright
|
Constructor and Description |
---|
LineItemSet()
Constructor
|
LineItemSet(Order order)
Constructor constructs a LineItemSet based on an order
|
Modifier and Type | Method and Description |
---|---|
void | addLineItem(AssociatedOrderItem anItem)
Adds an AssociatedOrderItem to this LineItemSet; merge it with associated order items already in the set if possible
|
java.lang.Object | clone() |
LineItemSet | difference(LineItemSet that)
Returns the difference between two line item sets by returning a new line item set representing their difference
|
void | directlyAppendItem(AssociatedOrderItem anItem)
Append items without testing if this item can be merged with other items already in the line item set.
|
void | fromXML(org.w3c.dom.Node node)
Builds an LineItem object from an XML fragment.
|
AssociatedOrderItem[] | getAssociatedOrderItems()
Returns all the associated order items in an array
|
java.math.BigDecimal | getCost()
Returns the total cost of all the associated items in this line item set.
|
static java.util.Comparator | getOrderItemComparator()
Returns the order item comparator used by this LineItemSet
|
boolean | getOrderSplitEndToStart()
Returns true if split order is end to start, otherwise false
|
java.math.BigDecimal | getQuantity()
Returns the total quantity of all the associated items in this line item set.
|
boolean | hasCrossSection(LineItemSet that)
Checks if two line item sets have a cross-section
|
LineItemSet | merge(LineItemSet that)
Merges two line item sets
|
static void | setOrderItemComparator(java.util.Comparator comparator)
Sets the order item comparator for this line item set
|
void | setOrderSplitEndToStart(boolean _orderSplitEndToStart)
Sets the split order for this line item set
|
LineItemSet[] | split(java.math.BigDecimal[] quantities)
Splits a line item set based on the quantities specified in the parameter.
|
java.lang.String | toXML()
Generates XML fragments for this LineItem object
|
public static final java.lang.String COPYRIGHT
public LineItemSet()
public LineItemSet(Order order)
public void directlyAppendItem(AssociatedOrderItem anItem)
public void addLineItem(AssociatedOrderItem anItem)
public LineItemSet merge(LineItemSet that)
public boolean hasCrossSection(LineItemSet that)
public AssociatedOrderItem[] getAssociatedOrderItems()
public java.math.BigDecimal getQuantity()
public java.math.BigDecimal getCost()
public LineItemSet difference(LineItemSet that)
public LineItemSet[] split(java.math.BigDecimal[] quantities)
public boolean getOrderSplitEndToStart()
public void setOrderSplitEndToStart(boolean _orderSplitEndToStart)
public static java.util.Comparator getOrderItemComparator()
public static void setOrderItemComparator(java.util.Comparator comparator)
public void fromXML(org.w3c.dom.Node node) throws DeXMLizationException
public java.lang.String toXML() throws XMLizationException
public java.lang.Object clone() throws java.lang.CloneNotSupportedException