public class GiftWithPurchaseSelection
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION |
protected long |
mAutomaticQuantity
Quantity automatically added
|
protected double |
mAutomaticQuantityWithFraction |
protected long |
mFailedQuantity
Quantity failed to auto add (only applied for orders)
|
protected double |
mFailedQuantityWithFraction |
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 double |
mQuantityWithFraction |
protected long |
mRemovedQuantity
Quantity manually removed (only applied for orders)
|
protected double |
mRemovedQuantityWithFraction |
protected long |
mSelectedQuantity
Quantity already selected
|
protected double |
mSelectedQuantityWithFraction |
protected long |
mTargetedQuantity
Quantity targeted by pricing
|
protected double |
mTargetedQuantityWithFraction |
Constructor and Description |
---|
GiftWithPurchaseSelection()
Default constructor
|
GiftWithPurchaseSelection(atg.commerce.promotion.GWPMarkerManager pManager,
RepositoryItem pOrderMarker)
Constructor to create a selection object based on a given GWP order marker.
|
Modifier and Type | Method and Description |
---|---|
long |
getAutomaticQuantity()
Getter for the quantity already automatically added to the order
|
double |
getAutomaticQuantityWithFraction()
Getter for the quantity already automatically added to the order
|
long |
getFailedQuantity()
Getter for the quantity failed to auto add in the order
|
double |
getFailedQuantityWithFraction()
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
|
double |
getQuantityDerivedAsFloatingPoint()
Returns derived quantity, returning quantityWithFraction if non-zero,
and quantity otherwise
|
long |
getQuantityMissingFromOrder()
Getter for the quantity missing from the order
|
double |
getQuantityWithFraction()
Getter for the total quantity given away by this promotion for this gift
|
double |
getQuantityWithFractionAvailableForSelection()
Getter for the quantity (totals of fractional and non-fractional values) still available to be selected
|
double |
getQuantityWithFractionMissingFromOrder()
Getter for the quantity (totals of fractional and non-fractional values) missing from the order
|
long |
getRemovedQuantity()
Getter for the quantity manually removed in the order
|
double |
getRemovedQuantityWithFraction()
Getter for the quantity manually removed in the order
|
long |
getSelectedQuantity()
Getter for the quantity already selected and added to the order
|
double |
getSelectedQuantityWithFraction()
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
|
double |
getTargetedQuantityWithFraction()
Getter for the quantity already in the order that was targeted by pricing
|
double |
getTotalAutomaticQuantity()
Returns the total combined automatic quantity (fractional and non-fractional)
|
double |
getTotalFailedQuantity()
Returns the total combined failed quantity (fractional and non-fractional)
|
double |
getTotalRemovedQuantity()
Returns the total combined removed quantity (fractional and non-fractional)
|
double |
getTotalSelectedQuantity()
Returns the total combined selected quantity (fractional and non-fractional)
|
double |
getTotalTargetedQuantity()
Returns the total combined targeted quantity (fractional and non-fractional)
|
void |
setAutomaticQuantity(long pAutomaticQuantity)
Setter for the quantity already automatically added to the order
|
void |
setAutomaticQuantityWithFraction(double pAutomaticQuantityWithFraction)
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 |
setFailedQuantityWithFraction(double pFailedQuantityWithFraction)
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 |
setQuantityWithFraction(double pQuantityWithFraction)
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 |
setRemovedQuantityWithFraction(double pRemovedQuantityWithFraction)
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 |
setSelectedQuantityWithFraction(double pSelectedQuantityWithFraction)
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
|
void |
setTargetedQuantityWithFraction(double pTargetedQuantityWithFraction)
Setter for the quantity already in the order that was targeted by pricing
|
java.lang.String |
toString() |
public static java.lang.String CLASS_VERSION
protected java.lang.String mPromotionId
protected int mGiftHashCode
protected java.lang.String mGiftType
protected java.lang.String mGiftDetail
protected long mQuantity
protected double mQuantityWithFraction
protected long mAutomaticQuantity
protected double mAutomaticQuantityWithFraction
protected long mSelectedQuantity
protected double mSelectedQuantityWithFraction
protected long mTargetedQuantity
protected double mTargetedQuantityWithFraction
protected long mRemovedQuantity
protected double mRemovedQuantityWithFraction
protected long mFailedQuantity
protected double mFailedQuantityWithFraction
public GiftWithPurchaseSelection()
public GiftWithPurchaseSelection(atg.commerce.promotion.GWPMarkerManager pManager, RepositoryItem pOrderMarker)
pManager
- GWPMarkerManager to get quantites from the given order markerpOrderMarker
- RepositoryItem GWP order markerpublic java.lang.String getPromotionId()
public void setPromotionId(java.lang.String pPromotionId)
pPromotionId
- Stringpublic int getGiftHashCode()
public void setGiftHashCode(int pGiftHashCode)
pGiftHashCode
- intpublic java.lang.String getGiftType()
public void setGiftType(java.lang.String pGiftType)
pGiftType
- Stringpublic java.lang.String getGiftDetail()
public void setGiftDetail(java.lang.String pGiftDetail)
pGiftDetail
- Stringpublic long getQuantity()
public void setQuantity(long pQuantity)
pQuantity
- longpublic double getQuantityWithFraction()
public void setQuantityWithFraction(double pQuantityWithFraction)
pQuantityWithFraction
- doublepublic double getQuantityDerivedAsFloatingPoint()
public long getAutomaticQuantity()
public void setAutomaticQuantity(long pAutomaticQuantity)
pAutomaticQuantity
- public double getAutomaticQuantityWithFraction()
public void setAutomaticQuantityWithFraction(double pAutomaticQuantityWithFraction)
pAutomaticQuantityWithFraction
- public double getTotalAutomaticQuantity()
public long getSelectedQuantity()
public void setSelectedQuantity(long pSelectedQuantity)
pSelectedQuantity
- public double getSelectedQuantityWithFraction()
public void setSelectedQuantityWithFraction(double pSelectedQuantityWithFraction)
pSelectedQuantityWithFraction
- public double getTotalSelectedQuantity()
public long getTargetedQuantity()
public void setTargetedQuantity(long pTargetedQuantity)
pTargetedQuantity
- public double getTargetedQuantityWithFraction()
public void setTargetedQuantityWithFraction(double pTargetedQuantityWithFraction)
pTargetedQuantityWithFraction
- public double getTotalTargetedQuantity()
public long getRemovedQuantity()
public void setRemovedQuantity(long pRemovedQuantity)
pRemovedQuantity
- public double getRemovedQuantityWithFraction()
public void setRemovedQuantityWithFraction(double pRemovedQuantityWithFraction)
pRemovedQuantityWithFraction
- public double getTotalRemovedQuantity()
public long getFailedQuantity()
public void setFailedQuantity(long pFailedQuantity)
pFailedQuantity
- public double getFailedQuantityWithFraction()
public void setFailedQuantityWithFraction(double pFailedQuantityWithFraction)
pFailedQuantityWithFraction
- public double getTotalFailedQuantity()
public long getQuantityAvailableForSelection()
Note: manually removed and failed quantity are not included. Does not take into account getTotalXXX() methods.
public double getQuantityWithFractionAvailableForSelection()
Note: manually removed and failed quantity are not included
public long getQuantityMissingFromOrder()
Note: manually removed and failed quantity are included
public double getQuantityWithFractionMissingFromOrder()
Note: manually removed and failed quantity are not included
public java.lang.String toString()
toString
in class java.lang.Object