Interface ItemBase
- All Superinterfaces:
BusinessObject,Cloneable,Comparable<SimpleItem>,MessageListHolder,Serializable,SimpleItem
- All Known Implementing Classes:
CPQItemSalesDoc,ItemBaseImpl,ItemSalesDoc
Represents the back-end's view of the items of a sales document.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumthis enumeration defines the different kinds of item usages. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringConstant for Item configuration type Product Variant used to identify product variantsFields inherited from interface de.hybris.platform.sap.core.common.message.MessageListHolder
INVALID, VALID -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPredecessor(ConnectedDocumentItem predecessorData) Adds aConnectedDocumentItemto the predecessor list.voidaddSuccessor(ConnectedDocumentItem successorData) Adds aConnectedDocumentItemto the successor list.clone()Performs a shallow copy of this object.Create aConnectedDocumentItemDataobjectCreate a new ScheduleLine object.Creates a text object.Gets the config flagGet the confirmed delivery date for the item.Get the confirmed quantity for the item.Gets the currency for the item.Get the delivered quantity for this item.Get the delivered quantity unit for this item.Returns the delivery priority keyRetrieves the free quantity.Return the freight value / shipping costs.Returns the price of this item inclusive taxes.Returns the property grossValueWOFreightReturns the item usage of this item.Returns the item type usage of the back end.Price of one base unit (unit price) of this item without taxes.Returns the unit that is used for the unit price.
e.g.Returns the quantity of the unit that is used for the unit price.
e.g.Get the net costs for this item.
Whereas NetPrice gives the price per base unit, the NetValue is the price for the whole quantity.Get the net costs for this item without freight.
Whereas NetPrice gives the price per base unit, the NetValue is the price for the whole quantity.Returns the old quantity of this item.
If the quantity is changed for a item, this quantity shows the value before.Get the business partner listreturns a list of all possible units of this product.Get the predecessor list.Gets the still to deliver quantity.Return the requested delivery date of this item.
The date that the delivery was requested for, NOT the confirmed delivery date.Returns all schedule lines.Gets the successor list.Gets the tax value of this item.getText()Returns the text on item level for this item.booleanbooleanDetermine, whether or no the item is configurable.booleanDo we need to sync the configuration with the backend?booleanIndicates whether the item is deletable.booleanbooleanReturns true if the productId is null or ""booleanReturns true if the product exists in the back endbooleanbooleanvoidsetBusinessObjectType(String busType) Sets Item's Business Object TypevoidsetCancelable(boolean cancelable) Sets if item can be cancelled.voidsetConfigType(String configType) Sets the config flagX, G(for grid),...if the item is configurable; otherwiseblank.voidsetConfigurable(boolean configurable) Specifies whether the item should be configurable.voidsetConfigurableDirty(boolean isDirty) voidsetConfirmedDeliveryDate(Date confirmedDeliveryDate) Sets Confirmed Delivery Date.voidsetConfirmedQuantity(BigDecimal quantity) Sets confirmed quantity.voidsetCreatedAt(Date createdAt) voidsetCurrency(String currency) Sets the currency for this item.
e.g.voidsetDeletable(boolean deletable) Sets if item can be deleted.voidsetDeliverdQuantity(BigDecimal quantity) Sets delivered quantity.voidSets delivered quantity unit.voidsetDeliveryPriority(String deliveryPriority) Sets the delivery priority key.voidsetErroneous(boolean erroneous) Sets this item as erroneous or not.voidSets the free quantity.voidsetFreightValue(BigDecimal freightValue) Sets a freight value.voidsetGrossValue(BigDecimal grossValue) Sets a gross value.voidsetGrossValueWOFreight(BigDecimal grossValueWOFreight) Set the property grossValueWOFreightvoidsetItemCategory(String itemCategory) Sets item categoryvoidsetItemUsage(ItemBase.ItemUsage itemUsage) Sets the item usage for this item.
e.g free goodvoidsetItmTypeUsage(String itmTypeUsage) Sets an item type usage .voidsetLatestDeliveryDate(Date latestDeliveryDate) The latest delivery date is the date of the latest schedule linevoidsetNetPrice(BigDecimal netPrice) Sets an item net price.voidsetNetPriceUnit(String netPriceUnit) Sets an item net price unit.
This is the unit of the unit price.voidsetNetPriceWOFreight(BigDecimal netPriceWOFreight) voidsetNetQuantPriceUnit(BigDecimal netQuantPriceUnit) Sets an item net quantity price unit.
This is the quantity of the base unit of the unit price.voidsetNetValue(BigDecimal netValue) Sets net value.
Price without tax.voidsetNetValueWOFreight(BigDecimal netValueWOFreight) Sets net value with out freight.
Price without tax or freight.voidsetOldQuantity(BigDecimal quantity) Set the property oldQuantity.voidSet the business partner list Analogy to the header set business partner listvoidsetPossibleUnits(List<String> possibleUnits) Sets all units that are possible for that product.voidsetPriceRelevant(boolean isPriceRelevant) Sets the flag, that shows, if the position is price relevantvoidsetProductExists(boolean productExists) Sets the information, whether the product exists in the back endvoidsetQuantityToDeliver(BigDecimal quantity) Sets an item quantity to deliver.voidsetReqDeliveryDate(Date reqDeliveryDate) Sets required delivery date.
This is the date the delivery is requested, not the confirmed delivery date.voidsetScheduleLines(List<Schedline> scheduleLines) Sets schedule lines for the item .voidsetStatistical(boolean statistical) Sets statisticalvoidsetTaxValue(BigDecimal taxValue) Sets the tax value of this item.voidSets the text on item level.voidsetTotalDiscount(BigDecimal totalDiscount) Sets the total discount, which is used for strike through prices.voidsetVariant(boolean variant) Setter if this item is a variant of a configurable product or notMethods 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.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
-
ITEM_CONFIGTYPE_VARIANT
Constant for Item configuration type Product Variant used to identify product variants- See Also:
-
-
Method Details
-
addPredecessor
Adds aConnectedDocumentItemto the predecessor list. Anullreference passed to this function will be ignored, in this case nothing will happen.- Parameters:
predecessorData- ConnectedDocumentItem to be added to the predecessor list
-
addSuccessor
Adds aConnectedDocumentItemto the successor list. Anullreference passed to this function will be ignored, in this case nothing will happen.- Parameters:
successorData- ConnectedDocument to be added to the successor list
-
clone
Object clone()Performs a shallow copy of this object. Because of the fact that nearly all fields of this object consist of immutable objects likeStringandTechKeyor primitive types the shallow copy is nearly identical with a deep copy. The only difference is that the propertyitemDelivery(a list) is backed by the same data.- Returns:
- shallow copy of this object
-
createConnectedDocumentItemData
ConnectedDocumentItem createConnectedDocumentItemData()Create aConnectedDocumentItemDataobject- Returns:
- ConnectedDocumentItemData object
- See Also:
-
createScheduleLine
Schedline createScheduleLine()Create a new ScheduleLine object.- Returns:
- newly created schedule line object
-
createText
Text createText()Creates a text object. This method is used by back end objects to get instances of the text object.- Returns:
- newly created text object
-
getConfirmedDeliveryDate
Date getConfirmedDeliveryDate()Get the confirmed delivery date for the item.- Returns:
- confirmed delivery date
-
getConfirmedQuantity
BigDecimal getConfirmedQuantity()Get the confirmed quantity for the item.- Returns:
- confirmed quantity
-
getCurrency
String getCurrency()Gets the currency for the item.- Returns:
- the currency
-
getDeliveredQuantity
BigDecimal getDeliveredQuantity()Get the delivered quantity for this item.- Returns:
- delivered quantity as BigDecimal
-
getDeliveredQuantityUnit
String getDeliveredQuantityUnit()Get the delivered quantity unit for this item.- Returns:
- delivered quantity unit of measure
-
getDeliveryPriority
String getDeliveryPriority()Returns the delivery priority key- Returns:
- String
-
getFreeQuantity
BigDecimal getFreeQuantity()Retrieves the free quantity. Only relevant for inclusive free goods.- Returns:
- the free quantity in local specific format.
-
getFreightValue
BigDecimal getFreightValue()Return the freight value / shipping costs.- Returns:
- BigDecimal of freight value
-
getGrossValue
BigDecimal getGrossValue()Returns the price of this item inclusive taxes.- Returns:
- gross value
-
getItmTypeUsage
String getItmTypeUsage()Returns the item type usage of the back end.- Returns:
- ItemtypeUsage
-
getItemUsage
ItemBase.ItemUsage getItemUsage()Returns the item usage of this item.- Returns:
- ItemUsage
- See Also:
-
getNetPrice
BigDecimal getNetPrice()Price of one base unit (unit price) of this item without taxes.- Returns:
- Price of 1 unit without taxes
-
getNetPriceUnit
String getNetPriceUnit()Returns the unit that is used for the unit price.
e.g. PC if the price is calculated per 2 PC- Returns:
- unit of the net price
-
getNetQuantPriceUnit
BigDecimal getNetQuantPriceUnit()Returns the quantity of the unit that is used for the unit price.
e.g. 2 if the price is calculated per 2 PC- Returns:
- quantity of the unit for which the unit price is calculated
-
getNetValue
BigDecimal getNetValue()Get the net costs for this item.
Whereas NetPrice gives the price per base unit, the NetValue is the price for the whole quantity. This includes the Shipping costs/freight.- Returns:
- price of this item without taxes
-
getNetValueWOFreight
BigDecimal getNetValueWOFreight()Get the net costs for this item without freight.
Whereas NetPrice gives the price per base unit, the NetValue is the price for the whole quantity. This is excluding the Shipping costs/freight.- Returns:
- price of this item without taxes and freight
-
getOldQuantity
BigDecimal getOldQuantity()Returns the old quantity of this item.
If the quantity is changed for a item, this quantity shows the value before. This can e.g. be used for some business events.- Returns:
- quantity before the change
-
getPartnerListData
PartnerList getPartnerListData()Get the business partner list- Returns:
- PartnerListData list of business partners
-
getPossibleUnits
returns a list of all possible units of this product.- Returns:
- list of units
-
getPredecessorList
List<ConnectedDocumentItem> getPredecessorList()Get the predecessor list.- Returns:
- list of all predecessor documents
- See Also:
-
getQuantityToDeliver
BigDecimal getQuantityToDeliver()Gets the still to deliver quantity. Difference between ordered quantity and already delivered quantity.- Returns:
- the quantity
-
getReqDeliveryDate
Date getReqDeliveryDate()Return the requested delivery date of this item.
The date that the delivery was requested for, NOT the confirmed delivery date.- Returns:
- RequestedDeliveryDate
-
getScheduleLines
Returns all schedule lines.- Returns:
- list of schedule lines
- See Also:
-
getSuccessorList
List<ConnectedDocumentItem> getSuccessorList()Gets the successor list.- Returns:
- list of the successor items
-
getTaxValue
BigDecimal getTaxValue()Gets the tax value of this item.- Returns:
- tax value
-
getText
Text getText()Returns the text on item level for this item.- Returns:
- text object
- See Also:
-
getTotalDiscount
BigDecimal getTotalDiscount()- Returns:
- total discount, which is used for strike through prices
-
isCancelable
boolean isCancelable()- Returns:
- whether this item can be cancelled
-
isConfigurable
boolean isConfigurable()Determine, whether or no the item is configurable.- Returns:
trueif the item can be configured, otherwisefalse.
-
setConfigurable
void setConfigurable(boolean configurable) Specifies whether the item should be configurable.- Parameters:
configurable- iftrueitem is configurable; otherwise not.
-
setConfigType
Sets the config flagX, G(for grid),...if the item is configurable; otherwiseblank.- Parameters:
configType- either X,G orblank
-
getConfigType
String getConfigType()Gets the config flag- Returns:
X, G(for grid),...if the item is configurable; otherwiseblank.
-
isConfigurationDirty
boolean isConfigurationDirty()Do we need to sync the configuration with the backend?- Returns:
- Dirty?
-
isDeletable
boolean isDeletable()Indicates whether the item is deletable.- Returns:
trueif the item is deletable; otherwisefalse.
-
isErroneous
boolean isErroneous()- Returns:
- true if the item is invalid
-
setBusinessObjectType
Sets Item's Business Object Type- Parameters:
busType- item type which is used for the item classification in the back end
-
setCancelable
void setCancelable(boolean cancelable) Sets if item can be cancelled.- Parameters:
cancelable- iftruean item can be cancelled
-
setConfirmedDeliveryDate
Sets Confirmed Delivery Date.- Parameters:
confirmedDeliveryDate- the already confirmed delivery date
-
setConfirmedQuantity
Sets confirmed quantity.- Parameters:
quantity- item quantity
-
setCurrency
Sets the currency for this item.
e.g. USD or EUR- Parameters:
currency- currency
-
setDeletable
void setDeletable(boolean deletable) Sets if item can be deleted.- Parameters:
deletable- iftruean item can be deleted
-
setDeliverdQuantity
Sets delivered quantity.- Parameters:
quantity- the already delivered quantity
-
setDeliverdQuantityUnit
Sets delivered quantity unit.- Parameters:
unit- the unit belonging to the delivered quantity
-
setDeliveryPriority
Sets the delivery priority key.- Parameters:
deliveryPriority- priority for delivery
-
setErroneous
void setErroneous(boolean erroneous) Sets this item as erroneous or not.- Parameters:
erroneous- true if the item has errors
-
setFreeQuantity
Sets the free quantity. Only relevant for inclusive free goods.- Parameters:
arg- the free quantity in local specific format.
-
setFreightValue
Sets a freight value.- Parameters:
freightValue- freight costs for this item
-
setGrossValue
Sets a gross value.- Parameters:
grossValue- gross value for this item
-
setItmTypeUsage
Sets an item type usage .- Parameters:
itmTypeUsage- type of the item as string
-
setItemUsage
Sets the item usage for this item.
e.g free good- Parameters:
itemUsage- an item usage- See Also:
-
setNetPrice
Sets an item net price.- Parameters:
netPrice- value to set
-
setNetPriceUnit
Sets an item net price unit.
This is the unit of the unit price.- Parameters:
netPriceUnit- value to set
-
setNetQuantPriceUnit
Sets an item net quantity price unit.
This is the quantity of the base unit of the unit price.- Parameters:
netQuantPriceUnit- value to set
-
setNetValue
Sets net value.
Price without tax. For the overall quantity.- Parameters:
netValue- value to set
-
setNetValueWOFreight
Sets net value with out freight.
Price without tax or freight. For the overall quantity.- Parameters:
netValueWOFreight- value to set
-
setOldQuantity
Set the property oldQuantity. Replaces the method with String parameter.- Parameters:
quantity- The value of oldQuantity property as BigDecimal.
-
setPartnerListData
Set the business partner list Analogy to the header set business partner list- Parameters:
list- PartnerListData list of business partners
-
setPossibleUnits
Sets all units that are possible for that product.- Parameters:
possibleUnits- list of all units
-
setPriceRelevant
void setPriceRelevant(boolean isPriceRelevant) Sets the flag, that shows, if the position is price relevant- Parameters:
isPriceRelevant- true or false
-
setQuantityToDeliver
Sets an item quantity to deliver.- Parameters:
quantity- value to set
-
setReqDeliveryDate
Sets required delivery date.
This is the date the delivery is requested, not the confirmed delivery date.- Parameters:
reqDeliveryDate- value to set
-
setScheduleLines
Sets schedule lines for the item .- Parameters:
scheduleLines- list of Schedlines- See Also:
-
setTaxValue
Sets the tax value of this item.- Parameters:
taxValue- value to set
-
setText
Sets the text on item level.- Parameters:
text- text on item level- See Also:
-
setTotalDiscount
Sets the total discount, which is used for strike through prices. The number must be positive (e.g. 10 and not -10, this is how it comes from IPC).- Parameters:
totalDiscount- value to set
-
setProductExists
void setProductExists(boolean productExists) Sets the information, whether the product exists in the back end- Parameters:
productExists- false if the product does not exist in the back end
-
isProductExists
boolean isProductExists()Returns true if the product exists in the back end- Returns:
- true if the product exists in the back end
-
isProductEmpty
boolean isProductEmpty()Returns true if the productId is null or ""- Returns:
- true if there is no product maintained
-
getGrossValueWOFreight
BigDecimal getGrossValueWOFreight()Returns the property grossValueWOFreight- Returns:
- grossValueWOFreight
-
setGrossValueWOFreight
Set the property grossValueWOFreight- Parameters:
grossValueWOFreight- value to set
-
setLatestDeliveryDate
The latest delivery date is the date of the latest schedule line- Parameters:
latestDeliveryDate- the latestDeliveryDate to set
-
setConfigurableDirty
void setConfigurableDirty(boolean isDirty) - Parameters:
isDirty-true, if there is the need to sync the configuration with the back-end
-
isVariant
boolean isVariant()- Returns:
- true if this item is a variant of a configurable product
-
setVariant
void setVariant(boolean variant) Setter if this item is a variant of a configurable product or not- Parameters:
variant- true id this item is a variant
-
getCreatedAt
Date getCreatedAt()- Returns:
- created at date of this item
-
setCreatedAt
- Parameters:
createdAt- createdAt date of this item
-
getItemCategory
String getItemCategory()- Returns:
- item category
-
setItemCategory
Sets item category- Parameters:
itemCategory- item category
-
isStatistical
boolean isStatistical()- Returns:
- statistical
-
setStatistical
void setStatistical(boolean statistical) Sets statistical- Parameters:
statistical-
-
setNetPriceWOFreight
- Parameters:
netPriceWOFreight-
-
getNetPriceWOFreight
BigDecimal getNetPriceWOFreight()- Returns:
- netPriceWOFreight
-