atg.commerce.pricing
Class ItemPriceInfo

java.lang.Object
  extended by atg.commerce.pricing.AmountInfo
      extended by atg.commerce.pricing.ItemPriceInfo
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
PricingEngineService.EmptyItemPriceInfo

public class ItemPriceInfo
extends AmountInfo

Contains information about a CommerceItem's price. Also contains detailed price information about how individual quantities of the CommerceItem were priced. For example, if a CommerceItem's quantity is 5, and 3 of them received one discount, and the other two recevied another discount, there would be two DetailedItemPriceInfo entries in currentPriceDetails:

the ItemPriceInfo's amount (inherited from AmountInfo) should always equal the sum of the amounts of the DetailedItemPriceInfos in currentPriceDetails.

Properties:

See Also:
DetailedItemPriceInfo, Serialized Form

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
static java.lang.String RANGE_PROPERTY
           
 
Fields inherited from class atg.commerce.pricing.AmountInfo
FINAL_PRICE_MANUAL_ADJUSTMENT, mFinalReasonCode
 
Constructor Summary
ItemPriceInfo()
          Constructors
 
Method Summary
 java.util.List getCurrentPriceDetails()
          currentPriceDetails is a list of DetailedItemPriceInfos that constitute a breakdown of the price represented by this object.
 java.util.List getCurrentPriceDetailsForRange(atg.core.util.Range pRange)
          Get the details for a specific range.
 java.util.List getCurrentPriceDetailsSorted()
          currentPriceDetailsSorted is the same list returned by currentPriceDetails but is sorted by range.
 java.util.List getCurrentPriceDetailsSortedByAmount(java.lang.String pSortOrder)
          This method returns a list of DIPIs, sorted based on the amount of a single item price.
 double getListPrice()
          listPrice is the base price, before any modifications.
 double getOrderDiscountShare()
          The amount from all order discounts that apply to this item (and effect the taxable amount)
 RepositoryItem getPriceList()
          The priceList used to calculate this order price
 long getQuantityAsQualifier()
          quantityAsQualifier is the quantity of the CommerceItem that acted as a qualifier to any discount.
 long getQuantityDiscounted()
          quantityDiscounted is the quantity of the CommerceItem that was discounted in any way.
 double getRawTotalPrice()
          rawTotalPrice is the original amount of the item before any discounts or sales
 double getSalePrice()
          salePrice is the sale price before any modifications It is a unit price.
 boolean isOnSale()
          Returns true if the price info reflects a sale.
 void setCurrentPriceDetails(java.util.List pCurrentPriceDetails)
           
 void setListPrice(double pListPrice)
           
 void setOnSale(boolean pOnSale)
           
 void setOrderDiscountShare(double pOrderDiscountShare)
           
 void setPriceList(RepositoryItem pPriceList)
           
 void setQuantityAsQualifier(long pQuantityAsQualifier)
           
 void setQuantityDiscounted(long pQuantityDiscounted)
           
 void setRawTotalPrice(double pRawTotalPrice)
           
 void setSalePrice(double pSalePrice)
           
 java.lang.String toString()
          Produces a String representation for this AmountInfo
 
Methods inherited from class atg.commerce.pricing.AmountInfo
getAdjustments, getAmount, getClosenessQualifiers, getCurrencyCode, getFinalReasonCode, isAmountIsFinal, isDiscounted, markAsFinal, markAsFinal, markAsFinal, setAmount, setAmountIsFinal, setClosenessQualifiers, setCurrencyCode, setDiscounted, setFinalReasonCode, unmarkAsFinal
 
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
Class version string


RANGE_PROPERTY

public static final java.lang.String RANGE_PROPERTY
See Also:
Constant Field Values
Constructor Detail

ItemPriceInfo

public ItemPriceInfo()
Constructors

Method Detail

setRawTotalPrice

public void setRawTotalPrice(double pRawTotalPrice)

getRawTotalPrice

public double getRawTotalPrice()
rawTotalPrice is the original amount of the item before any discounts or sales

Returns:
The raw total price

setListPrice

public void setListPrice(double pListPrice)

getListPrice

public double getListPrice()
listPrice is the base price, before any modifications. It is a unit price.

Returns:
The list price

setSalePrice

public void setSalePrice(double pSalePrice)

getSalePrice

public double getSalePrice()
salePrice is the sale price before any modifications It is a unit price.

Returns:
The sale price

setOnSale

public void setOnSale(boolean pOnSale)

isOnSale

public boolean isOnSale()
Returns true if the price info reflects a sale. If this property has not been set via the setOnSale method then this value is computed dynamically. The price info would be on sale if the sale price is not equal to 0.0.

Returns:
True if the item was on sale, false otherwise

setOrderDiscountShare

public void setOrderDiscountShare(double pOrderDiscountShare)

getOrderDiscountShare

public double getOrderDiscountShare()
The amount from all order discounts that apply to this item (and effect the taxable amount)

Returns:
This items share of all order discounts

setQuantityDiscounted

public void setQuantityDiscounted(long pQuantityDiscounted)

getQuantityDiscounted

public long getQuantityDiscounted()
quantityDiscounted is the quantity of the CommerceItem that was discounted in any way.

Returns:
The quantity that was discounted

setQuantityAsQualifier

public void setQuantityAsQualifier(long pQuantityAsQualifier)

getQuantityAsQualifier

public long getQuantityAsQualifier()
quantityAsQualifier is the quantity of the CommerceItem that acted as a qualifier to any discount.

Returns:
The quantity that acted as a qualifier

setPriceList

public void setPriceList(RepositoryItem pPriceList)

getPriceList

public RepositoryItem getPriceList()
The priceList used to calculate this order price

Returns:
The priceList

setCurrentPriceDetails

public void setCurrentPriceDetails(java.util.List pCurrentPriceDetails)

getCurrentPriceDetails

public java.util.List getCurrentPriceDetails()
currentPriceDetails is a list of DetailedItemPriceInfos that constitute a breakdown of the price represented by this object. The sum of the amounts of these DetailedItemPriceInfos should always equals this object's amount.

Returns:
CurrentPriceDetails

getCurrentPriceDetailsSorted

public java.util.List getCurrentPriceDetailsSorted()
currentPriceDetailsSorted is the same list returned by currentPriceDetails but is sorted by range.

Returns:
CurrentPriceDetails

getCurrentPriceDetailsSortedByAmount

public java.util.List getCurrentPriceDetailsSortedByAmount(java.lang.String pSortOrder)
                                                    throws PricingException
This method returns a list of DIPIs, sorted based on the amount of a single item price.

Parameters:
pSortOrder - whether to sort ascending or descending
Returns:
a list of DIPIs, sorted by a single item quantity amount
Throws:
PricingException - if an error occurred whilst

getCurrentPriceDetailsForRange

public java.util.List getCurrentPriceDetailsForRange(atg.core.util.Range pRange)
Get the details for a specific range. If boundaries of a detail, straddle the boundary of the given range, it will also be returned.

Parameters:
pRange - The range we are getting DetailedItemPriceInfosFor
Returns:
a list of DetailedItemPriceInfos

toString

public java.lang.String toString()
Description copied from class: AmountInfo
Produces a String representation for this AmountInfo

Overrides:
toString in class AmountInfo
Returns:
a String representation for this AmountInfo