Class CurrentArticlePriceServiceImpl
java.lang.Object
ch.tocco.nice2.optional.order.impl.CurrentArticlePriceServiceImpl
- All Implemented Interfaces:
CurrentArticlePriceService
@Component
public class CurrentArticlePriceServiceImpl
extends Object
implements CurrentArticlePriceService
-
Constructor Summary
ConstructorDescriptionCurrentArticlePriceServiceImpl
(DateDelimitedEntityService dateDelimitedEntityService, DefaultDisplayService defaultDisplayService, TextResources textResources) -
Method Summary
Modifier and TypeMethodDescriptiongetCurrentArticlePrice
(Entity article, Entity priceCategory, Entity currency, org.joda.time.LocalDate date) getCurrentArticlePriceEntity
(Entity article, Entity priceCategory, Entity currency, org.joda.time.LocalDate date) returns a optional of a valid price for a articlegetCurrentArticlePriceForOrder
(Entity order, Entity article) returns the current valid price for the indicated article and the given order
-
Constructor Details
-
CurrentArticlePriceServiceImpl
public CurrentArticlePriceServiceImpl(DateDelimitedEntityService dateDelimitedEntityService, DefaultDisplayService defaultDisplayService, TextResources textResources)
-
-
Method Details
-
getCurrentArticlePriceForOrder
Description copied from interface:CurrentArticlePriceService
returns the current valid price for the indicated article and the given order- Specified by:
getCurrentArticlePriceForOrder
in interfaceCurrentArticlePriceService
-
getCurrentArticlePrice
public BigDecimal getCurrentArticlePrice(Entity article, Entity priceCategory, Entity currency, org.joda.time.LocalDate date) - Specified by:
getCurrentArticlePrice
in interfaceCurrentArticlePriceService
-
getCurrentArticlePriceEntity
public Optional<Entity> getCurrentArticlePriceEntity(Entity article, Entity priceCategory, Entity currency, org.joda.time.LocalDate date) Description copied from interface:CurrentArticlePriceService
returns a optional of a valid price for a article- Specified by:
getCurrentArticlePriceEntity
in interfaceCurrentArticlePriceService
- Parameters:
article
- the article to get the price frompriceCategory
- the price category the price needs to havecurrency
- the currency the price needs to havedate
- the date on which the price should be valid- Returns:
- an optional containing a Article_price, if one exists for the given values
-