public class PriceInputCase
extends java.lang.Object
GetContractUnitPriceCmd
,
GetContractSpecialPriceCmd
, or GetProductContractUnitPriceCmd
. This class is useful for splitting the input from one of these commands as
is done in CompositeGetContractUnitPriceCmdImpl
, or as just a way to
convert the input to a standard form to process the commands in a uniform
way.
There are two factory methods which create lists of input cases from other objects:
createPriceCases(CatEntryPrices, Integer, String, Long, Long, MixList)
createPriceCases(GetPriceCmdInput)
PriceInputCaseGetPriceCmdInput
class.Constructor and Description |
---|
PriceInputCase(java.lang.Integer newStoreID,
java.lang.String newCurrency,
java.lang.Long newOrganizationID,
java.lang.Long newMemberID,
java.lang.Long newTradingID,
java.lang.Long newCatEntryID,
MixList<java.lang.Long> newOfferIDs,
QuantityAmount newQuantity,
com.ibm.commerce.order.objects.OrderItemAccessBean newOrderItem,
java.util.Map newCustomData)
Constructor for PriceCase.
|
Modifier and Type | Method and Description |
---|---|
static java.util.List<PriceInputCase> |
createPriceCases(CatEntryPrices newCatEntry,
java.lang.Integer newStoreID,
java.lang.String newCurrency,
java.lang.Long newOrganizationID,
java.lang.Long newMemberID,
MixList<java.lang.Long> inputTradingIDs)
Returns price cases created from the given catalog entry information.
|
static java.util.List<PriceInputCase> |
createPriceCases(GetPriceCmdInput input)
Returns price cases created from the given command input object.
|
java.lang.Long |
getCatEntryID()
Returns the catalog entry to be used to calculate the price.
|
java.lang.String |
getCurrency()
Returns the currency to be used to calculate the price.
|
java.util.Map |
getCustomData()
Returns any custom data that is associated with the catalog entry.
|
java.util.ArrayList |
getMatchKey()
Returns the key used to match input to output cases.
|
java.lang.Long |
getMemberID()
Returns the member to be used to calculate the price.
|
MixList<java.lang.Long> |
getOfferIDs()
Returns the offers that should take precedence over other offers if
applicable.
|
com.ibm.commerce.order.objects.OrderItemAccessBean |
getOrderItem()
Returns the order item given by the order component.
|
java.lang.Long |
getOrganizationID()
Returns the organization to be used to calculate the price.
|
QuantityAmount |
getQuantity()
Returns the quantity to be used to calculate the price.
|
java.lang.Integer |
getStoreID()
Returns the store to be used to calculate the price.
|
java.lang.Long |
getTradingID()
Returns the trading agreement to be used to calculate the price.
|
java.lang.String |
toString()
Returns the string representation of this.
|
public PriceInputCase(java.lang.Integer newStoreID, java.lang.String newCurrency, java.lang.Long newOrganizationID, java.lang.Long newMemberID, java.lang.Long newTradingID, java.lang.Long newCatEntryID, MixList<java.lang.Long> newOfferIDs, QuantityAmount newQuantity, com.ibm.commerce.order.objects.OrderItemAccessBean newOrderItem, java.util.Map newCustomData)
newStoreID
- The store identifier. Cannot be null.newCurrency
- The 3-letter international currency code. Cannot be null or
empty.newOrganizationID
- The identifier of the organization that contains the member.
Cannot be null.newMemberID
- The identifier of the member, used to determine entitlement.
Cannot be null.newTradingID
- The trading agreement identifier. Cannot be null.newCatEntryID
- The catalog entry identifier. Cannot be null.newOfferIDs
- The offer IDs that take precedence when determining a price.
Cannot be null, but may be empty.newQuantity
- The quantity of the catalog entry. This is used to determine
the quantity range which determines the price. Cannot be null.newOrderItem
- The order item associated with the catalog entry. This is used
by the order component. This value may be null.newCustomData
- The custom data associated with the catalog entry. This value
may be null or empty.public static java.util.List<PriceInputCase> createPriceCases(CatEntryPrices newCatEntry, java.lang.Integer newStoreID, java.lang.String newCurrency, java.lang.Long newOrganizationID, java.lang.Long newMemberID, MixList<java.lang.Long> inputTradingIDs)
newCatEntry
- The catalog entry information to convert. Cannot be null.newStoreID
- The store identifier. Cannot be null.newCurrency
- The 3-letter international currency code. Cannot be null or
empty.newOrganizationID
- The identifier of the organization that contains the member.
Cannot be null.newMemberID
- The identifier of the member, used to determine entitlement.
Cannot be null.inputTradingIDs
- The trading IDs to use to create the price cases. These should
be created using TradingManager.getBasePool()
, using
the trading agreement identifiers from
newCatEntry
for the batch mode identifiers input.
This will ensure compatibility with previous behavior. Cannot
be null. If empty, no price cases will be created.public static java.util.List<PriceInputCase> createPriceCases(GetPriceCmdInput input)
input
- The command input object which contains the input data to be
split into price cases. Both single mode and batch mode are
supported. Cannot be null.public java.lang.Long getCatEntryID()
public java.lang.String getCurrency()
public java.util.Map getCustomData()
public java.util.ArrayList getMatchKey()
public java.lang.Long getMemberID()
public MixList<java.lang.Long> getOfferIDs()
public com.ibm.commerce.order.objects.OrderItemAccessBean getOrderItem()
public java.lang.Long getOrganizationID()
public QuantityAmount getQuantity()
public java.lang.Integer getStoreID()
public java.lang.Long getTradingID()
public java.lang.String toString()
toString
in class java.lang.Object