atg.commerce.promotion
Class GiftWithPurchaseSelection

java.lang.Object
  extended by atg.commerce.promotion.GiftWithPurchaseSelection

public class GiftWithPurchaseSelection
extends java.lang.Object

Class to represent a single gift selection available for a gift with purchase promotion. The GiftWithPurchaseSelectionsDroplet will output a collection of these for an order. It contains the various quantities associated with the promotion and gift in the order or item.


Field Summary
static java.lang.String CLASS_VERSION
           
protected  long mAutomaticQuantity
          Quantity automatically added
protected  long mFailedQuantity
          Quantity failed to auto add (only applied for orders)
protected  java.lang.String mGiftDetail
           
protected  int mGiftHashCode
           
protected  java.lang.String mGiftType
           
protected  java.lang.String mPromotionId
           
protected  long mQuantity
          Total quantity given away by this promotion for this gift
protected  long mRemovedQuantity
          Quantity manually removed (only applied for orders)
protected  long mSelectedQuantity
          Quantity already selected
protected  long mTargetedQuantity
          Quantity targeted by pricing
 
Constructor Summary
GiftWithPurchaseSelection()
          Default constructor
GiftWithPurchaseSelection(atg.commerce.promotion.GWPMarkerManager pManager, RepositoryItem pOrderMarker)
          Constructor to create a selection object based on a given GWP order marker.
 
Method Summary
 long getAutomaticQuantity()
          Getter for the quantity already automatically added to the order
 long getFailedQuantity()
          Getter for the quantity failed to auto add in the order
 java.lang.String getGiftDetail()
          Getter for the gift detail
 int getGiftHashCode()
          Getter for the gift hash code
 java.lang.String getGiftType()
          Getter for the gift type
 java.lang.String getPromotionId()
          Getter for the promotion id
 long getQuantity()
          Getter for the total quantity given away by this promotion for this gift
 long getQuantityAvailableForSelection()
          Getter for the quantity available still available to be selected
 long getQuantityMissingFromOrder()
          Getter for the quantity missing from the order
 long getRemovedQuantity()
          Getter for the quantity manually removed in the order
 long getSelectedQuantity()
          Getter for the quantity already selected and added to the order
 long getTargetedQuantity()
          Getter for the quantity already in the order that was targeted by pricing
 void setAutomaticQuantity(long pAutomaticQuantity)
          Setter for the quantity already automatically added to the order
 void setFailedQuantity(long pFailedQuantity)
          Setter for the quantity failed to auto add in the order
 void setGiftDetail(java.lang.String pGiftDetail)
          Setter for the gift detail
 void setGiftHashCode(int pGiftHashCode)
          Setter for the gift hash code
 void setGiftType(java.lang.String pGiftType)
          Setter for the gift type
 void setPromotionId(java.lang.String pPromotionId)
          Setter for the promotion id
 void setQuantity(long pQuantity)
          Setter for the total quantity given away by this promotion for this gift
 void setRemovedQuantity(long pRemovedQuantity)
          Setter for the quantity manually removed in the order
 void setSelectedQuantity(long pSelectedQuantity)
          Setter for the quantity already selected and added to the order
 void setTargetedQuantity(long pTargetedQuantity)
          Setter for the quantity already in the order that was targeted by pricing
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION

mPromotionId

protected java.lang.String mPromotionId

mGiftHashCode

protected int mGiftHashCode

mGiftType

protected java.lang.String mGiftType

mGiftDetail

protected java.lang.String mGiftDetail

mQuantity

protected long mQuantity
Total quantity given away by this promotion for this gift


mAutomaticQuantity

protected long mAutomaticQuantity
Quantity automatically added


mSelectedQuantity

protected long mSelectedQuantity
Quantity already selected


mTargetedQuantity

protected long mTargetedQuantity
Quantity targeted by pricing


mRemovedQuantity

protected long mRemovedQuantity
Quantity manually removed (only applied for orders)


mFailedQuantity

protected long mFailedQuantity
Quantity failed to auto add (only applied for orders)

Constructor Detail

GiftWithPurchaseSelection

public GiftWithPurchaseSelection()
Default constructor


GiftWithPurchaseSelection

public GiftWithPurchaseSelection(atg.commerce.promotion.GWPMarkerManager pManager,
                                 RepositoryItem pOrderMarker)
Constructor to create a selection object based on a given GWP order marker.

Parameters:
pManager - GWPMarkerManager to get quantites from the given order marker
pOrderMarker - RepositoryItem GWP order marker
Method Detail

getPromotionId

public java.lang.String getPromotionId()
Getter for the promotion id

Returns:
String

setPromotionId

public void setPromotionId(java.lang.String pPromotionId)
Setter for the promotion id

Parameters:
pPromotionId - String

getGiftHashCode

public int getGiftHashCode()
Getter for the gift hash code

Returns:
int

setGiftHashCode

public void setGiftHashCode(int pGiftHashCode)
Setter for the gift hash code

Parameters:
pGiftHashCode - int

getGiftType

public java.lang.String getGiftType()
Getter for the gift type

Returns:
String

setGiftType

public void setGiftType(java.lang.String pGiftType)
Setter for the gift type

Parameters:
pGiftType - String

getGiftDetail

public java.lang.String getGiftDetail()
Getter for the gift detail

Returns:
String

setGiftDetail

public void setGiftDetail(java.lang.String pGiftDetail)
Setter for the gift detail

Parameters:
pGiftDetail - String

getQuantity

public long getQuantity()
Getter for the total quantity given away by this promotion for this gift

Returns:
long

setQuantity

public void setQuantity(long pQuantity)
Setter for the total quantity given away by this promotion for this gift

Parameters:
pQuantity - long

getAutomaticQuantity

public long getAutomaticQuantity()
Getter for the quantity already automatically added to the order

Returns:
long

setAutomaticQuantity

public void setAutomaticQuantity(long pAutomaticQuantity)
Setter for the quantity already automatically added to the order

Parameters:
pAutomaticQuantity -

getSelectedQuantity

public long getSelectedQuantity()
Getter for the quantity already selected and added to the order

Returns:
long

setSelectedQuantity

public void setSelectedQuantity(long pSelectedQuantity)
Setter for the quantity already selected and added to the order

Parameters:
pSelectedQuantity -

getTargetedQuantity

public long getTargetedQuantity()
Getter for the quantity already in the order that was targeted by pricing

Returns:
long

setTargetedQuantity

public void setTargetedQuantity(long pTargetedQuantity)
Setter for the quantity already in the order that was targeted by pricing

Parameters:
pTargetedQuantity -

getRemovedQuantity

public long getRemovedQuantity()
Getter for the quantity manually removed in the order

Returns:
long

setRemovedQuantity

public void setRemovedQuantity(long pRemovedQuantity)
Setter for the quantity manually removed in the order

Parameters:
pRemovedQuantity -

getFailedQuantity

public long getFailedQuantity()
Getter for the quantity failed to auto add in the order

Returns:
long

setFailedQuantity

public void setFailedQuantity(long pFailedQuantity)
Setter for the quantity failed to auto add in the order

Parameters:
pFailedQuantity -

getQuantityAvailableForSelection

public long getQuantityAvailableForSelection()
Getter for the quantity available still available to be selected

Note: manually removed and failed quantity are not included

Returns:
long

getQuantityMissingFromOrder

public long getQuantityMissingFromOrder()
Getter for the quantity missing from the order

Note: manually removed and failed quantity are included

Returns:
long

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object