|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectatg.commerce.pricing.ItemPriceSource
public class ItemPriceSource
This object is used to specify a pricefor a product and
sku combination that will be used in place of the current day price
source, such as a price list. Objects of this type can be passed to a pricing operation through
the extra parameters map using the parameter name defined
by the constant PricingConstants.PRICING_OVERRIDES_PARAM
.
The properties of this object define the unit prices needed by each calculator to generate an item's price.
PricingTools
provides an API to generate a List
of these objects based on the pricing information contained in an Order. This is
useful for maintaining the original prices of an Order is subsequent pricing operations or
carrying prices from a submitted order to a new order.
PricingConstants
,
PricingTools.generateItemPriceSources(Order, Map)
,
Serialized FormField Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
protected java.util.Map |
mAttributes
|
protected java.lang.String |
mCommerceItemClassType
|
protected java.lang.String |
mCurrencyCode
|
protected long |
mLastListTierQuantityAdjusted
|
protected long |
mLastSaleTierQuantityAdjusted
|
protected java.lang.Double |
mListPrice
|
protected java.util.List |
mListVolumeLevels
|
protected boolean |
mOnSale
|
protected java.lang.String |
mParentSkuId
|
protected RepositoryItem |
mPriceList
|
protected java.lang.String |
mPriceListScheme
|
protected java.lang.String |
mProductId
|
protected java.lang.Double |
mSalePrice
|
protected java.util.List |
mSaleVolumeLevels
|
protected java.lang.String |
mSkuId
|
Constructor Summary | |
---|---|
ItemPriceSource(java.lang.String pProductId,
java.lang.String pSkuId,
java.lang.String pParentSkuId,
java.lang.String pCommerceItemType,
java.lang.String pCurrencyCode)
The only constructor that requires a currency code. |
Method Summary | |
---|---|
void |
addAttribute(java.lang.Object pKey,
java.io.Serializable pAttribute)
Adds an attribute. |
java.lang.Object |
getAttribute(java.lang.Object pKey)
Gets an attribute. |
java.lang.String |
getCommerceItemClassType()
The class type of the commerce item to which this source should apply. |
java.lang.String |
getCurrencyCode()
Returns the currency code for which this ItemPriceSource
applies. |
long |
getLastListTierQuantityAdjusted()
This contains the quantity of the last adjustment used to generate the last list tier. |
long |
getLastSaleTierQuantityAdjusted()
This contains the quantity of the last adjustment used to generate the last sale tier. |
java.lang.Double |
getListPrice()
The list price used to price the item. |
java.util.List |
getListVolumeLevels()
The List of price level repository items used by the volume based list price calculator to price the item. |
java.lang.String |
getParentSkuId()
The parent sku id to which the override applies. |
RepositoryItem |
getPriceList()
The price list that will be set in the ItemPriceInfo. |
java.lang.String |
getPriceListScheme()
The scheme name used to which this price source applies. |
java.lang.String |
getProductId()
The product id to which the override applies |
java.lang.Double |
getSalePrice()
The sale price used to price the item |
java.util.List |
getSaleVolumeLevels()
The List of price level repository items used by the volume based sale price calculator to price the item. |
java.lang.String |
getSkuId()
The sku id to which the override applies |
boolean |
isItemMatch(CommerceItem pCommerceItem,
CommerceItem pParentCommerceItem)
Matches the price source to the given item and parent item. |
boolean |
isOnSale()
True if this source contains sale pricing information |
void |
removeAttribute(java.lang.Object pKey)
Removes an attribute. |
void |
setCommerceItemClassType(java.lang.String pCommerceItemClassType)
|
void |
setCurrencyCode(java.lang.String pCurrencyCode)
|
void |
setLastListTierQuantityAdjusted(long pLastListTierQuantityAdjusted)
|
void |
setLastSaleTierQuantityAdjusted(long pLastSaleTierQuantityAdjusted)
|
void |
setListPrice(java.lang.Double pListPrice)
|
void |
setListVolumeLevels(java.util.List pVolumeLevels)
|
void |
setOnSale(boolean pOnSale)
|
void |
setParentSkuId(java.lang.String pParentSkuId)
|
void |
setPriceList(RepositoryItem pPriceList)
|
void |
setPriceListScheme(java.lang.String pPriceListScheme)
|
void |
setProductId(java.lang.String pProductId)
|
void |
setSalePrice(java.lang.Double pSalePrice)
|
void |
setSaleVolumeLevels(java.util.List pSaleVolumeLevels)
|
void |
setSkuId(java.lang.String pSkuId)
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
protected java.lang.String mCurrencyCode
protected RepositoryItem mPriceList
protected java.lang.String mCommerceItemClassType
protected boolean mOnSale
protected java.lang.String mPriceListScheme
protected java.lang.String mProductId
protected java.lang.String mSkuId
protected java.lang.String mParentSkuId
protected java.util.Map mAttributes
protected java.lang.Double mListPrice
protected java.lang.Double mSalePrice
protected java.util.List mListVolumeLevels
protected long mLastListTierQuantityAdjusted
protected java.util.List mSaleVolumeLevels
protected long mLastSaleTierQuantityAdjusted
Constructor Detail |
---|
public ItemPriceSource(java.lang.String pProductId, java.lang.String pSkuId, java.lang.String pParentSkuId, java.lang.String pCommerceItemType, java.lang.String pCurrencyCode)
pCurrencyCode
- the currency code for which this source applies.Method Detail |
---|
public java.lang.String getCurrencyCode()
ItemPriceSource
applies. This must match the currency code of the Order being priced when the
pricing engine maps the ItemPriceSource
objects to items in the
Order
public void setCurrencyCode(java.lang.String pCurrencyCode)
public RepositoryItem getPriceList()
public void setPriceList(RepositoryItem pPriceList)
public java.lang.String getCommerceItemClassType()
public void setCommerceItemClassType(java.lang.String pCommerceItemClassType)
public boolean isOnSale()
public void setOnSale(boolean pOnSale)
public java.lang.String getPriceListScheme()
public void setPriceListScheme(java.lang.String pPriceListScheme)
public java.lang.String getProductId()
public void setProductId(java.lang.String pProductId)
public java.lang.String getSkuId()
public void setSkuId(java.lang.String pSkuId)
public java.lang.String getParentSkuId()
public void setParentSkuId(java.lang.String pParentSkuId)
public void addAttribute(java.lang.Object pKey, java.io.Serializable pAttribute)
pKey
- the key to identifiying the attributeSerializable
- the attribute objectpublic java.lang.Object getAttribute(java.lang.Object pKey)
pKey
- the key that identifies the attributepublic void removeAttribute(java.lang.Object pKey)
pKey
- the key that identifies the attributepublic java.lang.Double getListPrice()
public void setListPrice(java.lang.Double pListPrice)
public java.lang.Double getSalePrice()
public void setSalePrice(java.lang.Double pSalePrice)
public java.util.List getListVolumeLevels()
public void setListVolumeLevels(java.util.List pVolumeLevels)
public long getLastListTierQuantityAdjusted()
public void setLastListTierQuantityAdjusted(long pLastListTierQuantityAdjusted)
public java.util.List getSaleVolumeLevels()
public void setSaleVolumeLevels(java.util.List pSaleVolumeLevels)
public long getLastSaleTierQuantityAdjusted()
public void setLastSaleTierQuantityAdjusted(long pLastSaleTierQuantityAdjusted)
public boolean isItemMatch(CommerceItem pCommerceItem, CommerceItem pParentCommerceItem)
In this implemenation, the product id, sku id, class type,
and parent sku id must match for true
to be returned
This method is used by the
ItemPricingEngine
when mapping
ItemPriceSource objects to the commerce items being priced.
pCommerceItem
- the commerce item to which the ItemPriceSource must matchpParentCommerceItem
- the parent commerce item to which the ItemPriceSource must match
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 |