Interface ItemBase
-
- All Superinterfaces:
BusinessObject,java.lang.Cloneable,java.lang.Comparable<SimpleItem>,MessageListHolder,java.io.Serializable,SimpleItem
- All Known Implementing Classes:
CPQItemSalesDoc,ItemBaseImpl,ItemSalesDoc
public interface ItemBase extends SimpleItem
Represents the back-end's view of the items of a sales document.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classItemBase.ItemUsagethis enumeration defines the different kinds of item usages.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringITEM_CONFIGTYPE_VARIANTConstant for Item configuration type Product Variant used to identify product variants-
Fields inherited from interface de.hybris.platform.sap.core.common.message.MessageListHolder
INVALID, VALID
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddPredecessor(ConnectedDocumentItem predecessorData)Adds aConnectedDocumentItemto the predecessor list.voidaddSuccessor(ConnectedDocumentItem successorData)Adds aConnectedDocumentItemto the successor list.java.lang.Objectclone()Performs a shallow copy of this object.ConnectedDocumentItemcreateConnectedDocumentItemData()Create aConnectedDocumentItemDataobjectSchedlinecreateScheduleLine()Create a new ScheduleLine object.TextcreateText()Creates a text object.java.lang.StringgetConfigType()Gets the config flagjava.util.DategetConfirmedDeliveryDate()Get the confirmed delivery date for the item.java.math.BigDecimalgetConfirmedQuantity()Get the confirmed quantity for the item.java.util.DategetCreatedAt()java.lang.StringgetCurrency()Gets the currency for the item.java.math.BigDecimalgetDeliveredQuantity()Get the delivered quantity for this item.java.lang.StringgetDeliveredQuantityUnit()Get the delivered quantity unit for this item.java.lang.StringgetDeliveryPriority()Returns the delivery priority keyjava.math.BigDecimalgetFreeQuantity()Retrieves the free quantity.java.math.BigDecimalgetFreightValue()Return the freight value / shipping costs.java.math.BigDecimalgetGrossValue()Returns the price of this item inclusive taxes.java.math.BigDecimalgetGrossValueWOFreight()Returns the property grossValueWOFreightjava.lang.StringgetItemCategory()ItemBase.ItemUsagegetItemUsage()Returns the item usage of this item.java.lang.StringgetItmTypeUsage()Returns the item type usage of the back end.java.math.BigDecimalgetNetPrice()Price of one base unit (unit price) of this item without taxes.java.lang.StringgetNetPriceUnit()Returns the unit that is used for the unit price.
e.g.java.math.BigDecimalgetNetPriceWOFreight()java.math.BigDecimalgetNetQuantPriceUnit()Returns the quantity of the unit that is used for the unit price.
e.g.java.math.BigDecimalgetNetValue()Get the net costs for this item.
Whereas NetPrice gives the price per base unit, the NetValue is the price for the whole quantity.java.math.BigDecimalgetNetValueWOFreight()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.java.math.BigDecimalgetOldQuantity()Returns the old quantity of this item.
If the quantity is changed for a item, this quantity shows the value before.PartnerListgetPartnerListData()Get the business partner listjava.util.List<java.lang.String>getPossibleUnits()returns a list of all possible units of this product.java.util.List<ConnectedDocumentItem>getPredecessorList()Get the predecessor list.java.math.BigDecimalgetQuantityToDeliver()Gets the still to deliver quantity.java.util.DategetReqDeliveryDate()Return the requested delivery date of this item.
The date that the delivery was requested for, NOT the confirmed delivery date.java.util.List<Schedline>getScheduleLines()Returns all schedule lines.java.util.List<ConnectedDocumentItem>getSuccessorList()Gets the successor list.java.math.BigDecimalgetTaxValue()Gets the tax value of this item.TextgetText()Returns the text on item level for this item.java.math.BigDecimalgetTotalDiscount()booleanisCancelable()booleanisConfigurable()Determine, whether or no the item is configurable.booleanisConfigurationDirty()Do we need to sync the configuration with the backend?booleanisDeletable()Indicates whether the item is deletable.booleanisErroneous()booleanisProductEmpty()Returns true if the productId is null or ""booleanisProductExists()Returns true if the product exists in the back endbooleanisStatistical()booleanisVariant()voidsetBusinessObjectType(java.lang.String busType)Sets Item's Business Object TypevoidsetCancelable(boolean cancelable)Sets if item can be cancelled.voidsetConfigType(java.lang.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(java.util.Date confirmedDeliveryDate)Sets Confirmed Delivery Date.voidsetConfirmedQuantity(java.math.BigDecimal quantity)Sets confirmed quantity.voidsetCreatedAt(java.util.Date createdAt)voidsetCurrency(java.lang.String currency)Sets the currency for this item.
e.g.voidsetDeletable(boolean deletable)Sets if item can be deleted.voidsetDeliverdQuantity(java.math.BigDecimal quantity)Sets delivered quantity.voidsetDeliverdQuantityUnit(java.lang.String unit)Sets delivered quantity unit.voidsetDeliveryPriority(java.lang.String deliveryPriority)Sets the delivery priority key.voidsetErroneous(boolean erroneous)Sets this item as erroneous or not.voidsetFreeQuantity(java.math.BigDecimal arg)Sets the free quantity.voidsetFreightValue(java.math.BigDecimal freightValue)Sets a freight value.voidsetGrossValue(java.math.BigDecimal grossValue)Sets a gross value.voidsetGrossValueWOFreight(java.math.BigDecimal grossValueWOFreight)Set the property grossValueWOFreightvoidsetItemCategory(java.lang.String itemCategory)Sets item categoryvoidsetItemUsage(ItemBase.ItemUsage itemUsage)Sets the item usage for this item.
e.g free goodvoidsetItmTypeUsage(java.lang.String itmTypeUsage)Sets an item type usage .voidsetLatestDeliveryDate(java.util.Date latestDeliveryDate)The latest delivery date is the date of the latest schedule linevoidsetNetPrice(java.math.BigDecimal netPrice)Sets an item net price.voidsetNetPriceUnit(java.lang.String netPriceUnit)Sets an item net price unit.
This is the unit of the unit price.voidsetNetPriceWOFreight(java.math.BigDecimal netPriceWOFreight)voidsetNetQuantPriceUnit(java.math.BigDecimal netQuantPriceUnit)Sets an item net quantity price unit.
This is the quantity of the base unit of the unit price.voidsetNetValue(java.math.BigDecimal netValue)Sets net value.
Price without tax.voidsetNetValueWOFreight(java.math.BigDecimal netValueWOFreight)Sets net value with out freight.
Price without tax or freight.voidsetOldQuantity(java.math.BigDecimal quantity)Set the property oldQuantity.voidsetPartnerListData(PartnerList list)Set the business partner list Analogy to the header set business partner listvoidsetPossibleUnits(java.util.List<java.lang.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(java.math.BigDecimal quantity)Sets an item quantity to deliver.voidsetReqDeliveryDate(java.util.Date reqDeliveryDate)Sets required delivery date.
This is the date the delivery is requested, not the confirmed delivery date.voidsetScheduleLines(java.util.List<Schedline> scheduleLines)Sets schedule lines for the item .voidsetStatistical(boolean statistical)Sets statisticalvoidsetTaxValue(java.math.BigDecimal taxValue)Sets the tax value of this item.voidsetText(Text text)Sets the text on item level.voidsetTotalDiscount(java.math.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 not-
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.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
-
ITEM_CONFIGTYPE_VARIANT
static final java.lang.String ITEM_CONFIGTYPE_VARIANT
Constant for Item configuration type Product Variant used to identify product variants- See Also:
- Constant Field Values
-
-
Method Detail
-
addPredecessor
void addPredecessor(ConnectedDocumentItem predecessorData)
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
void addSuccessor(ConnectedDocumentItem successorData)
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
java.lang.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:
ConnectedDocumentItem
-
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
java.util.Date getConfirmedDeliveryDate()
Get the confirmed delivery date for the item.- Returns:
- confirmed delivery date
-
getConfirmedQuantity
java.math.BigDecimal getConfirmedQuantity()
Get the confirmed quantity for the item.- Returns:
- confirmed quantity
-
getCurrency
java.lang.String getCurrency()
Gets the currency for the item.- Returns:
- the currency
-
getDeliveredQuantity
java.math.BigDecimal getDeliveredQuantity()
Get the delivered quantity for this item.- Returns:
- delivered quantity as BigDecimal
-
getDeliveredQuantityUnit
java.lang.String getDeliveredQuantityUnit()
Get the delivered quantity unit for this item.- Returns:
- delivered quantity unit of measure
-
getDeliveryPriority
java.lang.String getDeliveryPriority()
Returns the delivery priority key- Returns:
- String
-
getFreeQuantity
java.math.BigDecimal getFreeQuantity()
Retrieves the free quantity. Only relevant for inclusive free goods.- Returns:
- the free quantity in local specific format.
-
getFreightValue
java.math.BigDecimal getFreightValue()
Return the freight value / shipping costs.- Returns:
- BigDecimal of freight value
-
getGrossValue
java.math.BigDecimal getGrossValue()
Returns the price of this item inclusive taxes.- Returns:
- gross value
-
getItmTypeUsage
java.lang.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:
ItemBase.ItemUsage
-
getNetPrice
java.math.BigDecimal getNetPrice()
Price of one base unit (unit price) of this item without taxes.- Returns:
- Price of 1 unit without taxes
-
getNetPriceUnit
java.lang.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
java.math.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
java.math.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
java.math.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
java.math.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
java.util.List<java.lang.String> getPossibleUnits()
returns a list of all possible units of this product.- Returns:
- list of units
-
getPredecessorList
java.util.List<ConnectedDocumentItem> getPredecessorList()
Get the predecessor list.- Returns:
- list of all predecessor documents
- See Also:
ConnectedDocumentItem
-
getQuantityToDeliver
java.math.BigDecimal getQuantityToDeliver()
Gets the still to deliver quantity. Difference between ordered quantity and already delivered quantity.- Returns:
- the quantity
-
getReqDeliveryDate
java.util.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
java.util.List<Schedline> getScheduleLines()
Returns all schedule lines.- Returns:
- list of schedule lines
- See Also:
Schedline
-
getSuccessorList
java.util.List<ConnectedDocumentItem> getSuccessorList()
Gets the successor list.- Returns:
- list of the successor items
-
getTaxValue
java.math.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:
Text
-
getTotalDiscount
java.math.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
void setConfigType(java.lang.String configType)
Sets the config flagX, G(for grid),...if the item is configurable; otherwiseblank.- Parameters:
configType- either X,G orblank
-
getConfigType
java.lang.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
void setBusinessObjectType(java.lang.String busType)
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
void setConfirmedDeliveryDate(java.util.Date confirmedDeliveryDate)
Sets Confirmed Delivery Date.- Parameters:
confirmedDeliveryDate- the already confirmed delivery date
-
setConfirmedQuantity
void setConfirmedQuantity(java.math.BigDecimal quantity)
Sets confirmed quantity.- Parameters:
quantity- item quantity
-
setCurrency
void setCurrency(java.lang.String currency)
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
void setDeliverdQuantity(java.math.BigDecimal quantity)
Sets delivered quantity.- Parameters:
quantity- the already delivered quantity
-
setDeliverdQuantityUnit
void setDeliverdQuantityUnit(java.lang.String unit)
Sets delivered quantity unit.- Parameters:
unit- the unit belonging to the delivered quantity
-
setDeliveryPriority
void setDeliveryPriority(java.lang.String deliveryPriority)
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
void setFreeQuantity(java.math.BigDecimal arg)
Sets the free quantity. Only relevant for inclusive free goods.- Parameters:
arg- the free quantity in local specific format.
-
setFreightValue
void setFreightValue(java.math.BigDecimal freightValue)
Sets a freight value.- Parameters:
freightValue- freight costs for this item
-
setGrossValue
void setGrossValue(java.math.BigDecimal grossValue)
Sets a gross value.- Parameters:
grossValue- gross value for this item
-
setItmTypeUsage
void setItmTypeUsage(java.lang.String itmTypeUsage)
Sets an item type usage .- Parameters:
itmTypeUsage- type of the item as string
-
setItemUsage
void setItemUsage(ItemBase.ItemUsage itemUsage)
Sets the item usage for this item.
e.g free good- Parameters:
itemUsage- an item usage- See Also:
ItemBase.ItemUsage
-
setNetPrice
void setNetPrice(java.math.BigDecimal netPrice)
Sets an item net price.- Parameters:
netPrice- value to set
-
setNetPriceUnit
void setNetPriceUnit(java.lang.String netPriceUnit)
Sets an item net price unit.
This is the unit of the unit price.- Parameters:
netPriceUnit- value to set
-
setNetQuantPriceUnit
void setNetQuantPriceUnit(java.math.BigDecimal netQuantPriceUnit)
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
void setNetValue(java.math.BigDecimal netValue)
Sets net value.
Price without tax. For the overall quantity.- Parameters:
netValue- value to set
-
setNetValueWOFreight
void setNetValueWOFreight(java.math.BigDecimal netValueWOFreight)
Sets net value with out freight.
Price without tax or freight. For the overall quantity.- Parameters:
netValueWOFreight- value to set
-
setOldQuantity
void setOldQuantity(java.math.BigDecimal quantity)
Set the property oldQuantity. Replaces the method with String parameter.- Parameters:
quantity- The value of oldQuantity property as BigDecimal.
-
setPartnerListData
void setPartnerListData(PartnerList list)
Set the business partner list Analogy to the header set business partner list- Parameters:
list- PartnerListData list of business partners
-
setPossibleUnits
void setPossibleUnits(java.util.List<java.lang.String> possibleUnits)
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
void setQuantityToDeliver(java.math.BigDecimal quantity)
Sets an item quantity to deliver.- Parameters:
quantity- value to set
-
setReqDeliveryDate
void setReqDeliveryDate(java.util.Date reqDeliveryDate)
Sets required delivery date.
This is the date the delivery is requested, not the confirmed delivery date.- Parameters:
reqDeliveryDate- value to set
-
setScheduleLines
void setScheduleLines(java.util.List<Schedline> scheduleLines)
Sets schedule lines for the item .- Parameters:
scheduleLines- list of Schedlines- See Also:
Schedline
-
setTaxValue
void setTaxValue(java.math.BigDecimal taxValue)
Sets the tax value of this item.- Parameters:
taxValue- value to set
-
setText
void setText(Text text)
Sets the text on item level.- Parameters:
text- text on item level- See Also:
Text
-
setTotalDiscount
void setTotalDiscount(java.math.BigDecimal totalDiscount)
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
java.math.BigDecimal getGrossValueWOFreight()
Returns the property grossValueWOFreight- Returns:
- grossValueWOFreight
-
setGrossValueWOFreight
void setGrossValueWOFreight(java.math.BigDecimal grossValueWOFreight)
Set the property grossValueWOFreight- Parameters:
grossValueWOFreight- value to set
-
setLatestDeliveryDate
void setLatestDeliveryDate(java.util.Date latestDeliveryDate)
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
java.util.Date getCreatedAt()
- Returns:
- created at date of this item
-
setCreatedAt
void setCreatedAt(java.util.Date createdAt)
- Parameters:
createdAt- createdAt date of this item
-
getItemCategory
java.lang.String getItemCategory()
- Returns:
- item category
-
setItemCategory
void setItemCategory(java.lang.String itemCategory)
Sets item category- Parameters:
itemCategory- item category
-
isStatistical
boolean isStatistical()
- Returns:
- statistical
-
setStatistical
void setStatistical(boolean statistical)
Sets statistical- Parameters:
statistical-
-
setNetPriceWOFreight
void setNetPriceWOFreight(java.math.BigDecimal netPriceWOFreight)
- Parameters:
netPriceWOFreight-
-
getNetPriceWOFreight
java.math.BigDecimal getNetPriceWOFreight()
- Returns:
- netPriceWOFreight
-
-