All Implemented Interfaces:
BackendAware, BusinessObject, MessageListHolder, StatusObject, Item, ItemBase, SimpleItem, Serializable, Cloneable, Comparable<SimpleItem>
Direct Known Subclasses:
CPQItemSalesDoc

public class ItemSalesDoc extends ItemBaseImpl implements Item
Item of a sales document. Each sales document consists of a header and a number of items. This items are represented by this class.
See Also:
  • Field Details

    • systemProductId

      protected String systemProductId
      System product ID
    • substitutionReasonId

      protected String substitutionReasonId
      Reason for substitution ID
    • shipToLine

      protected ShipTo shipToLine
      ShipTo
    • deliveryExists

      protected boolean deliveryExists
      Does a delivery exist
    • alternativProductList

      protected AlternativeProductList alternativProductList
      List of alternative products
    • copiedFromOtherItem

      protected boolean copiedFromOtherItem
      Item was copied from another one
    • paymentTerms

      protected String paymentTerms
      Payment terms
    • fromCatalog

      protected boolean fromCatalog
      Item is from catalog
    • parentHandle

      protected String parentHandle
      Handle of parent item
    • pricingDate

      protected Date pricingDate
      Pricing date
    • shipStatus

      protected ShippingStatus shipStatus
    • billStatus

      protected BillingStatus billStatus
    • procStatus

      protected OverallStatus procStatus
    • processingStatus

      protected ProcessingStatus processingStatus
    • userStatusList

      protected UserStatusList userStatusList
    • rejectionCode

      protected String rejectionCode
      Rejection code
    • giftCard

      protected boolean giftCard
      Is gift card?
    • individualText

      protected Text individualText
      Item text
  • Constructor Details

    • ItemSalesDoc

      public ItemSalesDoc()
      Default constructor for the Item
  • Method Details

    • clone

      public Object clone()
      Performs a deep-copy rather than a shallow copy. For sake of performance you should avoid haevy usage of this method, as creating a deep copy is quite expensive.
      The TransferItem will not be cloned, only the reference is copied.
      Specified by:
      clone in interface ItemBase
      Overrides:
      clone in class ItemBaseImpl
      Returns:
      deep-copy of this object
    • createAlternativProductList

      public AlternativeProductList createAlternativProductList()
      Creates a new AlternativProductList.
      Specified by:
      createAlternativProductList in interface Item
      Returns:
      AlternativProductListData
    • equals

      public boolean equals(Object object)
      Description copied from class: BusinessObjectBase
      Compares this object to the specified object. The result is true if and only if the argument is not null and is of the same class that has the same technical key ( TechKey) as this object.
      Overrides:
      equals in class BusinessObjectBase
      Parameters:
      object - Object to compare with
      Returns:
      true if the objects are identical; otherwiese false.
    • getAlternativProductList

      public AlternativeProductList getAlternativProductList()
      Returns the alternativProductList.
      Specified by:
      getAlternativProductList in interface Item
      Returns:
      AlternativProductList
    • getOverallStatus

      public OverallStatus getOverallStatus()
      Description copied from interface: Item
      Returns the overall status
      Specified by:
      getOverallStatus in interface Item
      Returns:
      the overall item status
    • getParentHandle

      public String getParentHandle()
      Returns the parentHandle, that is the handle of the parent, if the position is a subposition
      Specified by:
      getParentHandle in interface Item
      Returns:
      String the parentHandle
    • getPaymentTerms

      public String getPaymentTerms()
      Get the payment terms.
      Specified by:
      getPaymentTerms in interface Item
      Returns:
      String the payment terms
    • getPricingDate

      public Date getPricingDate()
      Description copied from interface: Item
      Get the date which is used to calculate prices in IPC
      Specified by:
      getPricingDate in interface Item
      Returns:
      date relevant for pricing
    • getShippingStatus

      public ShippingStatus getShippingStatus()
      Description copied from interface: Item
      Get The shipping status
      Specified by:
      getShippingStatus in interface Item
      Returns:
      the shipping status of the item
    • getShipTo

      public ShipTo getShipTo()
      Description copied from interface: Item
      Returns the shipTo associated with this item
      Specified by:
      getShipTo in interface Item
      Returns:
      the shipTo to which this item will be shipped to
    • getSubstitutionReasonId

      public String getSubstitutionReasonId()
      Returns the substitutionReasonId.
      Specified by:
      getSubstitutionReasonId in interface Item
      Returns:
      String
    • getSystemProductId

      public String getSystemProductId()
      Returns the systemProductId.
      Specified by:
      getSystemProductId in interface Item
      Returns:
      String
    • hashCode

      public int hashCode()
      Description copied from class: BusinessObjectBase
      Returns the hash code for this object.
      Overrides:
      hashCode in class BusinessObjectBase
      Returns:
      Hash code
    • isCopiedFromOtherItem

      public boolean isCopiedFromOtherItem()
      This method returns a flag, that indicates if the item is copied from another item, e.g. when an order is created from an order template If so, this flag might be used, to suppress things like campaign determination, etc. for the copied item.
      Specified by:
      isCopiedFromOtherItem in interface Item
      Returns:
      true if this item is copied from another item false else
    • isChangeAllowed

      public boolean isChangeAllowed()
      Specified by:
      isChangeAllowed in interface Item
      Returns:
      true if the item can be changed
    • isFreeGood

      public boolean isFreeGood()
      Description copied from interface: Item
      Determines whether the item is a free good by checking the item usage.
      Specified by:
      isFreeGood in interface Item
      Returns:
      true, only if this item is a FreeGood
    • isFromCatalog

      public boolean isFromCatalog()
      Description copied from interface: Item
      Indicates whether the item is originated from catalog.
      Specified by:
      isFromCatalog in interface Item
      Returns:
      true if the item is from catalog; otherwise false.
    • isMergeSupported

      public boolean isMergeSupported(Item toMergeWith)
      Overwrites the super implementation. Merge is not allowed if a gift card or a configurable product is involved. Sub items are also not subject to merge.
      Specified by:
      isMergeSupported in interface Item
      Parameters:
      toMergeWith - the item this item should be merged with
      Returns:
      true if the items allowed to be merged
      See Also:
    • setAlternativProductList

      public void setAlternativProductList(AlternativeProductList alternativProductList)
      Sets the alternativProductList.
      Specified by:
      setAlternativProductList in interface Item
      Parameters:
      alternativProductList - The alternativProductList to set
    • setBillingStatus

      public void setBillingStatus(BillingStatus billStatus)
      Description copied from interface: StatusObject
      Set the billing status for this object.
      Specified by:
      setBillingStatus in interface StatusObject
      Parameters:
      billStatus - Billing Status
    • setCopiedFromOtherItem

      public void setCopiedFromOtherItem(boolean isCopiedFromOtherItem)
      This method sets a flag, that indicates if the item is copied from another item, e.g. when an order is created from an order template If so, this flag might be used, to suppress things like campaign determination, etc. for the copied item.
      Specified by:
      setCopiedFromOtherItem in interface Item
      Parameters:
      isCopiedFromOtherItem - true when item is copied
    • setFromCatalog

      public void setFromCatalog(boolean fromCatalog)
      Description copied from interface: Item
      Indicate whether the item is originated from catalog.
      Specified by:
      setFromCatalog in interface Item
      Parameters:
      fromCatalog - should be set to true if the item originated from catalog
    • setOverallStatus

      public void setOverallStatus(OverallStatus procStatus)
      Description copied from interface: StatusObject
      Set the overall status for this object.
      Specified by:
      setOverallStatus in interface StatusObject
      Parameters:
      procStatus - Overall Status
    • setParentHandle

      public void setParentHandle(String parentHandle)
      Sets the parentHandle, that is the handle of the parent, if the position is a subposition
      Specified by:
      setParentHandle in interface Item
      Parameters:
      parentHandle - the new value for the parentHandle
    • setPaymentTerms

      public void setPaymentTerms(String paymentTerms)
      Set the payment terms.
      Specified by:
      setPaymentTerms in interface Item
      Parameters:
      paymentTerms - the payment terms to be set.
    • setPricingDate

      public void setPricingDate(Date pricingDate)
      Description copied from interface: Item
      set the date which is used to calculate prices in IPC
      Specified by:
      setPricingDate in interface Item
      Parameters:
      pricingDate - date which should be used for pricing
    • setShippingStatus

      public void setShippingStatus(ShippingStatus shipStatus)
      Description copied from interface: StatusObject
      Set the shipping status for this object.
      Specified by:
      setShippingStatus in interface StatusObject
      Parameters:
      shipStatus - Shipping Status
    • setShipTo

      public void setShipTo(ShipTo shipToLine)
      Description copied from interface: Item
      Sets the shiptTo for this item.
      Specified by:
      setShipTo in interface Item
      Parameters:
      shipToLine - shipTo to which the item will be shipped
    • setSubstitutionReasonId

      public void setSubstitutionReasonId(String substitutionReasonId)
      Sets the substitutionReasonId.
      Specified by:
      setSubstitutionReasonId in interface Item
      Parameters:
      substitutionReasonId - The substitutionReasonId to set
    • setSystemProductId

      public void setSystemProductId(String systemProductId)
      Sets the systemProductId.
      Specified by:
      setSystemProductId in interface Item
      Parameters:
      systemProductId - The systemProductId to set
    • setUserStatusList

      public void setUserStatusList(UserStatusList userStatusList)
      Sets list of user status
      Parameters:
      userStatusList -
    • toString

      public String toString()
      Description copied from class: ItemBaseImpl
      Returns a String representation of the item, which can be used for debugging purpose. This is not suitable for display on the user interface.
      Overrides:
      toString in class ItemBaseImpl
    • getRejectionCode

      public String getRejectionCode()
      Description copied from interface: Item
      Gets rejection/cancellation reason for the order.
      Specified by:
      getRejectionCode in interface Item
      Returns:
      cancellation reason (key)
    • setRejectionCode

      public void setRejectionCode(String rejection)
      Description copied from interface: Item
      Sets rejection/cancellation reason for the order.
      Specified by:
      setRejectionCode in interface Item
      Parameters:
      rejection - cancellation reason (key)
    • setGiftCard

      public void setGiftCard(boolean isGiftCard)
      Indicates whether item is a gift card
      Parameters:
      isGiftCard -
    • isGiftCard

      public boolean isGiftCard()
      Returns:
      Is it a gift card?
    • getQuantityToPay

      public BigDecimal getQuantityToPay()
      Description copied from interface: Item
      This getter is dependent on the quantity and the free quantity of this product.
      Specified by:
      getQuantityToPay in interface Item
      Returns:
      the quantity that must be paid
    • getProcessingStatus

      public ProcessingStatus getProcessingStatus()
      Description copied from interface: Item
      Get the processing status of the sales document item. The processing status equates GBSTA field in ERP back end
      Used for the definition of possible cancellation
      Specified by:
      getProcessingStatus in interface Item
      Returns:
      BusinessStatus
    • setProcessingStatus

      public void setProcessingStatus(ProcessingStatus processingStatus)
      Description copied from interface: Item
      Get the processing status of the sales document item. The processing status equates GBSTA field in ERP back end
      Specified by:
      setProcessingStatus in interface Item
      Parameters:
      processingStatus - ProcessingStatus
    • applyAlternativeProduct

      public void applyAlternativeProduct(TechKey productGUID, String productID) throws CommunicationException
      Description copied from interface: Item
      Apply alternative product, e.g. product to be substituted with .
      Specified by:
      applyAlternativeProduct in interface Item
      Parameters:
      productGUID - GUID of the applied product
      productID - ID of the applied product
      Throws:
      CommunicationException - in case of an back-end error
    • isSubItem

      public boolean isSubItem()
      Description copied from interface: Item
      Indicates whether the item is a subitem (has a parent) or not
      Specified by:
      isSubItem in interface Item
      Returns:
      true if subitem
    • getBillingStatus

      public BillingStatus getBillingStatus()
      Description copied from interface: Item
      returns the billing status of the item
      Specified by:
      getBillingStatus in interface Item
      Returns:
      the actual billing statuts of the item