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,Serializable,Cloneable,Comparable<SimpleItem>
- Direct Known Subclasses:
CPQItemSalesDoc
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:
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.hybris.platform.sap.sapordermgmtbol.transaction.item.businessobject.interf.ItemBase
ItemBase.ItemUsage -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AlternativeProductListList of alternative productsprotected BillingStatusprotected booleanItem was copied from another oneprotected booleanDoes a delivery existprotected booleanItem is from catalogprotected booleanIs gift card?protected TextItem textprotected StringHandle of parent itemprotected StringPayment termsprotected DatePricing dateprotected ProcessingStatusprotected OverallStatusprotected StringRejection codeprotected ShippingStatusprotected ShipToShipToprotected StringReason for substitution IDprotected StringSystem product IDprotected UserStatusListFields 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, variantFields inherited from class de.hybris.platform.sap.core.bol.businessobject.BusinessObjectBase
backendObject, backendType, bobMessages, bobState, extensionData, genericFactory, handle, moduleConfigurationAccess, techKeyFields inherited from interface de.hybris.platform.sap.sapordermgmtbol.transaction.item.businessobject.interf.Item
DELIVERY_DELAYED, DELIVERY_IN_STOCK, DELIVERY_OUT_OF_STOCK, DELIVERY_PARTLYFields inherited from interface de.hybris.platform.sap.sapordermgmtbol.transaction.item.businessobject.interf.ItemBase
ITEM_CONFIGTYPE_VARIANTFields inherited from interface de.hybris.platform.sap.core.common.message.MessageListHolder
INVALID, VALID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyAlternativeProduct(TechKey productGUID, String productID) Apply alternative product, e.g.clone()Performs a deep-copy rather than a shallow copy.Creates a new AlternativProductList.booleanCompares this object to the specified object.Returns the alternativProductList.returns the billing status of the itemReturns the overall statusReturns the parentHandle, that is the handle of the parent, if the position is a subpositionGet the payment terms.Get the date which is used to calculate prices in IPCGet the processing status of the sales document item.This getter is dependent on the quantity and the free quantity of this product.Gets rejection/cancellation reason for the order.Get The shipping statusReturns the shipTo associated with this itemReturns the substitutionReasonId.Returns the systemProductId.inthashCode()Returns the hash code for this object.booleanbooleanThis method returns a flag, that indicates if the item is copied from another item, e.g.booleanDetermines whether the item is a free good by checking the item usage.booleanIndicates whether the item is originated from catalog.booleanbooleanisMergeSupported(Item toMergeWith) Overwrites the super implementation.booleanIndicates 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(String parentHandle) Sets the parentHandle, that is the handle of the parent, if the position is a subpositionvoidsetPaymentTerms(String paymentTerms) Set the payment terms.voidsetPricingDate(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(String rejection) Sets rejection/cancellation reason for the order.voidsetShippingStatus(ShippingStatus shipStatus) Set the shipping status for this object.voidSets the shiptTo for this item.voidsetSubstitutionReasonId(String substitutionReasonId) Sets the substitutionReasonId.voidsetSystemProductId(String systemProductId) Sets the systemProductId.voidsetUserStatusList(UserStatusList userStatusList) Sets list of user statustoString()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, setVariantMethods 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, setUnitMethods 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, setValidMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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, setValidMethods inherited from interface java.lang.Comparable
compareToMethods 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, setVariantMethods inherited from interface de.hybris.platform.sap.core.common.message.MessageListHolder
addMessage, clearMessages, getMessageListMethods 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 Details
-
systemProductId
System product ID -
substitutionReasonId
Reason for substitution ID -
shipToLine
ShipTo -
deliveryExists
protected boolean deliveryExistsDoes a delivery exist -
alternativProductList
List of alternative products -
copiedFromOtherItem
protected boolean copiedFromOtherItemItem was copied from another one -
paymentTerms
Payment terms -
fromCatalog
protected boolean fromCatalogItem is from catalog -
parentHandle
Handle of parent item -
pricingDate
Pricing date -
shipStatus
-
billStatus
-
procStatus
-
processingStatus
-
userStatusList
-
rejectionCode
Rejection code -
giftCard
protected boolean giftCardIs gift card? -
individualText
Item text
-
-
Constructor Details
-
ItemSalesDoc
public ItemSalesDoc()Default constructor for the Item
-
-
Method Details
-
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
Creates a new AlternativProductList.- Specified by:
createAlternativProductListin interfaceItem- Returns:
- AlternativProductListData
-
equals
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
Returns the alternativProductList.- Specified by:
getAlternativProductListin interfaceItem- Returns:
- AlternativProductList
-
getOverallStatus
Description copied from interface:ItemReturns the overall status- Specified by:
getOverallStatusin interfaceItem- Returns:
- the overall item status
-
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
Get the payment terms.- Specified by:
getPaymentTermsin interfaceItem- Returns:
- String the payment terms
-
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
Description copied from interface:ItemGet The shipping status- Specified by:
getShippingStatusin interfaceItem- Returns:
- the shipping status of the item
-
getShipTo
Description copied from interface:ItemReturns the shipTo associated with this item -
getSubstitutionReasonId
Returns the substitutionReasonId.- Specified by:
getSubstitutionReasonIdin interfaceItem- Returns:
- 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
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:
-
setAlternativProductList
Sets the alternativProductList.- Specified by:
setAlternativProductListin interfaceItem- Parameters:
alternativProductList- The alternativProductList to set
-
setBillingStatus
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
Description copied from interface:StatusObjectSet the overall status for this object.- Specified by:
setOverallStatusin interfaceStatusObject- Parameters:
procStatus- Overall Status
-
setParentHandle
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
Set the payment terms.- Specified by:
setPaymentTermsin interfaceItem- Parameters:
paymentTerms- the payment terms to be set.
-
setPricingDate
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
Description copied from interface:StatusObjectSet the shipping status for this object.- Specified by:
setShippingStatusin interfaceStatusObject- Parameters:
shipStatus- Shipping Status
-
setShipTo
Description copied from interface:ItemSets the shiptTo for this item. -
setSubstitutionReasonId
Sets the substitutionReasonId.- Specified by:
setSubstitutionReasonIdin interfaceItem- Parameters:
substitutionReasonId- The substitutionReasonId to set
-
setSystemProductId
Sets the systemProductId.- Specified by:
setSystemProductIdin interfaceItem- Parameters:
systemProductId- The systemProductId to set
-
setUserStatusList
Sets list of user status- Parameters:
userStatusList-
-
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
Description copied from interface:ItemGets rejection/cancellation reason for the order.- Specified by:
getRejectionCodein interfaceItem- Returns:
- cancellation reason (key)
-
setRejectionCode
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
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
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
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, 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
Description copied from interface:Itemreturns the billing status of the item- Specified by:
getBillingStatusin interfaceItem- Returns:
- the actual billing statuts of the item
-