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
ConstructorsConstructorDescriptionCurrentArticlePriceServiceImpl(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:CurrentArticlePriceServicereturns the current valid price for the indicated article and the given order- Specified by:
getCurrentArticlePriceForOrderin interfaceCurrentArticlePriceService
-
getCurrentArticlePrice
public BigDecimal getCurrentArticlePrice(Entity article, Entity priceCategory, Entity currency, org.joda.time.LocalDate date) - Specified by:
getCurrentArticlePricein interfaceCurrentArticlePriceService
-
getCurrentArticlePriceEntity
public Optional<Entity> getCurrentArticlePriceEntity(Entity article, Entity priceCategory, Entity currency, org.joda.time.LocalDate date) Description copied from interface:CurrentArticlePriceServicereturns a optional of a valid price for a article- Specified by:
getCurrentArticlePriceEntityin 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
-