public class ItemPriceInfo extends AmountInfo
Properties:
amount
s
of these DetailedItemPriceInfos should always equals this object's amount
.
DetailedItemPriceInfo
,
Serialized FormModifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
static java.lang.String |
RANGE_PROPERTY |
FINAL_PRICE_MANUAL_ADJUSTMENT, mFinalReasonCode
Constructor and Description |
---|
ItemPriceInfo()
Constructors
|
Modifier and Type | Method and Description |
---|---|
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.
|
boolean |
getDiscountable()
Gets the current state of the discountable property
|
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
|
java.lang.String |
getPriceListId()
A convenience method for getting the price list ID.
|
long |
getQuantityAsQualifier()
quantityAsQualifier is the quantity of the CommerceItem that acted as a
qualifier to any discount.
|
double |
getQuantityAsQualifierDerivedAsFloatingPoint()
This method will return a derived quantity value 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 |
getQuantityDiscountedDerivedAsFloatingPoint()
This method will return a derived quantity discounted value which this object represents.
|
double |
getQuantityWithFractionAsQualifier()
quantityWithFractionAsQualifier is the quantity of the CommerceItem that acted as a
qualifier to any discount.
|
double |
getQuantityWithFractionDiscounted()
quantityWithFractionDiscounted 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.
|
double |
getUnitAmount()
The average unit amount for this ItemPriceInfo (amount divided by quantity).
|
boolean |
isFractional()
This method returns whether class is fractional or not.
|
boolean |
isOnSale()
Returns true if the price info reflects a sale.
|
void |
setCurrentPriceDetails(java.util.List pCurrentPriceDetails) |
void |
setDiscountable(boolean pDiscountable)
Sets the property discountable
|
void |
setListPrice(double pListPrice) |
void |
setOnSale(boolean pOnSale) |
void |
setOrderDiscountShare(double pOrderDiscountShare) |
void |
setPriceList(RepositoryItem pPriceList) |
void |
setQuantityAsQualifier(long pQuantityAsQualifier)
Sets the quantity of the CommerceItem that was acted as a qualifier to the discount.
|
void |
setQuantityDiscounted(long pQuantityDiscounted)
Sets the quantity of the CommerceItem that was discounted.
|
void |
setQuantityWithFractionAsQualifier(double pQuantityWithFractionAsQualifier)
Sets the quantity of the CommerceItem that was acted as a qualifier to the discount.
|
void |
setQuantityWithFractionDiscounted(double pQuantityWithFractionDiscounted)
Sets the quantity of the CommerceItem that was discounted.
|
void |
setRawTotalPrice(double pRawTotalPrice) |
void |
setSalePrice(double pSalePrice) |
java.lang.String |
toString()
Produces a String representation for this AmountInfo
|
getAdjustments, getAmount, getClosenessQualifiers, getCurrencyCode, getFinalReasonCode, isAmountIsFinal, isDiscounted, markAsFinal, markAsFinal, markAsFinal, markAsFinal, setAmount, setAmountIsFinal, setClosenessQualifiers, setCurrencyCode, setDiscounted, setFinalReasonCode, unmarkAsFinal
public static java.lang.String CLASS_VERSION
public static final java.lang.String RANGE_PROPERTY
public boolean getDiscountable()
public void setDiscountable(boolean pDiscountable)
pDiscountable
- public void setRawTotalPrice(double pRawTotalPrice)
public double getRawTotalPrice()
public void setListPrice(double pListPrice)
public double getListPrice()
public void setSalePrice(double pSalePrice)
public double getSalePrice()
public void setOnSale(boolean pOnSale)
public boolean isOnSale()
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.public void setOrderDiscountShare(double pOrderDiscountShare)
public double getOrderDiscountShare()
public void setQuantityDiscounted(long pQuantityDiscounted)
pQuantityDiscounted
- The quantity discountedpublic long getQuantityDiscounted()
public void setQuantityWithFractionDiscounted(double pQuantityWithFractionDiscounted)
pQuantityWithFractionDiscounted
- The quantity discountedpublic double getQuantityWithFractionDiscounted()
public double getQuantityDiscountedDerivedAsFloatingPoint()
It will decide upon the correct quantity value to return, returning the first non null
value from the properties, quantityWithFraction
, quantity
, in that order.
The method should be used where there is a need to know the quantity of an item
but it is unknown to the caller as to which property (quantityWithFraction
or
quantity
holds the value.
public boolean isFractional()
getQuantityWithFractionDiscounted
method.
True for a value greater than 0.0public void setQuantityAsQualifier(long pQuantityAsQualifier)
pQuantityAsQualifier
- The quantity that acted as a qualifierpublic long getQuantityAsQualifier()
public void setQuantityWithFractionAsQualifier(double pQuantityWithFractionAsQualifier)
pQuantityWithFractionAsQualifier
- The quantity that acted as a qualifierpublic double getQuantityWithFractionAsQualifier()
public double getQuantityAsQualifierDerivedAsFloatingPoint()
It will decide upon the correct quantity value to return, returning the first non zero
value from the properties, quantityWithFraction
, quantity
, in that order.
The method should be used where there is a need to know the quantity of an item
but it is unknown to the caller as to which property (quantityWithFraction
or
quantity
holds the value.
public void setPriceList(RepositoryItem pPriceList)
public RepositoryItem getPriceList()
public java.lang.String getPriceListId()
public void setCurrentPriceDetails(java.util.List pCurrentPriceDetails)
public java.util.List getCurrentPriceDetails()
amount
s
of these DetailedItemPriceInfos should always equals this object's amount
.public java.util.List getCurrentPriceDetailsSorted()
currentPriceDetails
but is
sorted by range.public java.util.List getCurrentPriceDetailsSortedByAmount(java.lang.String pSortOrder) throws PricingException
pSortOrder
- whether to sort ascending or descendingPricingException
- if an error occurred whilstpublic java.util.List getCurrentPriceDetailsForRange(atg.core.util.Range pRange)
pRange
- The range we are getting DetailedItemPriceInfosForpublic double getUnitAmount()
Note - property is read only.
public java.lang.String toString()
AmountInfo
toString
in class AmountInfo