Class AlternativeProductListImpl

    • Field Detail

      • alternativProductList

        protected java.util.List<AlternativeProduct> alternativProductList
        List of alternative products
      • genericFactory

        protected GenericFactory genericFactory
        Factory to access SAP session beans
    • Constructor Detail

      • AlternativeProductListImpl

        public AlternativeProductListImpl()
        Creates a new AlternativProductList object.
    • Method Detail

      • setGenericFactory

        public void setGenericFactory​(GenericFactory genericFactory)
        Parameters:
        genericFactory - Factory to access SAP session beans
      • createAlternativProduct

        public AlternativeProduct createAlternativProduct​(java.lang.String systemProductId,
                                                          TechKey systemProductGUID,
                                                          java.lang.String description,
                                                          java.lang.String enteredProductIdType,
                                                          java.lang.String substitutionReasonId)
        Creates a initialised AlternativProductData for the basket.
        Specified by:
        createAlternativProduct in interface AlternativeProductList
        Parameters:
        systemProductId - id of the system product
        systemProductGUID - techkey of the system product
        description - description of the system product
        enteredProductIdType - if the system product was found through determination, this specifies, as what the entred product id was interpreted
        substitutionReasonId - if the system product is a substitute product, this is the id for the substitution reason
        Returns:
        AlternativProduct which can added to the AlternativProductList
      • toString

        public java.lang.String toString()
        Returns a string representation of the object.
        Overrides:
        toString in class java.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 interface AlternativeProductList
        Parameters:
        i - index to set the product
        altProd - 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 interface AlternativeProductList
        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 interface AlternativeProductList
        Parameters:
        systemProductId - id of the system product
        systemProductGUID - techkey of the system product
        description - description of the system product
        enteredProductIdType - if the system product was found through determination, this specifies, as what the entered product id was interpreted
        substitutionReasonId - 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 interface AlternativeProductList
        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 interface AlternativeProductList
        Overrides:
        clone in class java.lang.Object
        Returns:
        deep copy of this object
      • 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