Interface SimpleItem
- All Superinterfaces:
BusinessObject,Cloneable,Comparable<SimpleItem>,MessageListHolder,Serializable
- All Known Implementing Classes:
CPQItemSalesDoc,ItemBaseImpl,ItemSalesDoc,SimpleItemImpl
this interface defines the most common attributes of an item (e.g. product, quantity, ...).
-
Field Summary
Fields inherited from interface de.hybris.platform.sap.core.common.message.MessageListHolder
INVALID, VALID -
Method Summary
Modifier and TypeMethodDescriptionGet descriptions on the item level.Returns the quantity of this item.intReturn the position number of this item.
The position is determined in the back end.Returns the TechKey (guid) of the parent item if this item is a sub item.
If there is no parent item, null or TechKey.EMPTY_KEY is returned.Returns the id / TechKey / GUID of the product.Returns the product (name) of this item.Returns the quantity of this item.Type safe getter for the extension mapgetUnit()Returns the UOM (Unit of Measure) of this item.
This unit is not localised, e.g.booleanIf product of the item changes (e.g.voidsetDescription(String description) Sets Description.voidsetNumberInt(int numberInt) Sets the numberInt/position of the item.
The position is determined in the back end and set to the item.voidsetParentId(TechKey parentId) Sets parent Id for an item.voidsetProductChanged(boolean productChanged) If product of the item changes (e.g.voidsetProductGuid(TechKey productGuid) Sets the product guid for this item.voidsetProductId(String productId) Sets the product for this item.voidsetQuantity(BigDecimal quantity) Sets an item quantity.voidSet the unit (UOM) for this item.
The value is not localised, e.g.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, setValidMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface de.hybris.platform.sap.core.common.message.MessageListHolder
addMessage, clearMessages, getMessageList
-
Method Details
-
getProductId
String getProductId()Returns the product (name) of this item.- Returns:
- product name
-
getProductGuid
TechKey getProductGuid()Returns the id / TechKey / GUID of the product.- Returns:
- TechKey / GUID of this product
-
setProductId
Sets the product for this item.- Parameters:
productId- product name
-
setProductGuid
Sets the product guid for this item.- Parameters:
productGuid- TechKey/guid of the product
-
isProductChanged
boolean isProductChanged()If product of the item changes (e.g. was a notebook and is now a monitor), we reuse the item but we need to know whether the product changed- Returns:
- true if product was changed
-
setProductChanged
void setProductChanged(boolean productChanged) If product of the item changes (e.g. was a notebook and is now a monitor), we reuse the item but we need to know whether the product changed- Parameters:
productChanged- iftrue, we conside the item to be changted
-
setParentId
Sets parent Id for an item. For example for the sub item, free good item.- Parameters:
parentId- TechKey or null/TechKey.EMPTY_KEY
-
getParentId
TechKey getParentId()Returns the TechKey (guid) of the parent item if this item is a sub item.
If there is no parent item, null or TechKey.EMPTY_KEY is returned.- Returns:
- TechKey of the parent item
-
getDescription
String getDescription()Get descriptions on the item level.- Returns:
- description
-
getQuantity
BigDecimal getQuantity()Returns the quantity of this item.- Returns:
- quantity
-
getLastQuantity
BigDecimal getLastQuantity()Returns the quantity of this item.- Returns:
- quantity
-
getUnit
String getUnit()Returns the UOM (Unit of Measure) of this item.
This unit is not localised, e.g. ST- Returns:
- UOM
-
setDescription
Sets Description.- Parameters:
description- item description
-
setQuantity
Sets an item quantity.- Parameters:
quantity- value to set
-
setUnit
Set the unit (UOM) for this item.
The value is not localised, e.g. ST- Parameters:
unit- UOM
-
getNumberInt
int getNumberInt()Return the position number of this item.
The position is determined in the back end.- Returns:
- numberInt/position
-
setNumberInt
void setNumberInt(int numberInt) Sets the numberInt/position of the item.
The position is determined in the back end and set to the item. It cannot be changed.- Parameters:
numberInt- position
-
getTypedExtensionMap
Type safe getter for the extension map- Returns:
- extension map attached to this item
-