|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.commerce.order.OrderMergeEvent
public class OrderMergeEvent
A Java event indicating that one order was merged into another. This can happen when a user visits the store anonymously, adds some items to the shopping cart, and then logs in. If the user previously had an incomplete order with items in the shopping cart, the items in the anonymous order will be merged into the previously saved order, the anonymous order discarded, and the modified order updated in the database.
In this case, an OrderMergeEvent will be generated just before the anonymous order is discarded. The event provides access to both the source order and destination order for the merge, and a flag indicating whether the source order will be deleted as part of the merge operation.
Event listeners may modifiy the destination order if they wish and their modifications will be persisted when the order is updated.
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
|
protected Order |
mDestinationOrder
|
protected int |
mHashCode
|
protected Order |
mSourceOrder
|
protected boolean |
mWillDeleteSource
|
Constructor Summary | |
---|---|
OrderMergeEvent(Order pSourceOrder,
Order pDestinationOrder,
boolean pWillDeleteSource)
Construct a new OrderMergeEvent for a given source and destination order and delete-source mode. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object pOther)
Return true if another object is semantically equal to this one, meaning that they are both instances of OrderMergeEvent, and that they reflect the same source and destination orders and the same value for willDeleteSource . |
Order |
getDestinationOrder()
Return the destination order for the merge operation. |
Order |
getSourceOrder()
Return the source order for the merge operation. |
int |
hashCode()
Constructs a hashcode that is unique for non-equivalent instances of this class. |
boolean |
isWillDeleteSource()
Query whether or not the source order will be deleted after the merge. |
protected boolean |
sameOrder(Order pThisOrder,
Order pThatOrder)
Return true if two orders are considered to be the same, meaning either they are both null or they are both non-null and have the same order id. |
java.lang.String |
toString()
Return a human readable representation of this event. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CLASS_VERSION
protected Order mSourceOrder
protected Order mDestinationOrder
protected boolean mWillDeleteSource
protected int mHashCode
Constructor Detail |
---|
public OrderMergeEvent(Order pSourceOrder, Order pDestinationOrder, boolean pWillDeleteSource)
Method Detail |
---|
public Order getSourceOrder()
public Order getDestinationOrder()
public boolean isWillDeleteSource()
public boolean equals(java.lang.Object pOther)
willDeleteSource
.
equals
in class java.lang.Object
protected boolean sameOrder(Order pThisOrder, Order pThatOrder)
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |