com.ibm.commerce.price.commands

Class CatEntryPrices

  • java.lang.Object
    • com.ibm.commerce.price.commands.CatEntryPrices


  • public class CatEntryPrices
    extends java.lang.Object
    Pricing info stored for input catalog entries.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM Copyright.
    • Constructor Summary

      Constructors 
      Constructor and Description
      CatEntryPrices(java.lang.Long anCatalogEntryId, QuantityAmount aQuantity)
      Constructor.
      CatEntryPrices(java.lang.Long anCatalogEntryId, QuantityAmount aQuantity, java.lang.Long[] aTradingIds, java.lang.Long[] aOfferIds)
      Constructor.
      CatEntryPrices(com.ibm.commerce.order.objects.OrderItemAccessBean aOrderItemAB)
      Constructor.
      CatEntryPrices(com.ibm.commerce.order.objects.OrderItemAccessBean aOrderItemAB, java.lang.Long[] aTradingIds, java.lang.Long[] aOfferIds)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.Long[] getAllTradingIds()
      Returns the trading IDs used to lookup the price of the catalog entry.
      MonetaryAmount getBasePrice()
      Returns the base price of the catalog entry.
      java.lang.Long getCatalogEntryId()
      Returns the catalog entry ID that is priced.
      java.util.Map getCustomData()
      get the customData for the catalog entry
      com.ibm.commerce.order.objects.OfferAccessBean getOffer()
      Returns the offer access bean that represents the offer used to price the catalog entry.
      java.lang.Long getOfferId()
      Returns the offer ID of the offer used to price this catalog entry.
      java.lang.Long[] getOfferIds()
      Get the offer IDs used to price the catalog entry under each trading agreement.
      com.ibm.commerce.order.objects.OrderItemAccessBean getOrderItem()
      Returns the order item access bean that represents the priced order item.
      java.lang.Long getOrderItemId()
      Returns the order item ID used to price the catalog entry.
      QuantityAmount getQuantity()
      Get Quantity for this catalog entry
      java.lang.Long getTcId()
      Get TermCondition ID
      MonetaryAmount getTradingBasePrice(int aIndex)
      Returns the price of this catalog entry under a trading agreement.
      MonetaryAmount[] getTradingBasePrices()
      Returns an array representing the price of the catalog entry from each of the trading agreements passed through setTradingIds().
      java.lang.Long getTradingId()
      Returns the ID of the trading agreement used to price the catalog entry.
      java.lang.Long[] getTradingIds()
      Returns an array of the trading agreement IDs used to price the catalog entry.
      com.ibm.commerce.order.objects.OfferAccessBean getTradingOffer(int aIndex)
      Returns the offer access bean representing the offer used to price the catalog entry under a trading agreement.
      java.lang.Long getTradingOfferId(int aIndex)
      Returns the ID of the offer used to price the catalog entry under a trading agreement.
      java.lang.Long[] getTradingOfferIds()
      Returns the IDs of the offers used to price the catalog entry under each trading agreement.
      com.ibm.commerce.order.objects.OfferAccessBean[] getTradingOffers()
      Returns the offer access beans used to price the catalog entry under each trading agreement.
      java.lang.Long getTradingTcId(int aIndex)
      Returns the term condition ID under which the winning offer was found under a trading agreement.
      java.lang.Long[] getTradingTcIds()
      Returns the term condition IDs under which the winning offer for each trading agreement was found.
      MonetaryAmount getTradingUnitPrice(int aIndex)
      Returns the price of the catalog entry under a trading agreement as a MonetaryAmount object.
      MonetaryAmount[] getTradingUnitPrices()
      Returns an array of MonetaryAmount prices of the catalog entry under the trading agreements.
      MonetaryAmount getUnitPrice()
      Returns the price of the catalog entry as a MonetaryAmount object.
      void initOutput(int aSize)
      Initialize the variables for output
      void refresh()
      Refreshes the values returned by the getter methods.
      void setAllTradingIds(java.lang.Long[] aTradingIds)
      Sets the trading IDs to use for pricing the catalog entry.
      void setBasePrice(MonetaryAmount aPrice)
      Sets the base price for the catalog entry.
      void setCatalogEntryId(java.lang.Long anCatalogEntryId)
      Sets the catalog entry ID to price.
      void setCustomData(java.util.Map aCustomData)
      set the customData for the catalog entry
      void setOffer(com.ibm.commerce.order.objects.OfferAccessBean aOffer)
      Set the offer used to price the catalog entry.
      void setOfferId(java.lang.Long aOfferId)
      Set the offer used to price the catalog entry.
      void setOfferIds(java.lang.Long[] aOfferIds)
      Set a set of offers
      void setOrderItem(com.ibm.commerce.order.objects.OrderItemAccessBean aOrderItemAB)
      Sets the order item of the catalog entry ID to price.
      void setOrderItemId(java.lang.Long anOrderItemId)
      Set order item ID
      void setQuantity(QuantityAmount aQuantity)
      Sets the quantity of the catalog entry ID to price.
      void setTcId(java.lang.Long aTcId)
      Sets the ID of the term condition used to price the catalog entry.
      void setTradingBasePrices(MonetaryAmount[] aPrices)
      Set the prices of the catalog entry for the trading agreements.
      void setTradingId(java.lang.Long anTradingId)
      Sets the trading ID used to price the catalog entry.
      void setTradingIds(java.lang.Long[] aTradingIds)
      Sets trading IDs used to price the catalog entry.
      void setTradingOfferIds(java.lang.Long[] aOfferIds)
      Set offer IDs to use to price the catalog entry.
      void setTradingOffers(com.ibm.commerce.order.objects.OfferAccessBean[] aOffers)
      Sets the offer access beans used to price the catalog entry under each trading agreement.
      void setTradingTcIds(java.lang.Long[] aTcIds)
      Sets the term condition IDs used to price the catalog entry under the trading agreements.
      void setTradingUnitPrices(MonetaryAmount[] aPrices, com.ibm.commerce.common.objects.StoreAccessBean aStoreAB)
      Sets the prices for the catalog entry in each trading agreement.
      void setUnitPrice(MonetaryAmount aPrice)
      Sets the price for the catalog entry.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM Copyright.
        See Also:
        Constant Field Values
    • Constructor Detail

      • CatEntryPrices

        public CatEntryPrices(java.lang.Long anCatalogEntryId,
                              QuantityAmount aQuantity)
                       throws com.ibm.commerce.exception.ECException
        Constructor. Creates an instance based on a catalog entry ID and a quantity.
        Parameters:
        aCatalogEntryId - a Catalog entry ID
        aQuantity - a QuantityAmount
        Throws:
        com.ibm.commerce.exception.ECException - when initialization fails.
      • CatEntryPrices

        public CatEntryPrices(java.lang.Long anCatalogEntryId,
                              QuantityAmount aQuantity,
                              java.lang.Long[] aTradingIds,
                              java.lang.Long[] aOfferIds)
                       throws com.ibm.commerce.exception.ECException
        Constructor. Creates an instance based on a catalog entry ID and a quantity using the contract IDs and offer IDs passed.
        Parameters:
        aCatalogEntryId - a Catalog entry ID
        aQuantity - a QuantityAmount
        aTradingIds - Trading IDs
        aOfferIds - Offer IDs
        Throws:
        com.ibm.commerce.exception.ECException - thrown when initialization fails.
      • CatEntryPrices

        public CatEntryPrices(com.ibm.commerce.order.objects.OrderItemAccessBean aOrderItemAB)
                       throws com.ibm.commerce.exception.ECException
        Constructor. Creates an instance based on an order item.
        Parameters:
        aOrderItemAB - an OrderItem accessbean
        Throws:
        com.ibm.commerce.exception.ECException - thrown when the bean cannot be used to retrieve the order item ID.
      • CatEntryPrices

        public CatEntryPrices(com.ibm.commerce.order.objects.OrderItemAccessBean aOrderItemAB,
                              java.lang.Long[] aTradingIds,
                              java.lang.Long[] aOfferIds)
                       throws com.ibm.commerce.exception.ECException
        Constructor. Creates an instance based on an order item using the contract IDs and offer IDs passed.
        Parameters:
        aOrderItemAB - an OrderItem accessbean
        aTradingIds[] - an array of Trading IDs
        aOfferIds[] - an array of Offer IDs
        Throws:
        com.ibm.commerce.exception.ECException - thrown when the bean cannot be used to retrieve the order item ID.
    • Method Detail

      • getAllTradingIds

        public java.lang.Long[] getAllTradingIds()
        Returns the trading IDs used to lookup the price of the catalog entry.
        Returns:
        an array of the trading IDs used.
      • getBasePrice

        public MonetaryAmount getBasePrice()
        Returns the base price of the catalog entry.
        Returns:
        a monetary amount
      • getCatalogEntryId

        public java.lang.Long getCatalogEntryId()
        Returns the catalog entry ID that is priced.
        Returns:
        the catalog entry ID.
      • getCustomData

        public java.util.Map getCustomData()
        get the customData for the catalog entry
        Returns:
        the customData for the catalog entry
      • getOffer

        public com.ibm.commerce.order.objects.OfferAccessBean getOffer()
        Returns the offer access bean that represents the offer used to price the catalog entry.
        Returns:
        the access bean that was used to determine the winning price.
      • getOfferId

        public java.lang.Long getOfferId()
        Returns the offer ID of the offer used to price this catalog entry.
        Returns:
        the offer ID.
      • getOfferIds

        public java.lang.Long[] getOfferIds()
        Get the offer IDs used to price the catalog entry under each trading agreement.
        Returns:
        an array of Offer IDs whose index corresponds to the index of the trading agreement array passed through setTradingIds().
      • getOrderItem

        public com.ibm.commerce.order.objects.OrderItemAccessBean getOrderItem()
        Returns the order item access bean that represents the priced order item.
        Returns:
        the order item access bean.
      • getOrderItemId

        public java.lang.Long getOrderItemId()
        Returns the order item ID used to price the catalog entry.
        Returns:
        the order item ID.
      • getQuantity

        public QuantityAmount getQuantity()
        Get Quantity for this catalog entry
        Returns:
        QuantityAmount a quantity
      • getTcId

        public java.lang.Long getTcId()
        Get TermCondition ID
        Returns:
        Long a termcond ID
      • getTradingBasePrice

        public MonetaryAmount getTradingBasePrice(int aIndex)
        Returns the price of this catalog entry under a trading agreement.
        Parameters:
        aIndex - the index of the trading agreement from which the price should be returned. This index corresponds to the index of the array passed using setTradingIds();
        Returns:
        a MonetaryAmount representing the price of the catalog entry under the trading agreement.
      • getTradingBasePrices

        public MonetaryAmount[] getTradingBasePrices()
        Returns an array representing the price of the catalog entry from each of the trading agreements passed through setTradingIds().
        Returns:
        an array of MonetaryAmount objects represents the price of the catalog entry under each trading agreement.
      • getTradingId

        public java.lang.Long getTradingId()
        Returns the ID of the trading agreement used to price the catalog entry.
        Returns:
        the trading agreement ID.
      • getTradingIds

        public java.lang.Long[] getTradingIds()
        Returns an array of the trading agreement IDs used to price the catalog entry.
        Returns:
        an array of the trading agreement IDs used to price the catalog entry.
      • getTradingOffer

        public com.ibm.commerce.order.objects.OfferAccessBean getTradingOffer(int aIndex)
        Returns the offer access bean representing the offer used to price the catalog entry under a trading agreement.
        Parameters:
        aIndex - the index of the trading agreement for which the offer access bean should be returned.
        Returns:
        an offer access bean representing the offer used under the trading agreement.
      • getTradingOfferId

        public java.lang.Long getTradingOfferId(int aIndex)
        Returns the ID of the offer used to price the catalog entry under a trading agreement.
        Parameters:
        aIndex - the index of the trading agreement for which the offer access bean should be returned.
        Returns:
        the offer ID of the offer used under the trading agreement.
      • getTradingOfferIds

        public java.lang.Long[] getTradingOfferIds()
        Returns the IDs of the offers used to price the catalog entry under each trading agreement.
        Returns:
        an array of offer IDs whose index corresponds to the index of the array passed through setTradingIds().
      • getTradingOffers

        public com.ibm.commerce.order.objects.OfferAccessBean[] getTradingOffers()
        Returns the offer access beans used to price the catalog entry under each trading agreement.
        Returns:
        an array of offer access beans whose index corresponds to the index of the array passed through setTradingIds().
      • getTradingTcId

        public java.lang.Long getTradingTcId(int aIndex)
        Returns the term condition ID under which the winning offer was found under a trading agreement.
        Parameters:
        aIndex - the index of the trading agreement for which the term and condition should be returned.
        Returns:
        the ID of the term and condition.
      • getTradingTcIds

        public java.lang.Long[] getTradingTcIds()
        Returns the term condition IDs under which the winning offer for each trading agreement was found.
        Parameters:
        aIndex - the index of the trading agreement for which the term and condition should be returned.
        Returns:
        an array of the term and condition IDs.
      • getTradingUnitPrice

        public MonetaryAmount getTradingUnitPrice(int aIndex)
        Returns the price of the catalog entry under a trading agreement as a MonetaryAmount object.
        Parameters:
        aIndex - the index of the trading agreement for which the price should be returned.
        Returns:
        the price as a MonetaryAmount object.
      • getTradingUnitPrices

        public MonetaryAmount[] getTradingUnitPrices()
        Returns an array of MonetaryAmount prices of the catalog entry under the trading agreements.
        Parameters:
        aIndex - the index of the trading agreement for which the price should be returned.
        Returns:
        the prices from the trading agreements as MonetaryAmount objects.
      • getUnitPrice

        public MonetaryAmount getUnitPrice()
        Returns the price of the catalog entry as a MonetaryAmount object.
        Returns:
        the price as a MonetaryAmount object.
      • initOutput

        public void initOutput(int aSize)
        Initialize the variables for output
        Parameters:
        aSize - the number of trading agreements used to price the catalog entry.
      • refresh

        public void refresh()
                     throws com.ibm.commerce.exception.ECException
        Refreshes the values returned by the getter methods.
        Throws:
        com.ibm.commerce.exception.ECException - when the refresh could not retrieve the data required to refresh.
      • setAllTradingIds

        public void setAllTradingIds(java.lang.Long[] aTradingIds)
        Sets the trading IDs to use for pricing the catalog entry.
        Parameters:
        aTradingIds - an array of the trading IDs used to price.
      • setBasePrice

        public void setBasePrice(MonetaryAmount aPrice)
        Sets the base price for the catalog entry.
        Parameters:
        aPrice - the base price
      • setCatalogEntryId

        public void setCatalogEntryId(java.lang.Long anCatalogEntryId)
        Sets the catalog entry ID to price.
        Parameters:
        anCatalogEntryId - the ID of the catalog entry to price.
      • setCustomData

        public void setCustomData(java.util.Map aCustomData)
        set the customData for the catalog entry
        Parameters:
        aCustomData - the custom data of the catalog entry
      • setOffer

        public void setOffer(com.ibm.commerce.order.objects.OfferAccessBean aOffer)
        Set the offer used to price the catalog entry.
        Parameters:
        aOffer - the OfferAccessBean of the offer used to price the catalog entry.
      • setOfferId

        public void setOfferId(java.lang.Long aOfferId)
        Set the offer used to price the catalog entry.
        Parameters:
        aOfferId - the ID of the offer used to price the catalog entry.
      • setOfferIds

        public void setOfferIds(java.lang.Long[] aOfferIds)
        Set a set of offers
        Parameters:
        aOfferIds - a set of offer IDs
      • setOrderItem

        public void setOrderItem(com.ibm.commerce.order.objects.OrderItemAccessBean aOrderItemAB)
        Sets the order item of the catalog entry ID to price.
        Parameters:
        aOrderItemAB - the OrderItemAccessBean of the catalog entry ID.
      • setOrderItemId

        public void setOrderItemId(java.lang.Long anOrderItemId)
        Set order item ID
        Parameters:
        aOrderItemAB - a ID of an order itme
      • setQuantity

        public void setQuantity(QuantityAmount aQuantity)
        Sets the quantity of the catalog entry ID to price.
        Parameters:
        aQuantity - a QuantityAmount representing the quantity of the catalog entry.
      • setTcId

        public void setTcId(java.lang.Long aTcId)
        Sets the ID of the term condition used to price the catalog entry.
        Parameters:
        aTcId - the ID of the term condition.
      • setTradingBasePrices

        public void setTradingBasePrices(MonetaryAmount[] aPrices)
        Set the prices of the catalog entry for the trading agreements.
        Parameters:
        aPrices - an array of the prices from the trading agreements.
      • setTradingId

        public void setTradingId(java.lang.Long anTradingId)
        Sets the trading ID used to price the catalog entry.
        Parameters:
        anTradingId - the trading ID used to price the catalog entry.
      • setTradingIds

        public void setTradingIds(java.lang.Long[] aTradingIds)
        Sets trading IDs used to price the catalog entry.
        Parameters:
        aTradingIds - an array of the trading IDs used to price the catalog entry.
      • setTradingOfferIds

        public void setTradingOfferIds(java.lang.Long[] aOfferIds)
        Set offer IDs to use to price the catalog entry.
        Parameters:
        aOfferIds - an array of offer IDs to use to price the catalog entry.
      • setTradingOffers

        public void setTradingOffers(com.ibm.commerce.order.objects.OfferAccessBean[] aOffers)
        Sets the offer access beans used to price the catalog entry under each trading agreement.
        Parameters:
        aOffers - the array of offer access beans.
      • setTradingTcIds

        public void setTradingTcIds(java.lang.Long[] aTcIds)
        Sets the term condition IDs used to price the catalog entry under the trading agreements.
        Parameters:
        aTcIds - an array of term condition IDs from the trading agreements.
      • setTradingUnitPrices

        public void setTradingUnitPrices(MonetaryAmount[] aPrices,
                                         com.ibm.commerce.common.objects.StoreAccessBean aStoreAB)
                                  throws com.ibm.commerce.exception.ECException
        Sets the prices for the catalog entry in each trading agreement.
        Parameters:
        aPrices - an array of MonetaryAmount
        aStoreAB - a store accessbean
        Throws:
        com.ibm.commerce.exception.ECException
      • setUnitPrice

        public void setUnitPrice(MonetaryAmount aPrice)
        Sets the price for the catalog entry.
        Parameters:
        aPrice - the price of the catalog entry