Class DefaultProductService

    • Constructor Detail

      • DefaultProductService

        public DefaultProductService()
    • Method Detail

      • getProductForCode

        public ProductModel getProductForCode​(java.lang.String code)
        Description copied from interface: ProductService
        Returns the Product with the specified code. As default the search uses the current session user, the current session language and the current active catalog versions (which are stored at the session in the attribute SESSION_CATALOG_VERSIONS). For modifying the search session context see FlexibleSearchQuery.
        Specified by:
        getProductForCode in interface ProductService
        Parameters:
        code - the code of the Product
        Returns:
        the Product with the specified code.
      • getProduct

        @Deprecated
        public ProductModel getProduct​(java.lang.String code)
        Deprecated.
        since ages
        Specified by:
        getProduct in interface ProductService
        Parameters:
        code - the code of the Product
        Returns:
        the Product with the specified code.
      • getAllProductsCountForCategory

        public java.lang.Integer getAllProductsCountForCategory​(CategoryModel category)
        Description copied from interface: ProductService
        Counts all products of the specific CategoryModel excluding double linked products. This includes all its own products and products belonging to any sub category.
        Specified by:
        getAllProductsCountForCategory in interface ProductService
        Parameters:
        category - the CategoryModel
        Returns:
        amount of all products of the category
      • getUnit

        @Deprecated
        public UnitModel getUnit​(java.lang.String code)
        Deprecated.
        since ages
        Specified by:
        getUnit in interface ProductService
        Parameters:
        code - the code of the Unit
        Returns:
        the Unit with the specified code
      • getProduct

        @Deprecated
        public ProductModel getProduct​(CatalogVersionModel catalogVersion,
                                       java.lang.String code)
        Deprecated.
        since ages
        Specified by:
        getProduct in interface ProductService
        Parameters:
        catalogVersion - the CatalogVersion of the Product
        code - the code of the Product
        Returns:
        the Product matching the specified code and CatalogVersion.
      • getProductForCode

        public ProductModel getProductForCode​(CatalogVersionModel catalogVersion,
                                              java.lang.String code)
        Description copied from interface: ProductService
        Returns the Product with the specified code belonging to the specified CatalogVersion.
        Specified by:
        getProductForCode in interface ProductService
        Parameters:
        catalogVersion - the CatalogVersion of the Product
        code - the code of the Product
        Returns:
        the Product matching the specified code and CatalogVersion.
      • getProducts

        @Deprecated
        public java.util.List<ProductModel> getProducts​(CategoryModel category)
        Deprecated.
        since ages
        Specified by:
        getProducts in interface ProductService
        Parameters:
        category - the category the returned Products belong to
        Returns:
        a list of Products which belong to the specified Category
      • getProductsForCategory

        public java.util.List<ProductModel> getProductsForCategory​(CategoryModel category)
        Description copied from interface: ProductService
        Returns all Products belonging to the specified Category as a List. For the search the current session active catalog versions of the current user are used.
        Specified by:
        getProductsForCategory in interface ProductService
        Parameters:
        category - the category the returned Products belong to
        Returns:
        a list of Products which belong to the specified Category
      • getProducts

        @Deprecated
        public SearchResult<ProductModel> getProducts​(CategoryModel category,
                                                      int start,
                                                      int count)
        Deprecated.
        since ages
        Specified by:
        getProducts in interface ProductService
        Parameters:
        category - the category the returned Products belong to
        start - index position of the first Product, which will be included in the returned List
        count - number of Products which will be returned in the List
        Returns:
        a list of Products with belong to the specified Category
      • getProductsForCategory

        public java.util.List<ProductModel> getProductsForCategory​(CategoryModel category,
                                                                   int start,
                                                                   int count)
        Description copied from interface: ProductService
        Returns the specified range of Products belonging to the specified Category as a List. For the search the current session active catalogversions of the current user are used.
        Specified by:
        getProductsForCategory in interface ProductService
        Parameters:
        category - the category the returned Products belong to
        start - index position of the first Product, which will be included in the returned List
        count - number of Products which will be returned in the List
        Returns:
        a list of Products with belong to the specified Category
      • getOnlineProductsForCategory

        public java.util.List<ProductModel> getOnlineProductsForCategory​(CategoryModel category)
        Description copied from interface: ProductService
        Returns all online products that belong to the specified category.
        Specified by:
        getOnlineProductsForCategory in interface ProductService
        Parameters:
        category - the category the returned products belong to
        Returns:
        all found products that belong to the specified category, or empty collection if no product can be found.
      • getOfflineProductsForCategory

        public java.util.List<ProductModel> getOfflineProductsForCategory​(CategoryModel category)
        Description copied from interface: ProductService
        Returns all offline products that belong to the specified category.
        Specified by:
        getOfflineProductsForCategory in interface ProductService
        Parameters:
        category - the category the returned products belong to
        Returns:
        all found products that belong to the specified category, or empty collection if no product can be found.
      • setProductDao

        public void setProductDao​(ProductDao productDao)
      • getProductDao

        protected ProductDao getProductDao()
        Returns:
        the productDao
      • setUnitDao

        @Deprecated
        public void setUnitDao​(UnitDao unitDao)
        Deprecated.
        since ages
      • setPriceService

        @Deprecated
        public void setPriceService​(PriceService priceService)
        Deprecated.
        since ages