Interface AlternativeProductList
-
- All Superinterfaces:
java.lang.Cloneable,java.lang.Iterable<AlternativeProduct>,SimpleListAccess<AlternativeProduct>
- All Known Implementing Classes:
AlternativeProductListImpl
public interface AlternativeProductList extends SimpleListAccess<AlternativeProduct>, java.lang.Cloneable
Represents the backend's view of List of AlternativProducts.
In some cases the back end may return a list of alternatives for a entered product, for example if the product was not unique, or if several substitutions are possible.- Version:
- 1.0
-
-
Method Summary
All Methods Instance Methods Abstract 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 emptyAlternativProductDatafor the basket.AlternativeProductcreateAlternativProduct(java.lang.String systemProductId, TechKey systemProductGUID, java.lang.String description, java.lang.String enteredProductIdType, java.lang.String substitutionReasonId)Creates a initialisedAlternativProductDatafor the basket.booleanisEmpty()returns true if the alternative product list is emptyvoidsetList(java.util.List<AlternativeProduct> altProdList)sets the alternative product listintsize()get the size of the list of alternative products-
Methods inherited from interface de.hybris.platform.sap.sapcommonbol.transaction.businessobject.transfer.interf.SimpleListAccess
iterator
-
-
-
-
Method Detail
-
createAlternativProduct
AlternativeProduct createAlternativProduct()
Creates an emptyAlternativProductDatafor the basket.- Returns:
- AlternativProduct which can added to the alternativProductList
-
createAlternativProduct
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.- 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
void clear()
clear the alternativ product list
-
size
int size()
get the size of the list of alternative products- Specified by:
sizein interfaceSimpleListAccess<AlternativeProduct>- Returns:
- size of the list
-
isEmpty
boolean isEmpty()
returns true if the alternative product list is empty- Specified by:
isEmptyin interfaceSimpleListAccess<AlternativeProduct>- Returns:
- boolean
-
addAlternativProduct
void addAlternativProduct(int i, AlternativeProduct altProd)sets the alternative product for the given index- Parameters:
i- index to set the productaltProd- the alternative product for the given index, or null if index is out of bounds
-
addAlternativProduct
void addAlternativProduct(AlternativeProduct altProd)
sets the alternative product for the given index- Parameters:
altProd- the alternative product for the given index, or null if index is out of bounds
-
addAlternativProduct
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- 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
void setList(java.util.List<AlternativeProduct> altProdList)
sets the alternative product list- Parameters:
altProdList- List new list of alternative products
-
clone
java.lang.Object clone()
Performs a deep copy of this object. Hence the List of alternative products will be duplicated.- Returns:
- deep copy of this object
-
-