atg.commerce.pricing
Class AmountInfo

java.lang.Object
  extended by atg.commerce.pricing.AmountInfo
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
DetailedItemPriceInfo, ItemPriceInfo, OrderPriceInfo, ShippingPriceInfo, TaxPriceInfo

public class AmountInfo
extends java.lang.Object
implements java.io.Serializable

Represents price information about an object. In DCS, a price is more than just a number. In addition to the actual amount, AmountInfo also stores information about how to interpret that amount, and how the current price was calculated.

Properties

See Also:
PricingAdjustment, Serialized Form

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
static java.lang.String FINAL_PRICE_MANUAL_ADJUSTMENT
          finalReasonCode for a manually adjusted final price
protected  java.lang.String mFinalReasonCode
           
 
Constructor Summary
AmountInfo()
           
 
Method Summary
 java.util.List getAdjustments()
          A list of PricingAdjustment objects which record an audit trail of changes that have happened to the amount in this AmountInfo
 double getAmount()
          the raw number about which this AmountInfo stores interpretive information
 java.util.List getClosenessQualifiers()
          A list of closenessQualifiers that this order/item satisfies.
 java.lang.String getCurrencyCode()
          the currency code for the price that this AmountInfo represents
 java.lang.String getFinalReasonCode()
          the reason for the item being marked with a final price
 boolean isAmountIsFinal()
          If this flag is true, this amount info should never be changed.
 boolean isDiscounted()
          Test property Discounted
 void markAsFinal()
          This method will mark this AmountInfo as final.
 void markAsFinal(java.lang.String pDescription)
          This method will mark this AmountInfo as final.
 void markAsFinal(java.lang.String pDescription, java.lang.String pReasonCode, long pQuantityAdjusted, double pAmount, boolean pClearAdjustments)
          Marks the price info as final.
 void setAmount(double pAmount)
          the raw number about which this AmountInfo stores interpretive information
 void setAmountIsFinal(boolean pAmountIsFinal)
          If true, this amountInfo will not be recalculated If you want a PricingAdjustment to be created that reflects this change, then use markAsFinal instead.
 void setClosenessQualifiers(java.util.List pClosenessQualifiers)
          A list of closenessQualifiers that this order/item satisfies.
 void setCurrencyCode(java.lang.String pCurrencyCode)
          the currency code for the price that this AmountInfo represents
 void setDiscounted(boolean pDiscounted)
          Flag that states whether or not this AmountInfo has been discounted
 void setFinalReasonCode(java.lang.String pFinalReasonCode)
          the reason for the item being marked with a final price
 java.lang.String toString()
          Produces a String representation for this AmountInfo
 void unmarkAsFinal()
          Removes a final designation and sets the final reason code to null.
 
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


FINAL_PRICE_MANUAL_ADJUSTMENT

public static final java.lang.String FINAL_PRICE_MANUAL_ADJUSTMENT
finalReasonCode for a manually adjusted final price

See Also:
Constant Field Values

mFinalReasonCode

protected java.lang.String mFinalReasonCode
Constructor Detail

AmountInfo

public AmountInfo()
Method Detail

setCurrencyCode

public void setCurrencyCode(java.lang.String pCurrencyCode)
the currency code for the price that this AmountInfo represents

Parameters:
pCurrencyCode - new value to set

getCurrencyCode

public java.lang.String getCurrencyCode()
the currency code for the price that this AmountInfo represents

Returns:
property CurrencyCode

setAmount

public void setAmount(double pAmount)
the raw number about which this AmountInfo stores interpretive information

Parameters:
pAmount - new value to set

getAmount

public double getAmount()
the raw number about which this AmountInfo stores interpretive information

Returns:
property Amount

setDiscounted

public void setDiscounted(boolean pDiscounted)
Flag that states whether or not this AmountInfo has been discounted

Parameters:
pDiscounted - new value to set

isDiscounted

public boolean isDiscounted()
Test property Discounted

Returns:
Discounted

getAdjustments

public java.util.List getAdjustments()
A list of PricingAdjustment objects which record an audit trail of changes that have happened to the amount in this AmountInfo

Returns:
property Adjustments

setAmountIsFinal

public void setAmountIsFinal(boolean pAmountIsFinal)
If true, this amountInfo will not be recalculated If you want a PricingAdjustment to be created that reflects this change, then use markAsFinal instead.

Parameters:
pAmountIsFinal - the new value

isAmountIsFinal

public boolean isAmountIsFinal()
If this flag is true, this amount info should never be changed.

Returns:
property amountIsFinal

setClosenessQualifiers

public void setClosenessQualifiers(java.util.List pClosenessQualifiers)
A list of closenessQualifiers that this order/item satisfies.

Parameters:
pClosenessQualifiers - the new value

getClosenessQualifiers

public java.util.List getClosenessQualifiers()
A list of closenessQualifiers that this order/item satisfies.

Returns:
property closenessQualifiers

unmarkAsFinal

public void unmarkAsFinal()
Removes a final designation and sets the final reason code to null.


markAsFinal

public void markAsFinal()
This method will mark this AmountInfo as final. This means that throughout subsequent pricing operations, this AmountInfo will remain unchanged. The provided string will be added to the PricingAdjustment.


markAsFinal

public void markAsFinal(java.lang.String pDescription)
This method will mark this AmountInfo as final. This means that throughout subsequent pricing operations, this AmountInfo will remain unchanged. The provided string will be added to the PricingAdjustment.

Parameters:
pDescription - A string that explains why the AmountInfo was marked final.
See Also:
markAsFinal(String, String, long, double, boolean)

markAsFinal

public void markAsFinal(java.lang.String pDescription,
                        java.lang.String pReasonCode,
                        long pQuantityAdjusted,
                        double pAmount,
                        boolean pClearAdjustments)
Marks the price info as final. This means that throughout subsequent pricing operations, this AmountInfo will remain unchanged. The provided string will be added to the PricingAdjustment.

Parameters:
pDescription - the free form description for the final price. This description is used by the PriceAdjustment added to the price info
pReasonCode - the reason code for the final price
pQuantityAdjusted - to total quantity being adjusted
pAmount - the new amount
pClearAdjustments - determines the List of PriceAdjustments are cleared prior to adding a new PriceAdjustment for the final price.

setFinalReasonCode

public void setFinalReasonCode(java.lang.String pFinalReasonCode)
the reason for the item being marked with a final price

Parameters:
pFinalReasonCode - new value to set

getFinalReasonCode

public java.lang.String getFinalReasonCode()
the reason for the item being marked with a final price

Returns:
property FinalReasonCode

toString

public java.lang.String toString()
Produces a String representation for this AmountInfo

Overrides:
toString in class java.lang.Object
Returns:
a String representation for this AmountInfo