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>
alternativProductList
List of alternative productsprotected GenericFactory
genericFactory
Factory to access SAP session beans
-
Constructor Summary
Constructors Constructor Description AlternativeProductListImpl()
Creates a newAlternativProductList
object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAlternativProduct(int i, AlternativeProduct altProd)
sets the alternative product for the given indexvoid
addAlternativProduct(AlternativeProduct altProd)
sets the alternative product for the given indexvoid
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 ProductAliasListvoid
clear()
clear the alternativ product listjava.lang.Object
clone()
Performs a deep copy of this object.AlternativeProduct
createAlternativProduct()
Creates an emptyAlternativProductData
.AlternativeProduct
createAlternativProduct(java.lang.String systemProductId, TechKey systemProductGUID, java.lang.String description, java.lang.String enteredProductIdType, java.lang.String substitutionReasonId)
Creates a initialisedAlternativProductData
for the basket.AlternativeProductImpl
getAlternativProduct(int i)
gets the alternative product for the given indexjava.util.List<AlternativeProduct>
getList()
get the alternative product listboolean
isDeterminationProductList()
returns true, if the list contains determination productsboolean
isEmpty()
returns true if the alternativ product list is emptyboolean
isSubstituteProductList()
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.void
setGenericFactory(GenericFactory genericFactory)
void
setList(java.util.List<AlternativeProduct> alternativProductListData)
set the alternative product listint
size()
get the size of the list of alternativ productsjava.lang.String
toString()
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:
createAlternativProduct
in 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 initialisedAlternativProductData
for the basket.- Specified by:
createAlternativProduct
in 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:
clear
in interfaceAlternativeProductList
-
size
public int size()
get the size of the list of alternativ products- Specified by:
size
in interfaceAlternativeProductList
- Specified by:
size
in interfaceSimpleListAccess<AlternativeProduct>
- Returns:
- size of the list
-
isEmpty
public boolean isEmpty()
returns true if the alternativ product list is empty- Specified by:
isEmpty
in interfaceAlternativeProductList
- Specified by:
isEmpty
in interfaceSimpleListAccess<AlternativeProduct>
- Returns:
- boolean
-
toString
public java.lang.String toString()
Returns a string representation of the object.- Overrides:
toString
in 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:
addAlternativProduct
in 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:
addAlternativProduct
in 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:
addAlternativProduct
in 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:
setList
in 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:
clone
in interfaceAlternativeProductList
- Overrides:
clone
in 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:
iterator
in interfacejava.lang.Iterable<AlternativeProduct>
- Specified by:
iterator
in 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
-
-