Class AlternativeProductListImpl
java.lang.Object
de.hybris.platform.sap.sapordermgmtbol.transaction.item.businessobject.impl.AlternativeProductListImpl
- All Implemented Interfaces:
SimpleListAccess<AlternativeProduct>,AlternativeProductList,Cloneable,Iterable<AlternativeProduct>
List of alternative products
- Version:
- 1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<AlternativeProduct>List of alternative productsprotected GenericFactoryFactory to access SAP session beans -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAlternativProduct(int i, AlternativeProduct altProd) sets the alternative product for the given indexvoidaddAlternativProduct(AlternativeProduct altProd) sets the alternative product for the given indexvoidaddAlternativProduct(String systemProductId, TechKey systemProductGUID, String description, String enteredProductIdType, String substitutionReasonId) Creates and adds an alternative Product to the ProductAliasListvoidclear()clear the alternativ product listclone()Performs a deep copy of this object.Creates an emptyAlternativProductData.createAlternativProduct(String systemProductId, TechKey systemProductGUID, String description, String enteredProductIdType, String substitutionReasonId) Creates a initialisedAlternativProductDatafor the basket.getAlternativProduct(int i) gets the alternative product for the given indexgetList()get the alternative product listbooleanreturns true, if the list contains determination productsbooleanisEmpty()returns true if the alternativ product list is emptybooleanreturns true, if the list contains substitute products productiterator()Returns en iterator over the Entrys of the alternativ product list in form of Map.voidsetGenericFactory(GenericFactory genericFactory) voidsetList(List<AlternativeProduct> alternativProductListData) set the alternative product listintsize()get the size of the list of alternativ productstoString()Returns a string representation of the object.Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
alternativProductList
List of alternative products -
genericFactory
Factory to access SAP session beans
-
-
Constructor Details
-
AlternativeProductListImpl
public AlternativeProductListImpl()Creates a newAlternativProductListobject.
-
-
Method Details
-
setGenericFactory
- Parameters:
genericFactory- Factory to access SAP session beans
-
createAlternativProduct
Creates an emptyAlternativProductData.- Specified by:
createAlternativProductin interfaceAlternativeProductList- Returns:
- AlternativProduct which can added to the alternativProductList
-
createAlternativProduct
public AlternativeProduct createAlternativProduct(String systemProductId, TechKey systemProductGUID, String description, String enteredProductIdType, String substitutionReasonId) Creates a initialisedAlternativProductDatafor the basket.- Specified by:
createAlternativProductin interfaceAlternativeProductList- Parameters:
systemProductId- id of the system productsystemProductGUID- techkey of the system productdescription- description of the system productenteredProductIdType- if the system product was found through determination, this specifies, as what the entred product id was interpretedsubstitutionReasonId- if the system product is a substitute product, this is the id for the substitution reason- Returns:
- AlternativProduct which can added to the AlternativProductList
-
clear
public void clear()clear the alternativ product list- Specified by:
clearin interfaceAlternativeProductList
-
size
public int size()get the size of the list of alternativ products- Specified by:
sizein interfaceAlternativeProductList- Specified by:
sizein interfaceSimpleListAccess<AlternativeProduct>- Returns:
- size of the list
-
isEmpty
public boolean isEmpty()returns true if the alternativ product list is empty- Specified by:
isEmptyin interfaceAlternativeProductList- Specified by:
isEmptyin interfaceSimpleListAccess<AlternativeProduct>- Returns:
- boolean
-
toString
Returns a string representation of the object. -
getList
get the alternative product list- Returns:
- List list of alternative products
-
getAlternativProduct
gets the alternative product for the given index- Parameters:
i- index of the product- Returns:
- AlternativProduct the alternative product for the given index, or null if index is out of bounds
-
addAlternativProduct
sets the alternative product for the given index- Specified by:
addAlternativProductin interfaceAlternativeProductList- Parameters:
i- index to set the productaltProd- the alternative product for the given index, or null if index is out of bounds
-
addAlternativProduct
sets the alternative product for the given index- Specified by:
addAlternativProductin interfaceAlternativeProductList- Parameters:
altProd- the alternative product for the given index, or null if index is out of bounds
-
addAlternativProduct
public void addAlternativProduct(String systemProductId, TechKey systemProductGUID, String description, String enteredProductIdType, String substitutionReasonId) Creates and adds an alternative Product to the ProductAliasList- Specified by:
addAlternativProductin interfaceAlternativeProductList- Parameters:
systemProductId- id of the system productsystemProductGUID- techkey of the system productdescription- description of the system productenteredProductIdType- if the system product was found through determination, this specifies, as what the entered product id was interpretedsubstitutionReasonId- if the system product is a substitute product, this is the id for the substitution reason
-
setList
set the alternative product list- Specified by:
setListin interfaceAlternativeProductList- Parameters:
alternativProductListData- new list of alternative products
-
clone
Performs a deep copy of this object. Hence the List of alternative products will be duplicated.- Specified by:
clonein interfaceAlternativeProductList- Overrides:
clonein classObject- Returns:
- deep copy of this object
-
iterator
Returns en iterator over the Entrys of the alternativ product list in form of Map.- Specified by:
iteratorin interfaceIterable<AlternativeProduct>- Specified by:
iteratorin interfaceSimpleListAccess<AlternativeProduct>- Returns:
- iterator over alternativ products
-
isSubstituteProductList
public boolean isSubstituteProductList()returns true, if the list contains substitute products product- Returns:
- boolean true if the list contains substitute products
-
isDeterminationProductList
public boolean isDeterminationProductList()returns true, if the list contains determination products- Returns:
- boolean true if the list contains determination products
-