Class ShoppingCartItem

  • All Implemented Interfaces:
    java.io.Serializable

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

    Title: ShoppingCartItem.java

    Description: Shopping cart item object.

    See Also:
    Serialized Form
    • Field Detail

      • module

        public static final java.lang.String module
      • attributeNames

        protected static final java.lang.String[] attributeNames
      • generalRounding

        public static final java.math.MathContext generalRounding
    • Constructor Detail

      • ShoppingCartItem

        public ShoppingCartItem​(ShoppingCartItem item)
        Clone an item.
      • ShoppingCartItem

        protected ShoppingCartItem()
        Cannot create shopping cart item with no parameters
      • ShoppingCartItem

        protected ShoppingCartItem​(GenericValue product,
                                   java.util.Map<java.lang.String,​GenericValue> additionalProductFeatureAndAppls,
                                   java.util.Map<java.lang.String,​java.lang.Object> attributes,
                                   java.lang.String prodCatalogId,
                                   java.util.Locale locale,
                                   java.lang.String itemType,
                                   ShoppingCart.ShoppingCartItemGroup itemGroup,
                                   LocalDispatcher dispatcher)
        Creates new ShoppingCartItem object.
        Parameters:
        dispatcher - TODO
      • ShoppingCartItem

        protected ShoppingCartItem​(GenericValue product,
                                   java.util.Map<java.lang.String,​GenericValue> additionalProductFeatureAndAppls,
                                   java.util.Map<java.lang.String,​java.lang.Object> attributes,
                                   java.lang.String prodCatalogId,
                                   ProductConfigWrapper configWrapper,
                                   java.util.Locale locale,
                                   java.lang.String itemType,
                                   ShoppingCart.ShoppingCartItemGroup itemGroup,
                                   GenericValue parentProduct)
        Creates new ShoppingCartItem object.
      • ShoppingCartItem

        protected ShoppingCartItem​(Delegator delegator,
                                   java.lang.String itemTypeId,
                                   java.lang.String description,
                                   java.lang.String categoryId,
                                   java.math.BigDecimal basePrice,
                                   java.util.Map<java.lang.String,​java.lang.Object> attributes,
                                   java.lang.String prodCatalogId,
                                   java.util.Locale locale,
                                   ShoppingCart.ShoppingCartItemGroup itemGroup)
        Creates new ShopingCartItem object.
    • Method Detail

      • makePurchaseOrderItem

        public static ShoppingCartItem makePurchaseOrderItem​(java.lang.Integer cartLocation,
                                                             java.lang.String productId,
                                                             java.math.BigDecimal selectedAmount,
                                                             java.math.BigDecimal quantity,
                                                             java.util.Map<java.lang.String,​GenericValue> additionalProductFeatureAndAppls,
                                                             java.util.Map<java.lang.String,​java.lang.Object> attributes,
                                                             java.lang.String prodCatalogId,
                                                             ProductConfigWrapper configWrapper,
                                                             java.lang.String itemType,
                                                             ShoppingCart.ShoppingCartItemGroup itemGroup,
                                                             LocalDispatcher dispatcher,
                                                             ShoppingCart cart,
                                                             GenericValue supplierProduct,
                                                             java.sql.Timestamp shipBeforeDate,
                                                             java.sql.Timestamp shipAfterDate,
                                                             java.sql.Timestamp cancelBackOrderDate)
                                                      throws CartItemModifyException,
                                                             ItemNotFoundException
        Makes a ShoppingCartItem for a purchase order item and adds it to the cart. NOTE: This method will get the product entity and check to make sure it can be purchased.
        Parameters:
        cartLocation - The location to place this item; null will place at the end
        productId - The primary key of the product being added
        quantity - The quantity to add
        additionalProductFeatureAndAppls - Product feature/appls map
        attributes - All unique attributes for this item (NOT features)
        prodCatalogId - The catalog this item was added from
        configWrapper - The product configuration wrapper (null if the product is not configurable)
        dispatcher - LocalDispatcher object for doing promotions, etc
        cart - The parent shopping cart object this item will belong to
        supplierProduct - GenericValue of SupplierProduct entity, containing product description and prices
        shipBeforeDate - Request that the shipment be made before this date
        shipAfterDate - Request that the shipment be made after this date
        cancelBackOrderDate - The date which if crossed causes order cancellation
        Returns:
        a new ShoppingCartItem object
        Throws:
        CartItemModifyException
        ItemNotFoundException
      • makeItem

        public static ShoppingCartItem makeItem​(java.lang.Integer cartLocation,
                                                java.lang.String productId,
                                                java.math.BigDecimal selectedAmount,
                                                java.math.BigDecimal quantity,
                                                java.math.BigDecimal unitPrice,
                                                java.sql.Timestamp reservStart,
                                                java.math.BigDecimal reservLength,
                                                java.math.BigDecimal reservPersons,
                                                java.sql.Timestamp shipBeforeDate,
                                                java.sql.Timestamp shipAfterDate,
                                                java.util.Map<java.lang.String,​GenericValue> additionalProductFeatureAndAppls,
                                                java.util.Map<java.lang.String,​java.lang.Object> attributes,
                                                java.lang.String prodCatalogId,
                                                ProductConfigWrapper configWrapper,
                                                java.lang.String itemType,
                                                ShoppingCart.ShoppingCartItemGroup itemGroup,
                                                LocalDispatcher dispatcher,
                                                ShoppingCart cart,
                                                java.lang.Boolean triggerExternalOpsBool,
                                                java.lang.Boolean triggerPriceRulesBool,
                                                java.lang.String parentProductId,
                                                java.lang.Boolean skipInventoryChecks,
                                                java.lang.Boolean skipProductChecks)
                                         throws CartItemModifyException,
                                                ItemNotFoundException
        Makes a ShoppingCartItem and adds it to the cart. NOTE: This method will get the product entity and check to make sure it can be purchased.
        Parameters:
        cartLocation - The location to place this item; null will place at the end
        productId - The primary key of the product being added
        selectedAmount - Optional. Defaults to 0.0. If a selectedAmount is needed (complements the quantity value), pass it in here.
        quantity - Required. The quantity to add.
        unitPrice - Optional. Defaults to 0.0, which causes calculation of price.
        reservStart - Optional. The start of the reservation.
        reservLength - Optional. The length of the reservation.
        reservPersons - Optional. The number of persons taking advantage of the reservation.
        shipBeforeDate - Optional. The date to ship the order by.
        shipAfterDate - Optional. Wait until this date to ship.
        additionalProductFeatureAndAppls - Optional. Product feature/appls map.
        attributes - Optional. All unique attributes for this item (NOT features).
        prodCatalogId - Optional, but strongly recommended. The catalog this item was added from.
        configWrapper - Optional. The product configuration wrapper (null if the product is not configurable).
        itemType - Optional. Specifies the type of cart item, corresponds to an OrderItemType and should be a valid orderItemTypeId.
        itemGroup - Optional. Specifies which item group in the cart this should belong to, if item groups are needed/desired.
        dispatcher - Required (for price calculation, promos, etc). LocalDispatcher object for doing promotions, etc.
        cart - Required. The parent shopping cart object this item will belong to.
        triggerExternalOpsBool - Optional. Defaults to true. Trigger external operations (like promotions and such)?
        triggerPriceRulesBool - Optional. Defaults to true. Trigger the price rules to calculate the price for this item?
        Returns:
        a new ShoppingCartItem object
        Throws:
        CartItemModifyException
        ItemNotFoundException
      • makeItem

        public static ShoppingCartItem makeItem​(java.lang.Integer cartLocation,
                                                java.lang.String productId,
                                                java.math.BigDecimal selectedAmount,
                                                java.math.BigDecimal quantity,
                                                java.math.BigDecimal unitPrice,
                                                java.sql.Timestamp reservStart,
                                                java.math.BigDecimal reservLength,
                                                java.math.BigDecimal reservPersons,
                                                java.lang.String accommodationMapId,
                                                java.lang.String accommodationSpotId,
                                                java.sql.Timestamp shipBeforeDate,
                                                java.sql.Timestamp shipAfterDate,
                                                java.util.Map<java.lang.String,​GenericValue> additionalProductFeatureAndAppls,
                                                java.util.Map<java.lang.String,​java.lang.Object> attributes,
                                                java.lang.String prodCatalogId,
                                                ProductConfigWrapper configWrapper,
                                                java.lang.String itemType,
                                                ShoppingCart.ShoppingCartItemGroup itemGroup,
                                                LocalDispatcher dispatcher,
                                                ShoppingCart cart,
                                                java.lang.Boolean triggerExternalOpsBool,
                                                java.lang.Boolean triggerPriceRulesBool,
                                                java.lang.String parentProductId,
                                                java.lang.Boolean skipInventoryChecks,
                                                java.lang.Boolean skipProductChecks)
                                         throws CartItemModifyException,
                                                ItemNotFoundException
        Throws:
        CartItemModifyException
        ItemNotFoundException
      • makeItem

        public static ShoppingCartItem makeItem​(java.lang.Integer cartLocation,
                                                java.lang.String productId,
                                                java.math.BigDecimal selectedAmount,
                                                java.math.BigDecimal quantity,
                                                java.math.BigDecimal unitPrice,
                                                java.sql.Timestamp reservStart,
                                                java.math.BigDecimal reservLength,
                                                java.math.BigDecimal reservPersons,
                                                java.lang.String accommodationMapId,
                                                java.lang.String accommodationSpotId,
                                                java.sql.Timestamp shipBeforeDate,
                                                java.sql.Timestamp shipAfterDate,
                                                java.sql.Timestamp reserveAfterDate,
                                                java.util.Map<java.lang.String,​GenericValue> additionalProductFeatureAndAppls,
                                                java.util.Map<java.lang.String,​java.lang.Object> attributes,
                                                java.lang.String prodCatalogId,
                                                ProductConfigWrapper configWrapper,
                                                java.lang.String itemType,
                                                ShoppingCart.ShoppingCartItemGroup itemGroup,
                                                LocalDispatcher dispatcher,
                                                ShoppingCart cart,
                                                java.lang.Boolean triggerExternalOpsBool,
                                                java.lang.Boolean triggerPriceRulesBool,
                                                java.lang.String parentProductId,
                                                java.lang.Boolean skipInventoryChecks,
                                                java.lang.Boolean skipProductChecks)
                                         throws CartItemModifyException,
                                                ItemNotFoundException
        Makes a ShoppingCartItem and adds it to the cart.
        Parameters:
        accommodationMapId - Optional. reservations add into workeffort
        accommodationSpotId - Optional. reservations add into workeffort
        Throws:
        CartItemModifyException
        ItemNotFoundException
      • makeItem

        public static ShoppingCartItem makeItem​(java.lang.Integer cartLocation,
                                                GenericValue product,
                                                java.math.BigDecimal selectedAmount,
                                                java.math.BigDecimal quantity,
                                                java.math.BigDecimal unitPrice,
                                                java.sql.Timestamp reservStart,
                                                java.math.BigDecimal reservLength,
                                                java.math.BigDecimal reservPersons,
                                                java.sql.Timestamp shipBeforeDate,
                                                java.sql.Timestamp shipAfterDate,
                                                java.util.Map<java.lang.String,​GenericValue> additionalProductFeatureAndAppls,
                                                java.util.Map<java.lang.String,​java.lang.Object> attributes,
                                                java.lang.String prodCatalogId,
                                                ProductConfigWrapper configWrapper,
                                                java.lang.String itemType,
                                                ShoppingCart.ShoppingCartItemGroup itemGroup,
                                                LocalDispatcher dispatcher,
                                                ShoppingCart cart,
                                                java.lang.Boolean triggerExternalOpsBool,
                                                java.lang.Boolean triggerPriceRulesBool,
                                                GenericValue parentProduct,
                                                java.lang.Boolean skipInventoryChecks,
                                                java.lang.Boolean skipProductChecks)
                                         throws CartItemModifyException
        Makes a ShoppingCartItem and adds it to the cart. WARNING: This method does not check if the product is in a purchase category. rental fields were added.
        Parameters:
        cartLocation - The location to place this item; null will place at the end
        product - The product entity relating to the product being added
        selectedAmount - Optional. Defaults to 0.0. If a selectedAmount is needed (complements the quantity value), pass it in here.
        quantity - Required. The quantity to add.
        unitPrice - Optional. Defaults to 0.0, which causes calculation of price.
        reservStart - Optional. The start of the reservation.
        reservLength - Optional. The length of the reservation.
        reservPersons - Optional. The number of persons taking advantage of the reservation.
        shipBeforeDate - Optional. The date to ship the order by.
        shipAfterDate - Optional. Wait until this date to ship.
        additionalProductFeatureAndAppls - Optional. Product feature/appls map.
        attributes - Optional. All unique attributes for this item (NOT features).
        prodCatalogId - Optional, but strongly recommended. The catalog this item was added from.
        configWrapper - Optional. The product configuration wrapper (null if the product is not configurable).
        itemType - Optional. Specifies the type of cart item, corresponds to an OrderItemType and should be a valid orderItemTypeId.
        itemGroup - Optional. Specifies which item group in the cart this should belong to, if item groups are needed/desired.
        dispatcher - Required (for price calculation, promos, etc). LocalDispatcher object for doing promotions, etc.
        cart - Required. The parent shopping cart object this item will belong to.
        triggerExternalOpsBool - Optional. Defaults to true. Trigger external operations (like promotions and such)?
        triggerPriceRulesBool - Optional. Defaults to true. Trigger the price rules to calculate the price for this item?
        Returns:
        a new ShoppingCartItem object
        Throws:
        CartItemModifyException
      • makeItem

        public static ShoppingCartItem makeItem​(java.lang.Integer cartLocation,
                                                GenericValue product,
                                                java.math.BigDecimal selectedAmount,
                                                java.math.BigDecimal quantity,
                                                java.math.BigDecimal unitPrice,
                                                java.sql.Timestamp reservStart,
                                                java.math.BigDecimal reservLength,
                                                java.math.BigDecimal reservPersons,
                                                java.lang.String accommodationMapId,
                                                java.lang.String accommodationSpotId,
                                                java.sql.Timestamp shipBeforeDate,
                                                java.sql.Timestamp shipAfterDate,
                                                java.sql.Timestamp reserveAfterDate,
                                                java.util.Map<java.lang.String,​GenericValue> additionalProductFeatureAndAppls,
                                                java.util.Map<java.lang.String,​java.lang.Object> attributes,
                                                java.lang.String prodCatalogId,
                                                ProductConfigWrapper configWrapper,
                                                java.lang.String itemType,
                                                ShoppingCart.ShoppingCartItemGroup itemGroup,
                                                LocalDispatcher dispatcher,
                                                ShoppingCart cart,
                                                java.lang.Boolean triggerExternalOpsBool,
                                                java.lang.Boolean triggerPriceRulesBool,
                                                GenericValue parentProduct,
                                                java.lang.Boolean skipInventoryChecks,
                                                java.lang.Boolean skipProductChecks)
                                         throws CartItemModifyException
        Makes a ShoppingCartItem and adds it to the cart.
        Parameters:
        accommodationMapId - Optional. reservations add into workeffort
        accommodationSpotId - Optional. reservations add into workeffort
        Throws:
        CartItemModifyException
      • makeItem

        public static ShoppingCartItem makeItem​(java.lang.Integer cartLocation,
                                                java.lang.String itemType,
                                                java.lang.String itemDescription,
                                                java.lang.String productCategoryId,
                                                java.math.BigDecimal basePrice,
                                                java.math.BigDecimal selectedAmount,
                                                java.math.BigDecimal quantity,
                                                java.util.Map<java.lang.String,​java.lang.Object> attributes,
                                                java.lang.String prodCatalogId,
                                                ShoppingCart.ShoppingCartItemGroup itemGroup,
                                                LocalDispatcher dispatcher,
                                                ShoppingCart cart,
                                                java.lang.Boolean triggerExternalOpsBool)
                                         throws CartItemModifyException
        Makes a non-product ShoppingCartItem and adds it to the cart. NOTE: This is only for non-product items; items without a product entity (work items, bulk items, etc)
        Parameters:
        cartLocation - The location to place this item; null will place at the end
        itemType - The OrderItemTypeId for the item being added
        itemDescription - The optional description of the item
        productCategoryId - The optional category the product *will* go in
        basePrice - The price for this item
        selectedAmount -
        quantity - The quantity to add
        attributes - All unique attributes for this item (NOT features)
        prodCatalogId - The catalog this item was added from
        dispatcher - LocalDispatcher object for doing promotions, etc
        cart - The parent shopping cart object this item will belong to
        triggerExternalOpsBool - Indicates if we should run external operations (promotions, auto-save, etc)
        Returns:
        a new ShoppingCartItem object
        Throws:
        CartItemModifyException
      • getProdCatalogId

        public java.lang.String getProdCatalogId()
      • setExternalId

        public void setExternalId​(java.lang.String externalId)
      • getExternalId

        public java.lang.String getExternalId()
      • setSelectedAmount

        public void setSelectedAmount​(java.math.BigDecimal selectedAmount)
        Sets the user selected amount
      • getSelectedAmount

        public java.math.BigDecimal getSelectedAmount()
        Returns the user selected amount
      • setBasePrice

        public void setBasePrice​(java.math.BigDecimal basePrice)
        Sets the base price for the item; use with caution
      • setDisplayPrice

        public void setDisplayPrice​(java.math.BigDecimal displayPrice)
        Sets the display price for the item; use with caution
      • setRecurringBasePrice

        public void setRecurringBasePrice​(java.math.BigDecimal recurringBasePrice)
        Sets the base price for the item; use with caution
      • setRecurringDisplayPrice

        public void setRecurringDisplayPrice​(java.math.BigDecimal recurringDisplayPrice)
        Sets the display price for the item; use with caution
      • setSpecialPromoPrice

        public void setSpecialPromoPrice​(java.math.BigDecimal specialPromoPrice)
      • setReserv2ndPPPerc

        public void setReserv2ndPPPerc​(java.math.BigDecimal reserv2ndPPPerc)
        Sets the extra % for second person
      • setReservNthPPPerc

        public void setReservNthPPPerc​(java.math.BigDecimal reservNthPPPerc)
        Sets the extra % for third and following person
      • setReservStart

        public void setReservStart​(java.sql.Timestamp reservStart)
        Sets the reservation start date
      • setReservLength

        public void setReservLength​(java.math.BigDecimal reservLength)
        Sets the reservation length
      • setReservPersons

        public void setReservPersons​(java.math.BigDecimal reservPersons)
        Sets number of persons using the reservation
      • setAccommodationId

        public void setAccommodationId​(java.lang.String accommodationMapId,
                                       java.lang.String accommodationSpotId)
        Sets accommodationId using the reservation
      • checkAvailability

        public static java.lang.String checkAvailability​(java.lang.String productId,
                                                         java.math.BigDecimal quantity,
                                                         java.sql.Timestamp reservStart,
                                                         java.math.BigDecimal reservLength,
                                                         ShoppingCart cart)
        returns "OK" when the product can be booked or returns a string with the dates the related fixed Asset is not available
      • calcDepositAdjustments

        public void calcDepositAdjustments()
      • getQuantity

        public java.math.BigDecimal getQuantity()
        Returns the quantity.
      • getReservStart

        public java.sql.Timestamp getReservStart()
        Returns the reservation start date.
      • getReservStart

        public java.sql.Timestamp getReservStart​(java.math.BigDecimal addDays)
        Returns the reservation start date with a number of days added.
      • getReservLength

        public java.math.BigDecimal getReservLength()
        Returns the reservation length.
      • getReservPersons

        public java.math.BigDecimal getReservPersons()
        Returns the reservation number of persons.
      • getAccommodationMapId

        public java.lang.String getAccommodationMapId()
        Returns accommodationMapId
      • getAccommodationSpotId

        public java.lang.String getAccommodationSpotId()
        Returns accommodationSpotId
      • getPromoQuantityUsed

        public java.math.BigDecimal getPromoQuantityUsed()
      • getPromoQuantityAvailable

        public java.math.BigDecimal getPromoQuantityAvailable()
      • getQuantityUsedPerPromoActualIter

        public java.util.Iterator<java.util.Map.Entry<GenericPK,​java.math.BigDecimal>> getQuantityUsedPerPromoActualIter()
      • getQuantityUsedPerPromoCandidateIter

        public java.util.Iterator<java.util.Map.Entry<GenericPK,​java.math.BigDecimal>> getQuantityUsedPerPromoCandidateIter()
      • getQuantityUsedPerPromoFailedIter

        public java.util.Iterator<java.util.Map.Entry<GenericPK,​java.math.BigDecimal>> getQuantityUsedPerPromoFailedIter()
      • addPromoQuantityCandidateUse

        public java.math.BigDecimal addPromoQuantityCandidateUse​(java.math.BigDecimal quantityDesired,
                                                                 GenericValue productPromoCondAction,
                                                                 boolean checkAvailableOnly)
      • getPromoQuantityCandidateUse

        public java.math.BigDecimal getPromoQuantityCandidateUse​(GenericValue productPromoCondAction)
      • getPromoQuantityCandidateUseActionAndAllConds

        public java.math.BigDecimal getPromoQuantityCandidateUseActionAndAllConds​(GenericValue productPromoAction)
      • resetPromoRuleUse

        public void resetPromoRuleUse​(java.lang.String productPromoId,
                                      java.lang.String productPromoRuleId)
      • confirmPromoRuleUse

        public void confirmPromoRuleUse​(java.lang.String productPromoId,
                                        java.lang.String productPromoRuleId)
      • clearPromoRuleUseInfo

        public void clearPromoRuleUseInfo()
      • setItemComment

        public void setItemComment​(java.lang.String itemComment)
        Sets the item comment.
      • getItemComment

        public java.lang.String getItemComment()
        Returns the item's comment.
      • setDesiredDeliveryDate

        public void setDesiredDeliveryDate​(java.sql.Timestamp ddDate)
        Sets the item's customer desired delivery date.
      • getDesiredDeliveryDate

        public java.sql.Timestamp getDesiredDeliveryDate()
        Returns the item's customer desired delivery date.
      • setShipBeforeDate

        public void setShipBeforeDate​(java.sql.Timestamp date)
        Sets the date to ship before
      • getShipBeforeDate

        public java.sql.Timestamp getShipBeforeDate()
        Returns the date to ship before
      • setShipAfterDate

        public void setShipAfterDate​(java.sql.Timestamp date)
        Sets the date to ship after
      • getShipAfterDate

        public java.sql.Timestamp getShipAfterDate()
        Returns the date to ship after
      • setReserveAfterDate

        public void setReserveAfterDate​(java.sql.Timestamp date)
        Sets the date to ship after
      • getReserveAfterDate

        public java.sql.Timestamp getReserveAfterDate()
        Returns the date to ship after
      • setCancelBackOrderDate

        public void setCancelBackOrderDate​(java.sql.Timestamp date)
        Sets the cancel back order date
      • getCancelBackOrderDate

        public java.sql.Timestamp getCancelBackOrderDate()
        Returns the cancel back order date
      • setEstimatedShipDate

        public void setEstimatedShipDate​(java.sql.Timestamp date)
        Sets the date to EstimatedShipDate
      • getEstimatedShipDate

        public java.sql.Timestamp getEstimatedShipDate()
        Returns the date to EstimatedShipDate
      • setItemType

        public void setItemType​(java.lang.String itemType)
        Sets the item type.
      • getItemType

        public java.lang.String getItemType()
        Returns the item type.
      • getItemTypeGenericValue

        public GenericValue getItemTypeGenericValue()
        Returns the item type.
      • setItemGroup

        public void setItemGroup​(java.lang.String groupNumber,
                                 ShoppingCart cart)
        Sets the item group.
      • isInItemGroup

        public boolean isInItemGroup​(java.lang.String groupNumber)
      • getItemTypeDescription

        public java.lang.String getItemTypeDescription()
        Returns the item type description.
      • getProductCategoryId

        public java.lang.String getProductCategoryId()
        Returns the productCategoryId for the item or null if none.
      • setProductCategoryId

        public void setProductCategoryId​(java.lang.String productCategoryId)
      • setOrderItemSeqId

        public void setOrderItemSeqId​(java.lang.String orderItemSeqId)
      • getOrderItemSeqId

        public java.lang.String getOrderItemSeqId()
      • setShoppingList

        public void setShoppingList​(java.lang.String shoppingListId,
                                    java.lang.String itemSeqId)
      • getShoppingListId

        public java.lang.String getShoppingListId()
      • getShoppingListItemSeqId

        public java.lang.String getShoppingListItemSeqId()
      • setRequirementId

        public void setRequirementId​(java.lang.String requirementId)
        Sets the requirementId.
      • getRequirementId

        public java.lang.String getRequirementId()
        Returns the requirementId.
      • setQuoteId

        public void setQuoteId​(java.lang.String quoteId)
        Sets the quoteId.
      • getQuoteId

        public java.lang.String getQuoteId()
        Returns the quoteId.
      • setQuoteItemSeqId

        public void setQuoteItemSeqId​(java.lang.String quoteItemSeqId)
        Sets the quoteItemSeqId.
      • getQuoteItemSeqId

        public java.lang.String getQuoteItemSeqId()
        Returns the quoteItemSeqId.
      • setOrderItemAssocTypeId

        public void setOrderItemAssocTypeId​(java.lang.String orderItemAssocTypeId)
        Sets the orderItemAssocTypeId.
      • getOrderItemAssocTypeId

        public java.lang.String getOrderItemAssocTypeId()
        Returns the OrderItemAssocTypeId.
      • setAssociatedOrderId

        public void setAssociatedOrderId​(java.lang.String associatedOrderId)
        Sets the associatedOrderId.
      • getAssociatedOrderId

        public java.lang.String getAssociatedOrderId()
        Returns the associatedId.
      • setAssociatedOrderItemSeqId

        public void setAssociatedOrderItemSeqId​(java.lang.String associatedOrderItemSeqId)
        Sets the associatedOrderItemSeqId.
      • getAssociatedOrderItemSeqId

        public java.lang.String getAssociatedOrderItemSeqId()
        Returns the associatedOrderItemSeqId.
      • getStatusId

        public java.lang.String getStatusId()
      • setStatusId

        public void setStatusId​(java.lang.String statusId)
      • shippingApplies

        public boolean shippingApplies()
        Returns true if shipping charges apply to this item.
      • taxApplies

        public boolean taxApplies()
        Returns true if tax charges apply to this item.
      • getProductId

        public java.lang.String getProductId()
        Returns the item's productId.
      • getSupplierProductId

        public java.lang.String getSupplierProductId()
        Returns the item's supplierProductId.
      • setSupplierProductId

        public void setSupplierProductId​(java.lang.String supplierProductId)
        Set the item's supplierProductId.
      • setLocale

        protected void setLocale​(java.util.Locale locale)
        Set the item's locale (from ShoppingCart.setLocale)
      • setName

        public void setName​(java.lang.String itemName)
        Set the item's description.
      • getName

        @Deprecated
        public java.lang.String getName()
        Deprecated.
        use getName(LocalDispatcher dispatcher)
        Returns the item's description.
      • getName

        public java.lang.String getName​(LocalDispatcher dispatcher)
        Returns the item's description or PRODUCT_NAME from content.
      • getDescription

        public java.lang.String getDescription​(LocalDispatcher dispatcher)
        Returns the item's description.
      • getWeight

        public java.math.BigDecimal getWeight()
        Returns the item's unit weight
      • getPiecesIncluded

        public long getPiecesIncluded()
        Returns the item's pieces included
      • getFeatureSet

        public java.util.Set<java.lang.String> getFeatureSet()
        Returns a Set of the item's features
      • getStandardFeatureList

        public java.util.List<GenericValue> getStandardFeatureList()
        Returns a list of the item's standard features
      • getFeaturesForSupplier

        public java.util.List<GenericValue> getFeaturesForSupplier​(LocalDispatcher dispatcher,
                                                                   java.lang.String partyId)
        Returns a List of the item's features for supplier
      • getSize

        public java.math.BigDecimal getSize()
        Returns the item's size (length + girth)
      • getItemProductInfo

        public java.util.Map<java.lang.String,​java.lang.Object> getItemProductInfo()
      • getBasePrice

        public java.math.BigDecimal getBasePrice()
        Returns the base price.
      • getDisplayPrice

        public java.math.BigDecimal getDisplayPrice()
      • getSpecialPromoPrice

        public java.math.BigDecimal getSpecialPromoPrice()
      • getRecurringBasePrice

        public java.math.BigDecimal getRecurringBasePrice()
      • getRecurringDisplayPrice

        public java.math.BigDecimal getRecurringDisplayPrice()
      • getListPrice

        public java.math.BigDecimal getListPrice()
        Returns the list price.
      • setListPrice

        public void setListPrice​(java.math.BigDecimal listPrice)
      • getIsModifiedPrice

        public boolean getIsModifiedPrice()
        Returns isModifiedPrice
      • setIsModifiedPrice

        public void setIsModifiedPrice​(boolean isModifiedPrice)
        Set isModifiedPrice
      • getReserv2ndPPPerc

        public java.math.BigDecimal getReserv2ndPPPerc()
        get the percentage for the second person
      • getReservNthPPPerc

        public java.math.BigDecimal getReservNthPPPerc()
        get the percentage for the third and following person
      • getOtherAdjustments

        public java.math.BigDecimal getOtherAdjustments()
        Returns the "other" adjustments.
      • getOtherAdjustmentsRecurring

        public java.math.BigDecimal getOtherAdjustmentsRecurring()
        Returns the "other" adjustments.
      • getRentalAdjustment

        public java.math.BigDecimal getRentalAdjustment()
        calculates for a reservation the percentage/100 extra for more than 1 person.
      • getItemSubTotal

        public java.math.BigDecimal getItemSubTotal​(java.math.BigDecimal quantity)
        Returns the total line price.
      • getItemSubTotal

        public java.math.BigDecimal getItemSubTotal()
      • getDisplayItemSubTotal

        public java.math.BigDecimal getDisplayItemSubTotal()
      • getDisplayItemSubTotalNoAdj

        public java.math.BigDecimal getDisplayItemSubTotalNoAdj()
      • getDisplayItemRecurringSubTotal

        public java.math.BigDecimal getDisplayItemRecurringSubTotal()
      • getDisplayItemRecurringSubTotalNoAdj

        public java.math.BigDecimal getDisplayItemRecurringSubTotalNoAdj()
      • addAllProductFeatureAndAppls

        public void addAllProductFeatureAndAppls​(java.util.Map<java.lang.String,​GenericValue> productFeatureAndApplsToAdd)
      • putAdditionalProductFeatureAndAppl

        public void putAdditionalProductFeatureAndAppl​(GenericValue additionalProductFeatureAndAppl)
      • getAdditionalProductFeatureAndAppl

        public GenericValue getAdditionalProductFeatureAndAppl​(java.lang.String productFeatureTypeId)
      • removeAdditionalProductFeatureAndAppl

        public GenericValue removeAdditionalProductFeatureAndAppl​(java.lang.String productFeatureTypeId)
      • getAdditionalProductFeatureAndAppls

        public java.util.Map<java.lang.String,​GenericValue> getAdditionalProductFeatureAndAppls()
      • getFeatureIdQtyMap

        public java.util.Map<java.lang.String,​java.math.BigDecimal> getFeatureIdQtyMap​(java.math.BigDecimal quantity)
      • removeAttribute

        public void removeAttribute​(java.lang.String name)
        Removes an item attribute.
      • setAttribute

        public void setAttribute​(java.lang.String name,
                                 java.lang.Object value)
        Sets an item attribute.
      • getAttribute

        public java.lang.Object getAttribute​(java.lang.String name)
        Return a specific attribute.
      • getAttributes

        public java.util.Map<java.lang.String,​java.lang.Object> getAttributes()
        Returns the attributes for the item.
      • removeOrderItemAttribute

        public void removeOrderItemAttribute​(java.lang.String name)
        Remove an OrderItemAttribute.
      • setOrderItemAttribute

        public void setOrderItemAttribute​(java.lang.String name,
                                          java.lang.String value)
        Creates an OrderItemAttribute entry.
      • getOrderItemAttribute

        public java.lang.String getOrderItemAttribute​(java.lang.String name)
        Return an OrderItemAttribute.
      • getOrderItemAttributes

        public java.util.Map<java.lang.String,​java.lang.String> getOrderItemAttributes()
      • addAdjustment

        public int addAdjustment​(GenericValue adjustment)
        Add an adjustment to the order item; don't worry about setting the orderId, orderItemSeqId or orderAdjustmentId; they will be set when the order is created
      • removeAdjustment

        public void removeAdjustment​(GenericValue adjustment)
      • removeAdjustment

        public void removeAdjustment​(int index)
      • getAdjustments

        public java.util.List<GenericValue> getAdjustments()
      • removeFeatureAdjustment

        public void removeFeatureAdjustment​(java.lang.String productFeatureId)
      • getOrderItemPriceInfos

        public java.util.List<GenericValue> getOrderItemPriceInfos()
      • addContactMech

        public void addContactMech​(java.lang.String contactMechPurposeTypeId,
                                   java.lang.String contactMechId)
        Add a contact mech to this purpose; the contactMechPurposeTypeId is required
      • getContactMech

        public java.lang.String getContactMech​(java.lang.String contactMechPurposeTypeId)
        Get the contactMechId for this item given the contactMechPurposeTypeId
      • removeContactMech

        public java.lang.String removeContactMech​(java.lang.String contactMechPurposeTypeId)
        Remove the contactMechId from this item given the contactMechPurposeTypeId
      • getOrderItemContactMechIds

        public java.util.Map<java.lang.String,​java.lang.String> getOrderItemContactMechIds()
      • setIsPromo

        public void setIsPromo​(boolean isPromo)
      • getIsPromo

        public boolean getIsPromo()
      • getAlternativeOptionProductIds

        public java.util.List<java.lang.String> getAlternativeOptionProductIds()
      • setAlternativeOptionProductIds

        public void setAlternativeOptionProductIds​(java.util.List<java.lang.String> alternativeOptionProductIds)
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.String productId,
                              java.util.Map<java.lang.String,​GenericValue> additionalProductFeatureAndAppls,
                              java.util.Map<java.lang.String,​java.lang.Object> attributes,
                              java.lang.String prodCatalogId,
                              java.math.BigDecimal selectedAmount)
        Compares the specified object with this cart item. Defaults isPromo to false. Default to no itemGroup.
      • equals

        public boolean equals​(java.lang.String productId,
                              java.util.Map<java.lang.String,​GenericValue> additionalProductFeatureAndAppls,
                              java.util.Map<java.lang.String,​java.lang.Object> attributes,
                              java.lang.String prodCatalogId,
                              ProductConfigWrapper configWrapper,
                              java.lang.String itemType,
                              ShoppingCart.ShoppingCartItemGroup itemGroup,
                              java.math.BigDecimal selectedAmount)
        Compares the specified object with this cart item. Defaults isPromo to false.
      • equals

        public boolean equals​(java.lang.String productId,
                              java.sql.Timestamp reservStart,
                              java.math.BigDecimal reservLength,
                              java.math.BigDecimal reservPersons,
                              java.util.Map<java.lang.String,​GenericValue> additionalProductFeatureAndAppls,
                              java.util.Map<java.lang.String,​java.lang.Object> attributes,
                              java.lang.String prodCatalogId,
                              ProductConfigWrapper configWrapper,
                              java.lang.String itemType,
                              ShoppingCart.ShoppingCartItemGroup itemGroup,
                              java.math.BigDecimal selectedAmount)
        Compares the specified object with this cart item including rental data. Defaults isPromo to false.
      • equals

        public boolean equals​(java.lang.String productId,
                              java.util.Map<java.lang.String,​GenericValue> additionalProductFeatureAndAppls,
                              java.util.Map<java.lang.String,​java.lang.Object> attributes,
                              java.lang.String prodCatalogId,
                              java.math.BigDecimal selectedAmount,
                              java.lang.String itemType,
                              ShoppingCart.ShoppingCartItemGroup itemGroup,
                              boolean isPromo)
        Compares the specified object with this cart item. Defaults isPromo to false.
      • equals

        public boolean equals​(java.lang.String productId,
                              java.sql.Timestamp reservStart,
                              java.math.BigDecimal reservLength,
                              java.math.BigDecimal reservPersons,
                              java.lang.String accommodationMapId,
                              java.lang.String accommodationSpotId,
                              java.util.Map<java.lang.String,​GenericValue> additionalProductFeatureAndAppls,
                              java.util.Map<java.lang.String,​java.lang.Object> attributes,
                              java.lang.String prodCatalogId,
                              java.math.BigDecimal selectedAmount,
                              ProductConfigWrapper configWrapper,
                              java.lang.String itemType,
                              ShoppingCart.ShoppingCartItemGroup itemGroup,
                              boolean isPromo)
        Compares the specified object with this cart item.
      • equals

        public boolean equals​(java.lang.String productId,
                              java.sql.Timestamp reservStart,
                              java.math.BigDecimal reservLength,
                              java.math.BigDecimal reservPersons,
                              java.lang.String accommodationMapId,
                              java.lang.String accommodationSpotId,
                              java.util.Map<java.lang.String,​GenericValue> additionalProductFeatureAndAppls,
                              java.util.Map<java.lang.String,​java.lang.Object> attributes,
                              java.util.Map<java.lang.String,​java.lang.String> orderItemAttributes,
                              java.lang.String prodCatalogId,
                              java.math.BigDecimal selectedAmount,
                              ProductConfigWrapper configWrapper,
                              java.lang.String itemType,
                              ShoppingCart.ShoppingCartItemGroup itemGroup,
                              boolean isPromo)
        Compares the specified object order item attributes.
      • getProduct

        public GenericValue getProduct()
        Gets the Product entity. If it is not already retreived gets it from the delegator
      • getParentProductId

        public java.lang.String getParentProductId()
      • getOptionalProductFeatures

        public java.util.Map<java.lang.String,​java.util.List<GenericValue>> getOptionalProductFeatures()
      • getDelegator

        public Delegator getDelegator()
      • getPurchaseOrderItemDescription

        public static java.lang.String getPurchaseOrderItemDescription​(GenericValue product,
                                                                       GenericValue supplierProduct,
                                                                       java.util.Locale locale,
                                                                       LocalDispatcher dispatcher)