public class PriceOutputCaseGetPriceCmdOutput extends java.lang.Object implements GetPriceCmdOutput
GetPriceCmdOutput
which
is made up of many PriceOutputCases
. This is used to
reconstruct command output data from two or more commands, as is done in
CompositeGetContractUnitPriceCmdImpl
. This can also be used to
convert the output of another type of price calculation framework, by first
converting to output cases and then using this class to convert to command
output. This is done in the PriceRuleGetContractUnitPriceCmdImpl
class.Constructor and Description |
---|
PriceOutputCaseGetPriceCmdOutput(java.util.List<PriceInputCase> newPriceInputCases)
Constructor for PriceOutputCaseGetPriceCmdOutput.
|
Modifier and Type | Method and Description |
---|---|
void |
addPriceOutputCase(PriceOutputCase outputCase)
Adds the given output case to this.
|
MixList<java.lang.Long> |
getApplicableTradingIDs()
Returns the identifiers of the trading agreements that were used to
determine the prices for a catalog entry.
|
MixList<MonetaryAmount> |
getApplicableUnitPrices()
Returns the prices that were determined for each of the applied trading
agreements for a catalog entry.
|
MonetaryAmount |
getBasePrice()
Returns the best price of the input catalog entry before any currency
conversions.
|
MixList<CatEntryPrices> |
getCatEntries()
Returns the price related information for the input catalog entries.
|
com.ibm.commerce.order.objects.OfferAccessBean |
getOffer()
Returns the offer access bean that was used to determine the price.
|
java.lang.Long |
getOfferID()
Returns the identifier of the offer that was used to determine the price.
|
MonetaryAmount |
getPrice()
Returns the best price of the catalog entry in the requested currency.
|
java.lang.Long |
getTcID()
Returns the identifier of the term condition which was used to calculate
the best price.
|
java.lang.Long |
getTradingID()
Returns the identifier of the trading agreement which was used to
calculate the best price.
|
static boolean |
isInputMatchForOutput(PriceInputCase inputCase,
PriceOutputCase outputCase)
Returns whether the given output is the result for the given input.
|
java.lang.String |
toString()
Returns the string representation of this.
|
public PriceOutputCaseGetPriceCmdOutput(java.util.List<PriceInputCase> newPriceInputCases)
newPriceInputCases
- The list of input cases that were used before calling the
command. These are used to impose an order on the output cases
that matches the input order. Cannot be null, but may be
empty. Input cases that share the same catalog entry
identifier and quantity must also have the same order item.public void addPriceOutputCase(PriceOutputCase outputCase)
GetPriceCmdOutput
).outputCase
- The output case to add. Cannot be null.public MixList<java.lang.Long> getApplicableTradingIDs()
GetPriceCmdOutput
If the command is used in single mode, these identifiers will reflect the trading agreements that were specified for that catalog entry. If the command is used in batch mode, then these identifiers will reflect the trading agreements that were used for the first catalog entry in the input array.
getApplicableTradingIDs
in interface GetPriceCmdOutput
GetPriceCmdOutput.getPrice()
returns null.public MixList<MonetaryAmount> getApplicableUnitPrices()
GetPriceCmdOutput
#getApplicableTradingIds()
.
If the command is used in single mode, these prices will reflect the prices that were found for the input catalog entry. If the command is used in batch mode, then these prices will reflect the prices that were used for the first catalog entry in the input array.
getApplicableUnitPrices
in interface GetPriceCmdOutput
GetPriceCmdOutput.getPrice()
returns null.public MonetaryAmount getBasePrice()
GetPriceCmdOutput
If the command is used in single mode, this price will be for the input catalog entry. If the command is used in batch mode, then this price will be for the first catalog entry in the input array.
getBasePrice
in interface GetPriceCmdOutput
public MixList<CatEntryPrices> getCatEntries()
GetPriceCmdOutput
The following values reflect information about the best price for the catalog entry:
CatEntryPrices.getTradingId()
CatEntryPrices.getTcId()
CatEntryPrices.getOfferId()
CatEntryPrices.getOffer()
CatEntryPrices.getBasePrice()
CatEntryPrices.getUnitPrice()
The following values reflect information about all prices for the catalog entry:
CatEntryPrices.getAllTradingIds()
CatEntryPrices.getTradingTcIds()
CatEntryPrices.getTradingOfferIds()
CatEntryPrices.getTradingOffers()
CatEntryPrices.getTradingBasePrices()
CatEntryPrices.getTradingUnitPrices()
If this command is used in single mode, this array will contain one element corresponding to the input catalog entry. If this command is used in batch mode, then this array will contain the same catalog entry information, in the same order, as the input array.
In the latter case, the array itself is not guaranteed to be the same as the input array, and the elements are not guaranteed to be the same as those in the input array. However, for optimization purposes, they may be the same array and elements. In other words, users of this command should make no assumptions that the input array and elements are the same or different from the returned array.
getCatEntries
in interface GetPriceCmdOutput
#setCatEntryPrices
for information on the input array.public com.ibm.commerce.order.objects.OfferAccessBean getOffer()
GetPriceCmdOutput
If the command is used in single mode, this offer will be for the input catalog entry. If the command is used in batch mode, then this offer will be for the first catalog entry in the input array.
getOffer
in interface GetPriceCmdOutput
GetPriceCmdOutput.getPrice()
returns null.public java.lang.Long getOfferID()
GetPriceCmdOutput
If the command is used in single mode, this offer will be for the input catalog entry. If the command is used in batch mode, then this offer will be for the first catalog entry in the input array.
getOfferID
in interface GetPriceCmdOutput
GetPriceCmdOutput.getPrice()
returns null.public MonetaryAmount getPrice()
GetPriceCmdOutput
If the command is used in single mode, this price will be for the input catalog entry. If the command is used in batch mode, then this price will be for the first catalog entry in the input array.
getPrice
in interface GetPriceCmdOutput
error mode
is
set to true and no price was found.public java.lang.Long getTcID()
GetPriceCmdOutput
If the command is used in single mode, this term condition will be for the input catalog entry. If the command is used in batch mode, then this term condition will be for the first catalog entry in the input array.
getTcID
in interface GetPriceCmdOutput
GetPriceCmdOutput.getPrice()
returns null.public java.lang.Long getTradingID()
GetPriceCmdOutput
If the command is used in single mode, this trading agreement will be for the input catalog entry. If the command is used in batch mode, then this trading agreement will be for the first catalog entry in the input array.
getTradingID
in interface GetPriceCmdOutput
GetPriceCmdOutput.getPrice()
returns null.public static boolean isInputMatchForOutput(PriceInputCase inputCase, PriceOutputCase outputCase)
inputCase
- The input case which might match the given output. Cannot be
null.outputCase
- The output case to find a match for. Cannot be null.public java.lang.String toString()
toString
in class java.lang.Object