public class PriceOutputCase
extends java.lang.Object
GetContractUnitPriceCmd
,
GetContractSpecialPriceCmd
, or GetProductContractUnitPriceCmd
. This class is useful for combining the output from two or more of these
commands as is done in CompositeGetContractUnitPriceCmdImpl
, or as
just a way to convert the output to a standard form to process the commands
in a uniform way.
There is one factory method which create lists of output cases from other objects:
AbstractGetPriceCmdImpl#createFromOutput(GetPriceCmdOutput)
PriceOutputCaseGetPriceCmdOutput
class.Constructor and Description |
---|
PriceOutputCase(java.lang.Long newCatEntryID,
java.lang.Long newTradingID,
java.lang.Long newTCID,
QuantityAmount newQuantity,
com.ibm.commerce.order.objects.OfferAccessBean newOffer,
java.lang.Long newOfferID,
MonetaryAmount newBasePrice,
MonetaryAmount newPrice)
Constructor for PriceOutputCase.
|
Modifier and Type | Method and Description |
---|---|
MonetaryAmount |
getBasePrice()
Returns the base price that was found.
|
java.lang.Long |
getCatEntryID()
Returns the catalog entry that was used.
|
java.util.ArrayList |
getMatchKey()
Returns the key used to match input to output cases.
|
com.ibm.commerce.order.objects.OfferAccessBean |
getOffer()
Returns the offer access bean that was used.
|
java.lang.Long |
getOfferID()
Returns the offer that was used.
|
MonetaryAmount |
getPrice()
Returns the final calculated price.
|
QuantityAmount |
getQuantity()
Returns the quantity that was used.
|
java.lang.Long |
getTcID()
Returns the term condition that was used.
|
java.lang.Long |
getTradingID()
Returns the trading agreement that was used.
|
void |
setToIndex(int i,
CatEntryPrices catEntry)
Sets the values from this to the values in the appropriate arrays in the
given catalog entry object.
|
java.lang.String |
toString()
Returns the string representation of this.
|
public PriceOutputCase(java.lang.Long newCatEntryID, java.lang.Long newTradingID, java.lang.Long newTCID, QuantityAmount newQuantity, com.ibm.commerce.order.objects.OfferAccessBean newOffer, java.lang.Long newOfferID, MonetaryAmount newBasePrice, MonetaryAmount newPrice)
newCatEntryID
- The catalog entry identifier. Cannot be null.newTradingID
- The trading agreement identifier. Cannot be null.newTCID
- The term condition identifier. Cannot be null.newQuantity
- The quantity used to determine the price. Cannot be null, and
the unit of measure cannot be null or empty.newOffer
- The offer that was used. May be null if no offer was used.newOfferID
- The offer identifier that was used. May be null if no offer
was used.newBasePrice
- The base price that was found, if there was no offer in the
requested currency. May be null if there was an offer in the
requested currency or offers were not used to calculate the
price.newPrice
- The final price that was calculated. Cannot be null.public MonetaryAmount getBasePrice()
public java.lang.Long getCatEntryID()
public java.util.ArrayList getMatchKey()
public com.ibm.commerce.order.objects.OfferAccessBean getOffer()
public java.lang.Long getOfferID()
public MonetaryAmount getPrice()
public QuantityAmount getQuantity()
public java.lang.Long getTcID()
public java.lang.Long getTradingID()
public void setToIndex(int i, CatEntryPrices catEntry)
CatEntryPrices.initOutput(int)
should be called with the number
of prices that were calculated for the catalog entry.i
- The index into the arrays to set the values. Must be >= 0
and < the length of catEntry.getAllTradingIDs
.catEntry
- The catalog entry information object to add the information
from this to. Cannot be null, and must represent the same
catalog entry as this.public java.lang.String toString()
toString
in class java.lang.Object