Class AlternativeProductListImpl
- java.lang.Object
-
- de.hybris.platform.sap.sapordermgmtbol.transaction.item.businessobject.impl.AlternativeProductListImpl
-
- All Implemented Interfaces:
SimpleListAccess<AlternativeProduct>,AlternativeProductList,java.lang.Cloneable,java.lang.Iterable<AlternativeProduct>
public class AlternativeProductListImpl extends java.lang.Object implements AlternativeProductList
List of alternative products- Version:
- 1.0
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<AlternativeProduct>alternativProductListList of alternative productsprotected GenericFactorygenericFactoryFactory to access SAP session beans
-
Constructor Summary
Constructors Constructor Description AlternativeProductListImpl()Creates a newAlternativProductListobject.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAlternativProduct(int i, AlternativeProduct altProd)sets the alternative product for the given indexvoidaddAlternativProduct(AlternativeProduct altProd)sets the alternative product for the given indexvoidaddAlternativProduct(java.lang.String systemProductId, TechKey systemProductGUID, java.lang.String description, java.lang.String enteredProductIdType, java.lang.String substitutionReasonId)Creates and adds an alternative Product to the ProductAliasListvoidclear()clear the alternativ product listjava.lang.Objectclone()Performs a deep copy of this object.AlternativeProductcreateAlternativProduct()Creates an emptyAlternativProductData.AlternativeProductcreateAlternativProduct(java.lang.String systemProductId, TechKey systemProductGUID, java.lang.String description, java.lang.String enteredProductIdType, java.lang.String substitutionReasonId)Creates a initialisedAlternativProductDatafor the basket.AlternativeProductImplgetAlternativProduct(int i)gets the alternative product for the given indexjava.util.List<AlternativeProduct>getList()get the alternative product listbooleanisDeterminationProductList()returns true, if the list contains determination productsbooleanisEmpty()returns true if the alternativ product list is emptybooleanisSubstituteProductList()returns true, if the list contains substitute products productjava.util.Iterator<AlternativeProduct>iterator()Returns en iterator over the Entrys of the alternativ product list in form of Map.voidsetGenericFactory(GenericFactory genericFactory)voidsetList(java.util.List<AlternativeProduct> alternativProductListData)set the alternative product listintsize()get the size of the list of alternativ productsjava.lang.StringtoString()Returns a string representation of the object.
-
-
-
Field Detail
-
alternativProductList
protected java.util.List<AlternativeProduct> alternativProductList
List of alternative products
-
genericFactory
protected GenericFactory genericFactory
Factory to access SAP session beans
-
-
Method Detail
-
setGenericFactory
public void setGenericFactory(GenericFactory genericFactory)
- Parameters:
genericFactory- Factory to access SAP session beans
-
createAlternativProduct
public AlternativeProduct createAlternativProduct()
Creates an emptyAlternativProductData.- Specified by:
createAlternativProductin interfaceAlternativeProductList- Returns:
- AlternativProduct which can added to the alternativProductList
-
createAlternativProduct
public AlternativeProduct createAlternativProduct(java.lang.String systemProductId, TechKey systemProductGUID, java.lang.String description, java.lang.String enteredProductIdType, java.lang.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
public java.lang.String toString()
Returns a string representation of the object.- Overrides:
toStringin classjava.lang.Object- Returns:
- object as string
-
getList
public java.util.List<AlternativeProduct> getList()
get the alternative product list- Returns:
- List list of alternative products
-
getAlternativProduct
public AlternativeProductImpl getAlternativProduct(int i)
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
public void addAlternativProduct(int i, AlternativeProduct altProd)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
public void addAlternativProduct(AlternativeProduct altProd)
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(java.lang.String systemProductId, TechKey systemProductGUID, java.lang.String description, java.lang.String enteredProductIdType, java.lang.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
public void setList(java.util.List<AlternativeProduct> alternativProductListData)
set the alternative product list- Specified by:
setListin interfaceAlternativeProductList- Parameters:
alternativProductListData- new list of alternative products
-
clone
public java.lang.Object clone()
Performs a deep copy of this object. Hence the List of alternative products will be duplicated.- Specified by:
clonein interfaceAlternativeProductList- Overrides:
clonein classjava.lang.Object- Returns:
- deep copy of this object
-
iterator
public java.util.Iterator<AlternativeProduct> iterator()
Returns en iterator over the Entrys of the alternativ product list in form of Map.- Specified by:
iteratorin interfacejava.lang.Iterable<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
-
-