Interface SimpleItem
-
- All Superinterfaces:
BusinessObject,java.lang.Cloneable,java.lang.Comparable<SimpleItem>,MessageListHolder,java.io.Serializable
- All Known Implementing Classes:
CPQItemSalesDoc,ItemBaseImpl,ItemSalesDoc,SimpleItemImpl
public interface SimpleItem extends BusinessObject, java.lang.Cloneable, java.lang.Comparable<SimpleItem>
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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetDescription()Get descriptions on the item level.java.math.BigDecimalgetLastQuantity()Returns the quantity of this item.intgetNumberInt()Return the position number of this item.
The position is determined in the back end.TechKeygetParentId()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.TechKeygetProductGuid()Returns the id / TechKey / GUID of the product.java.lang.StringgetProductId()Returns the product (name) of this item.java.math.BigDecimalgetQuantity()Returns the quantity of this item.java.util.Map<java.lang.String,java.lang.Object>getTypedExtensionMap()Type safe getter for the extension mapjava.lang.StringgetUnit()Returns the UOM (Unit of Measure) of this item.
This unit is not localised, e.g.booleanisProductChanged()If product of the item changes (e.g.voidsetDescription(java.lang.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(java.lang.String productId)Sets the product for this item.voidsetQuantity(java.math.BigDecimal quantity)Sets an item quantity.voidsetUnit(java.lang.String unit)Set 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, setValid
-
Methods inherited from interface de.hybris.platform.sap.core.common.message.MessageListHolder
addMessage, clearMessages, getMessageList
-
-
-
-
Method Detail
-
getProductId
java.lang.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
void setProductId(java.lang.String productId)
Sets the product for this item.- Parameters:
productId- product name
-
setProductGuid
void setProductGuid(TechKey productGuid)
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
void setParentId(TechKey parentId)
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
java.lang.String getDescription()
Get descriptions on the item level.- Returns:
- description
-
getQuantity
java.math.BigDecimal getQuantity()
Returns the quantity of this item.- Returns:
- quantity
-
getLastQuantity
java.math.BigDecimal getLastQuantity()
Returns the quantity of this item.- Returns:
- quantity
-
getUnit
java.lang.String getUnit()
Returns the UOM (Unit of Measure) of this item.
This unit is not localised, e.g. ST- Returns:
- UOM
-
setDescription
void setDescription(java.lang.String description)
Sets Description.- Parameters:
description- item description
-
setQuantity
void setQuantity(java.math.BigDecimal quantity)
Sets an item quantity.- Parameters:
quantity- value to set
-
setUnit
void setUnit(java.lang.String unit)
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
java.util.Map<java.lang.String,java.lang.Object> getTypedExtensionMap()
Type safe getter for the extension map- Returns:
- extension map attached to this item
-
-