Class SimpleItemImpl
- java.lang.Object
-
- de.hybris.platform.sap.core.bol.businessobject.BusinessObjectBase
-
- de.hybris.platform.sap.sapordermgmtbol.transaction.item.businessobject.impl.SimpleItemImpl
-
- All Implemented Interfaces:
BackendAware,BusinessObject,MessageListHolder,SimpleItem,java.io.Serializable,java.lang.Cloneable,java.lang.Comparable<SimpleItem>
- Direct Known Subclasses:
ItemBaseImpl
public class SimpleItemImpl extends BusinessObjectBase implements SimpleItem
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class de.hybris.platform.sap.core.bol.businessobject.BusinessObjectBase
backendObject, backendType, bobMessages, bobState, extensionData, genericFactory, handle, moduleConfigurationAccess, techKey
-
Fields inherited from interface de.hybris.platform.sap.core.common.message.MessageListHolder
INVALID, VALID
-
-
Constructor Summary
Constructors Constructor Description SimpleItemImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()Makes a copy of the object.intcompareTo(SimpleItem item)java.lang.StringgetDescription()Get descriptions on the item level.java.math.BigDecimalgetLastQuantity()Returns the quantity of this item.intgetNumberInt()Get the internal number for the item.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()Get the technical key for the productId of this item.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 number)Set the internal number for 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.java.lang.StringtoString()-
Methods inherited from class de.hybris.platform.sap.core.bol.businessobject.BusinessObjectBase
addExtensionData, addMessage, clearMessages, clearMessages, clearOwnMessages, copyMessages, copyMessages, createUniqueHandle, destroy, determineBackendObject, equals, getBackendBusinessObject, getBackendBusinessObject, getBackendType, getExtensionData, getExtensionDataValues, getExtensionMap, getHandle, getMessageList, getModuleConfigurationAccess, getOwnMessageList, getSubObjectIterator, getTechKey, hasHandle, hashCode, hasMessages, hasOwnMessages, init, isValid, logMessage, removeExtensionData, removeExtensionDataValues, setBackendObject, setBackendType, setExtensionMap, setGenericFactory, setHandle, setInvalid, setModuleConfigurationAccess, setTechKey, setValid
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
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
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionDescription copied from class:BusinessObjectBaseMakes a copy of the object. The MessageList is copied.- Overrides:
clonein classBusinessObjectBase- Returns:
- a copy of object
- Throws:
java.lang.CloneNotSupportedException-CloneNotSupportedException
-
getProductId
public java.lang.String getProductId()
Description copied from interface:SimpleItemReturns the product (name) of this item.- Specified by:
getProductIdin interfaceSimpleItem- Returns:
- product name
-
getProductGuid
public TechKey getProductGuid()
Get the technical key for the productId of this item.- Specified by:
getProductGuidin interfaceSimpleItem- Returns:
- technical key for the productId
-
setProductId
public void setProductId(java.lang.String productId)
Description copied from interface:SimpleItemSets the product for this item.- Specified by:
setProductIdin interfaceSimpleItem- Parameters:
productId- product name
-
setProductGuid
public void setProductGuid(TechKey productGuid)
Description copied from interface:SimpleItemSets the product guid for this item.- Specified by:
setProductGuidin interfaceSimpleItem- Parameters:
productGuid- TechKey/guid of the product
-
isProductChanged
public boolean isProductChanged()
Description copied from interface:SimpleItemIf 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- Specified by:
isProductChangedin interfaceSimpleItem- Returns:
- true if product was changed
-
setProductChanged
public void setProductChanged(boolean productChanged)
Description copied from interface:SimpleItemIf 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- Specified by:
setProductChangedin interfaceSimpleItem- Parameters:
productChanged- iftrue, we conside the item to be changted
-
getParentId
public TechKey getParentId()
Description copied from interface:SimpleItemReturns 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.- Specified by:
getParentIdin interfaceSimpleItem- Returns:
- TechKey of the parent item
-
setParentId
public void setParentId(TechKey parentId)
Description copied from interface:SimpleItemSets parent Id for an item. For example for the sub item, free good item.- Specified by:
setParentIdin interfaceSimpleItem- Parameters:
parentId- TechKey or null/TechKey.EMPTY_KEY
-
getDescription
public java.lang.String getDescription()
Description copied from interface:SimpleItemGet descriptions on the item level.- Specified by:
getDescriptionin interfaceSimpleItem- Returns:
- description
-
getQuantity
public java.math.BigDecimal getQuantity()
Description copied from interface:SimpleItemReturns the quantity of this item.- Specified by:
getQuantityin interfaceSimpleItem- Returns:
- quantity
-
getLastQuantity
public java.math.BigDecimal getLastQuantity()
Description copied from interface:SimpleItemReturns the quantity of this item.- Specified by:
getLastQuantityin interfaceSimpleItem- Returns:
- quantity
-
getUnit
public java.lang.String getUnit()
Description copied from interface:SimpleItemReturns the UOM (Unit of Measure) of this item.
This unit is not localised, e.g. ST- Specified by:
getUnitin interfaceSimpleItem- Returns:
- UOM
-
setDescription
public void setDescription(java.lang.String description)
Description copied from interface:SimpleItemSets Description.- Specified by:
setDescriptionin interfaceSimpleItem- Parameters:
description- item description
-
setQuantity
public void setQuantity(java.math.BigDecimal quantity)
Description copied from interface:SimpleItemSets an item quantity.- Specified by:
setQuantityin interfaceSimpleItem- Parameters:
quantity- value to set
-
setUnit
public void setUnit(java.lang.String unit)
Description copied from interface:SimpleItemSet the unit (UOM) for this item.
The value is not localised, e.g. ST- Specified by:
setUnitin interfaceSimpleItem- Parameters:
unit- UOM
-
setNumberInt
public void setNumberInt(int number)
Set the internal number for the item. The internal number is the item number (Positionsnummer) displayed on the front end and generated by the backend system. In the default case the numbers are starting with 10 and increased by 10, e.g. 10, 20, 30, 40....- Specified by:
setNumberIntin interfaceSimpleItem- Parameters:
number- position
-
getNumberInt
public int getNumberInt()
Get the internal number for the item. The internal number is the item number (Positionsnummer) displayed on the front end and generated by the backend system. In the default case the numbers are starting with 10 and increased by 10, e.g. 10, 20, 30, 40....- Specified by:
getNumberIntin interfaceSimpleItem- Returns:
- numberInt/position
-
getTypedExtensionMap
public java.util.Map<java.lang.String,java.lang.Object> getTypedExtensionMap()
Description copied from interface:SimpleItemType safe getter for the extension map- Specified by:
getTypedExtensionMapin interfaceSimpleItem- Returns:
- extension map attached to this item
-
compareTo
public int compareTo(SimpleItem item)
- Specified by:
compareToin interfacejava.lang.Comparable<SimpleItem>
-
toString
public java.lang.String toString()
- Overrides:
toStringin classBusinessObjectBase
-
-