Class ItemSalesDoc
- java.lang.Object
-
- de.hybris.platform.sap.core.bol.businessobject.BusinessObjectBase
-
- de.hybris.platform.sap.sapordermgmtbol.transaction.item.businessobject.impl.SimpleItemImpl
-
- de.hybris.platform.sap.sapordermgmtbol.transaction.item.businessobject.impl.ItemBaseImpl
-
- de.hybris.platform.sap.sapordermgmtbol.transaction.item.businessobject.impl.ItemSalesDoc
-
- All Implemented Interfaces:
BackendAware,BusinessObject,MessageListHolder,StatusObject,Item,ItemBase,SimpleItem,java.io.Serializable,java.lang.Cloneable,java.lang.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:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface de.hybris.platform.sap.sapordermgmtbol.transaction.item.businessobject.interf.ItemBase
ItemBase.ItemUsage
-
-
Field Summary
Fields Modifier and Type Field Description protected AlternativeProductListalternativProductListList of alternative productsprotected BillingStatusbillStatusprotected booleancopiedFromOtherItemItem was copied from another oneprotected booleandeliveryExistsDoes a delivery existprotected booleanfromCatalogItem is from catalogprotected booleangiftCardIs gift card?protected TextindividualTextItem textprotected java.lang.StringparentHandleHandle of parent itemprotected java.lang.StringpaymentTermsPayment termsprotected java.util.DatepricingDatePricing dateprotected ProcessingStatusprocessingStatusprotected OverallStatusprocStatusprotected java.lang.StringrejectionCodeRejection codeprotected ShippingStatusshipStatusprotected ShipToshipToLineShipToprotected java.lang.StringsubstitutionReasonIdReason for substitution IDprotected java.lang.StringsystemProductIdSystem product IDprotected UserStatusListuserStatusList-
Fields inherited from class de.hybris.platform.sap.sapordermgmtbol.transaction.item.businessobject.impl.ItemBaseImpl
businessObjectType, cancelable, configType, configurable, confirmedDeliveryDate, confirmedQuantity, createdAt, currency, deletable, deliveredQuantity, deliveredQuantityUnit, deliveryPriority, erroneous, freeQuantity, freightValue, grossValue, grossValueWOFreight, itemCategory, itemUsage, itmTypeUsage, latestDeliveryDate, netPrice, netPriceUnit, netQuantPriceUnit, netValue, netValueWOFreight, oldQuantity, partnerList, possibleUnits, predecessorList, priceRelevant, productExists, quantityToDeliver, reqDeliveryDate, scheduleLines, statistical, successorList, taxValue, text, totalDiscount, totalValue, variant
-
Fields inherited from class de.hybris.platform.sap.core.bol.businessobject.BusinessObjectBase
backendObject, backendType, bobMessages, bobState, extensionData, genericFactory, handle, moduleConfigurationAccess, techKey
-
Fields inherited from interface de.hybris.platform.sap.sapordermgmtbol.transaction.item.businessobject.interf.Item
DELIVERY_DELAYED, DELIVERY_IN_STOCK, DELIVERY_OUT_OF_STOCK, DELIVERY_PARTLY
-
Fields inherited from interface de.hybris.platform.sap.sapordermgmtbol.transaction.item.businessobject.interf.ItemBase
ITEM_CONFIGTYPE_VARIANT
-
Fields inherited from interface de.hybris.platform.sap.core.common.message.MessageListHolder
INVALID, VALID
-
-
Constructor Summary
Constructors Constructor Description ItemSalesDoc()Default constructor for the Item
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapplyAlternativeProduct(TechKey productGUID, java.lang.String productID)Apply alternative product, e.g.java.lang.Objectclone()Performs a deep-copy rather than a shallow copy.AlternativeProductListcreateAlternativProductList()Creates a new AlternativProductList.booleanequals(java.lang.Object object)Compares this object to the specified object.AlternativeProductListgetAlternativProductList()Returns the alternativProductList.BillingStatusgetBillingStatus()returns the billing status of the itemOverallStatusgetOverallStatus()Returns the overall statusjava.lang.StringgetParentHandle()Returns the parentHandle, that is the handle of the parent, if the position is a subpositionjava.lang.StringgetPaymentTerms()Get the payment terms.java.util.DategetPricingDate()Get the date which is used to calculate prices in IPCProcessingStatusgetProcessingStatus()Get the processing status of the sales document item.java.math.BigDecimalgetQuantityToPay()This getter is dependent on the quantity and the free quantity of this product.java.lang.StringgetRejectionCode()Gets rejection/cancellation reason for the order.ShippingStatusgetShippingStatus()Get The shipping statusShipTogetShipTo()Returns the shipTo associated with this itemjava.lang.StringgetSubstitutionReasonId()Returns the substitutionReasonId.java.lang.StringgetSystemProductId()Returns the systemProductId.inthashCode()Returns the hash code for this object.booleanisChangeAllowed()booleanisCopiedFromOtherItem()This method returns a flag, that indicates if the item is copied from another item, e.g.booleanisFreeGood()Determines whether the item is a free good by checking the item usage.booleanisFromCatalog()Indicates whether the item is originated from catalog.booleanisGiftCard()booleanisMergeSupported(Item toMergeWith)Overwrites the super implementation.booleanisSubItem()Indicates whether the item is a subitem (has a parent) or notvoidsetAlternativProductList(AlternativeProductList alternativProductList)Sets the alternativProductList.voidsetBillingStatus(BillingStatus billStatus)Set the billing status for this object.voidsetCopiedFromOtherItem(boolean isCopiedFromOtherItem)This method sets a flag, that indicates if the item is copied from another item, e.g.voidsetFromCatalog(boolean fromCatalog)Indicate whether the item is originated from catalog.voidsetGiftCard(boolean isGiftCard)Indicates whether item is a gift cardvoidsetOverallStatus(OverallStatus procStatus)Set the overall status for this object.voidsetParentHandle(java.lang.String parentHandle)Sets the parentHandle, that is the handle of the parent, if the position is a subpositionvoidsetPaymentTerms(java.lang.String paymentTerms)Set the payment terms.voidsetPricingDate(java.util.Date pricingDate)set the date which is used to calculate prices in IPCvoidsetProcessingStatus(ProcessingStatus processingStatus)Get the processing status of the sales document item.voidsetRejectionCode(java.lang.String rejection)Sets rejection/cancellation reason for the order.voidsetShippingStatus(ShippingStatus shipStatus)Set the shipping status for this object.voidsetShipTo(ShipTo shipToLine)Sets the shiptTo for this item.voidsetSubstitutionReasonId(java.lang.String substitutionReasonId)Sets the substitutionReasonId.voidsetSystemProductId(java.lang.String systemProductId)Sets the systemProductId.voidsetUserStatusList(UserStatusList userStatusList)Sets list of user statusjava.lang.StringtoString()Returns a String representation of the item, which can be used for debugging purpose.-
Methods inherited from class de.hybris.platform.sap.sapordermgmtbol.transaction.item.businessobject.impl.ItemBaseImpl
addPredecessor, addSuccessor, clonePredecessorList, cloneScheduleLines, cloneSuccessorList, createConnectedDocumentItemData, createScheduleLine, createText, getConfigType, getConfirmedDeliveryDate, getConfirmedQuantity, getCreatedAt, getCurrency, getDeliveredQuantity, getDeliveredQuantityUnit, getDeliveryPriority, getFreeQuantity, getFreightValue, getGrossValue, getGrossValueWOFreight, getItemCategory, getItemUsage, getItmTypeUsage, getNetPrice, getNetPriceUnit, getNetPriceWOFreight, getNetQuantPriceUnit, getNetValue, getNetValueWOFreight, getOldQuantity, getPartnerListData, getPossibleUnits, getPredecessorList, getQuantityToDeliver, getReqDeliveryDate, getScheduleLines, getSuccessorList, getTaxValue, getText, getTotalDiscount, init, isCancelable, isConfigurable, isConfigurationDirty, isDeletable, isErroneous, isPriceRelevant, isProductEmpty, isProductExists, isStatistical, isVariant, setBusinessObjectType, setCancelable, setConfigType, setConfigurable, setConfigurableDirty, setConfirmedDeliveryDate, setConfirmedQuantity, setCreatedAt, setCurrency, setDeletable, setDeliverdQuantity, setDeliverdQuantityUnit, setDeliveryPriority, setErroneous, setFreeQuantity, setFreightValue, setGrossValue, setGrossValueWOFreight, setItemCategory, setItemUsage, setItmTypeUsage, setLatestDeliveryDate, setNetPrice, setNetPriceUnit, setNetPriceWOFreight, setNetQuantPriceUnit, setNetValue, setNetValueWOFreight, setOldQuantity, setPartnerList, setPartnerListData, setPossibleUnits, setPriceRelevant, setProductExists, setQuantity, setQuantityToDeliver, setReqDeliveryDate, setScheduleLines, setStatistical, setTaxValue, setText, setTotalDiscount, setVariant
-
Methods inherited from class de.hybris.platform.sap.sapordermgmtbol.transaction.item.businessobject.impl.SimpleItemImpl
compareTo, getDescription, getLastQuantity, getNumberInt, getParentId, getProductGuid, getProductId, getQuantity, getTypedExtensionMap, getUnit, isProductChanged, setDescription, setNumberInt, setParentId, setProductChanged, setProductGuid, setProductId, setUnit
-
Methods inherited from class de.hybris.platform.sap.core.bol.businessobject.BusinessObjectBase
addExtensionData, addMessage, clearMessages, clearMessages, clearOwnMessages, copyMessages, copyMessages, createUniqueHandle, destroy, determineBackendObject, getBackendBusinessObject, getBackendBusinessObject, getBackendType, getExtensionData, getExtensionDataValues, getExtensionMap, getHandle, getMessageList, getModuleConfigurationAccess, getOwnMessageList, getSubObjectIterator, getTechKey, hasHandle, hasMessages, hasOwnMessages, isValid, logMessage, removeExtensionData, removeExtensionDataValues, setBackendObject, setBackendType, setExtensionMap, setGenericFactory, setHandle, setInvalid, setModuleConfigurationAccess, setTechKey, setValid
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface de.hybris.platform.sap.core.bol.businessobject.BusinessObject
addExtensionData, clearMessages, clearOwnMessages, copyMessages, copyMessages, createUniqueHandle, destroy, getExtensionData, getExtensionDataValues, getExtensionMap, getHandle, getOwnMessageList, getSubObjectIterator, getTechKey, hasHandle, hasMessages, hasOwnMessages, init, isValid, logMessage, removeExtensionData, removeExtensionDataValues, setExtensionMap, setHandle, setInvalid, setTechKey, setValid
-
Methods inherited from interface de.hybris.platform.sap.sapordermgmtbol.transaction.item.businessobject.interf.ItemBase
addPredecessor, addSuccessor, createConnectedDocumentItemData, createScheduleLine, createText, getConfigType, getConfirmedDeliveryDate, getConfirmedQuantity, getCreatedAt, getCurrency, getDeliveredQuantity, getDeliveredQuantityUnit, getDeliveryPriority, getFreeQuantity, getFreightValue, getGrossValue, getGrossValueWOFreight, getItemCategory, getItemUsage, getItmTypeUsage, getNetPrice, getNetPriceUnit, getNetPriceWOFreight, getNetQuantPriceUnit, getNetValue, getNetValueWOFreight, getOldQuantity, getPartnerListData, getPossibleUnits, getPredecessorList, getQuantityToDeliver, getReqDeliveryDate, getScheduleLines, getSuccessorList, getTaxValue, getText, getTotalDiscount, isCancelable, isConfigurable, isConfigurationDirty, isDeletable, isErroneous, isProductEmpty, isProductExists, isStatistical, isVariant, setBusinessObjectType, setCancelable, setConfigType, setConfigurable, setConfigurableDirty, setConfirmedDeliveryDate, setConfirmedQuantity, setCreatedAt, setCurrency, setDeletable, setDeliverdQuantity, setDeliverdQuantityUnit, setDeliveryPriority, setErroneous, setFreeQuantity, setFreightValue, setGrossValue, setGrossValueWOFreight, setItemCategory, setItemUsage, setItmTypeUsage, setLatestDeliveryDate, setNetPrice, setNetPriceUnit, setNetPriceWOFreight, setNetQuantPriceUnit, setNetValue, setNetValueWOFreight, setOldQuantity, setPartnerListData, setPossibleUnits, setPriceRelevant, setProductExists, setQuantityToDeliver, setReqDeliveryDate, setScheduleLines, setStatistical, setTaxValue, setText, setTotalDiscount, setVariant
-
Methods inherited from interface de.hybris.platform.sap.core.common.message.MessageListHolder
addMessage, clearMessages, getMessageList
-
Methods inherited from interface de.hybris.platform.sap.sapordermgmtbol.transaction.item.businessobject.interf.SimpleItem
getDescription, getLastQuantity, getNumberInt, getParentId, getProductGuid, getProductId, getQuantity, getTypedExtensionMap, getUnit, isProductChanged, setDescription, setNumberInt, setParentId, setProductChanged, setProductGuid, setProductId, setQuantity, setUnit
-
-
-
-
Field Detail
-
systemProductId
protected java.lang.String systemProductId
System product ID
-
substitutionReasonId
protected java.lang.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 java.lang.String paymentTerms
Payment terms
-
fromCatalog
protected boolean fromCatalog
Item is from catalog
-
parentHandle
protected java.lang.String parentHandle
Handle of parent item
-
pricingDate
protected java.util.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 java.lang.String rejectionCode
Rejection code
-
giftCard
protected boolean giftCard
Is gift card?
-
individualText
protected Text individualText
Item text
-
-
Method Detail
-
clone
public java.lang.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.
TheTransferItemwill not be cloned, only the reference is copied.- Specified by:
clonein interfaceItemBase- Overrides:
clonein classItemBaseImpl- Returns:
- deep-copy of this object
-
createAlternativProductList
public AlternativeProductList createAlternativProductList()
Creates a new AlternativProductList.- Specified by:
createAlternativProductListin interfaceItem- Returns:
- AlternativProductListData
-
equals
public boolean equals(java.lang.Object object)
Description copied from class:BusinessObjectBaseCompares this object to the specified object. The result istrueif and only if the argument is notnulland is of the same class that has the same technical key (TechKey) as this object.- Overrides:
equalsin classBusinessObjectBase- Parameters:
object- Object to compare with- Returns:
trueif the objects are identical; otherwiesefalse.
-
getAlternativProductList
public AlternativeProductList getAlternativProductList()
Returns the alternativProductList.- Specified by:
getAlternativProductListin interfaceItem- Returns:
- AlternativProductList
-
getOverallStatus
public OverallStatus getOverallStatus()
Description copied from interface:ItemReturns the overall status- Specified by:
getOverallStatusin interfaceItem- Returns:
- the overall item status
-
getParentHandle
public java.lang.String getParentHandle()
Returns the parentHandle, that is the handle of the parent, if the position is a subposition- Specified by:
getParentHandlein interfaceItem- Returns:
- String the parentHandle
-
getPaymentTerms
public java.lang.String getPaymentTerms()
Get the payment terms.- Specified by:
getPaymentTermsin interfaceItem- Returns:
- String the payment terms
-
getPricingDate
public java.util.Date getPricingDate()
Description copied from interface:ItemGet the date which is used to calculate prices in IPC- Specified by:
getPricingDatein interfaceItem- Returns:
- date relevant for pricing
-
getShippingStatus
public ShippingStatus getShippingStatus()
Description copied from interface:ItemGet The shipping status- Specified by:
getShippingStatusin interfaceItem- Returns:
- the shipping status of the item
-
getShipTo
public ShipTo getShipTo()
Description copied from interface:ItemReturns the shipTo associated with this item
-
getSubstitutionReasonId
public java.lang.String getSubstitutionReasonId()
Returns the substitutionReasonId.- Specified by:
getSubstitutionReasonIdin interfaceItem- Returns:
- String
-
getSystemProductId
public java.lang.String getSystemProductId()
Returns the systemProductId.- Specified by:
getSystemProductIdin interfaceItem- Returns:
- String
-
hashCode
public int hashCode()
Description copied from class:BusinessObjectBaseReturns the hash code for this object.- Overrides:
hashCodein classBusinessObjectBase- 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:
isCopiedFromOtherItemin interfaceItem- Returns:
- true if this item is copied from another item false else
-
isChangeAllowed
public boolean isChangeAllowed()
- Specified by:
isChangeAllowedin interfaceItem- Returns:
- true if the item can be changed
-
isFreeGood
public boolean isFreeGood()
Description copied from interface:ItemDetermines whether the item is a free good by checking the item usage.- Specified by:
isFreeGoodin interfaceItem- Returns:
true, only if this item is a FreeGood
-
isFromCatalog
public boolean isFromCatalog()
Description copied from interface:ItemIndicates whether the item is originated from catalog.- Specified by:
isFromCatalogin interfaceItem- Returns:
trueif the item is from catalog; otherwisefalse.
-
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:
isMergeSupportedin interfaceItem- Parameters:
toMergeWith- the item this item should be merged with- Returns:
- true if the items allowed to be merged
- See Also:
Item.isMergeSupported(de.hybris.platform.sap.sapordermgmtbol.transaction.item.businessobject.interf.Item)
-
setAlternativProductList
public void setAlternativProductList(AlternativeProductList alternativProductList)
Sets the alternativProductList.- Specified by:
setAlternativProductListin interfaceItem- Parameters:
alternativProductList- The alternativProductList to set
-
setBillingStatus
public void setBillingStatus(BillingStatus billStatus)
Description copied from interface:StatusObjectSet the billing status for this object.- Specified by:
setBillingStatusin interfaceStatusObject- 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:
setCopiedFromOtherItemin interfaceItem- Parameters:
isCopiedFromOtherItem- true when item is copied
-
setFromCatalog
public void setFromCatalog(boolean fromCatalog)
Description copied from interface:ItemIndicate whether the item is originated from catalog.- Specified by:
setFromCatalogin interfaceItem- Parameters:
fromCatalog- should be set totrueif the item originated from catalog
-
setOverallStatus
public void setOverallStatus(OverallStatus procStatus)
Description copied from interface:StatusObjectSet the overall status for this object.- Specified by:
setOverallStatusin interfaceStatusObject- Parameters:
procStatus- Overall Status
-
setParentHandle
public void setParentHandle(java.lang.String parentHandle)
Sets the parentHandle, that is the handle of the parent, if the position is a subposition- Specified by:
setParentHandlein interfaceItem- Parameters:
parentHandle- the new value for the parentHandle
-
setPaymentTerms
public void setPaymentTerms(java.lang.String paymentTerms)
Set the payment terms.- Specified by:
setPaymentTermsin interfaceItem- Parameters:
paymentTerms- the payment terms to be set.
-
setPricingDate
public void setPricingDate(java.util.Date pricingDate)
Description copied from interface:Itemset the date which is used to calculate prices in IPC- Specified by:
setPricingDatein interfaceItem- Parameters:
pricingDate- date which should be used for pricing
-
setShippingStatus
public void setShippingStatus(ShippingStatus shipStatus)
Description copied from interface:StatusObjectSet the shipping status for this object.- Specified by:
setShippingStatusin interfaceStatusObject- Parameters:
shipStatus- Shipping Status
-
setShipTo
public void setShipTo(ShipTo shipToLine)
Description copied from interface:ItemSets the shiptTo for this item.
-
setSubstitutionReasonId
public void setSubstitutionReasonId(java.lang.String substitutionReasonId)
Sets the substitutionReasonId.- Specified by:
setSubstitutionReasonIdin interfaceItem- Parameters:
substitutionReasonId- The substitutionReasonId to set
-
setSystemProductId
public void setSystemProductId(java.lang.String systemProductId)
Sets the systemProductId.- Specified by:
setSystemProductIdin interfaceItem- Parameters:
systemProductId- The systemProductId to set
-
setUserStatusList
public void setUserStatusList(UserStatusList userStatusList)
Sets list of user status- Parameters:
userStatusList-
-
toString
public java.lang.String toString()
Description copied from class:ItemBaseImplReturns a String representation of the item, which can be used for debugging purpose. This is not suitable for display on the user interface.- Overrides:
toStringin classItemBaseImpl
-
getRejectionCode
public java.lang.String getRejectionCode()
Description copied from interface:ItemGets rejection/cancellation reason for the order.- Specified by:
getRejectionCodein interfaceItem- Returns:
- cancellation reason (key)
-
setRejectionCode
public void setRejectionCode(java.lang.String rejection)
Description copied from interface:ItemSets rejection/cancellation reason for the order.- Specified by:
setRejectionCodein interfaceItem- 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 java.math.BigDecimal getQuantityToPay()
Description copied from interface:ItemThis getter is dependent on the quantity and the free quantity of this product.- Specified by:
getQuantityToPayin interfaceItem- Returns:
- the quantity that must be paid
-
getProcessingStatus
public ProcessingStatus getProcessingStatus()
Description copied from interface:ItemGet 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:
getProcessingStatusin interfaceItem- Returns:
- BusinessStatus
-
setProcessingStatus
public void setProcessingStatus(ProcessingStatus processingStatus)
Description copied from interface:ItemGet the processing status of the sales document item. The processing status equates GBSTA field in ERP back end- Specified by:
setProcessingStatusin interfaceItem- Parameters:
processingStatus- ProcessingStatus
-
applyAlternativeProduct
public void applyAlternativeProduct(TechKey productGUID, java.lang.String productID) throws CommunicationException
Description copied from interface:ItemApply alternative product, e.g. product to be substituted with .- Specified by:
applyAlternativeProductin interfaceItem- Parameters:
productGUID- GUID of the applied productproductID- ID of the applied product- Throws:
CommunicationException- in case of an back-end error
-
isSubItem
public boolean isSubItem()
Description copied from interface:ItemIndicates whether the item is a subitem (has a parent) or not
-
getBillingStatus
public BillingStatus getBillingStatus()
Description copied from interface:Itemreturns the billing status of the item- Specified by:
getBillingStatusin interfaceItem- Returns:
- the actual billing statuts of the item
-
-