public class DefaultDiscountService extends AbstractBusinessService implements DiscountService
DiscountService.AbstractService.SerializableDTOmodelService, sessionService, txManagertenant| Constructor and Description |
|---|
DefaultDiscountService() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet()
Invoked by a BeanFactory after it has set all bean properties supplied.
|
DiscountModel |
getDiscountForCode(java.lang.String code)
Gets the
DiscountModel with the specified code. |
java.util.List<DiscountInformation> |
getDiscountInformation(BaseCriteria baseCriteria)
Get discounts
DiscountInformations for given criteria. |
java.util.Collection<DiscountModel> |
getDiscountsForCode(java.lang.String matchedCode)
Gets all
DiscountModels which match the specified code. |
java.util.Collection<DiscountModel> |
getDiscountsForCurrency(CurrencyModel currency)
Gets all
DiscountModels which match the specified currency. |
void |
setApplicationContext(ApplicationContext ctx) |
void |
setDiscountDao(DiscountDao discountDao) |
void |
setFindDiscountValuesStrategy(FindDiscountValuesStrategy findDiscountValuesStrategy) |
getModelService, getSessionService, getTxManager, setModelService, setSessionService, setTxManagergetCurrentTenant, setBeanName, setCurrentTenant, writeReplacepublic DiscountModel getDiscountForCode(java.lang.String code)
DiscountServiceDiscountModel with the specified code.getDiscountForCode in interface DiscountServicecode - the discount codeDiscountModel with the specified codepublic java.util.Collection<DiscountModel> getDiscountsForCode(java.lang.String matchedCode)
DiscountServiceDiscountModels which match the specified code.getDiscountsForCode in interface DiscountServicematchedCode - an SQL-Like statement as String, such as %discountCode%Collection of all DiscountModels which match the specified codepublic java.util.Collection<DiscountModel> getDiscountsForCurrency(CurrencyModel currency)
DiscountServiceDiscountModels which match the specified currency.getDiscountsForCurrency in interface DiscountServicecurrency - target CurrencyModelCollection of all DiscountModels which matching currency. If no matching discounts
were found, an empty collection is returned.public java.util.List<DiscountInformation> getDiscountInformation(BaseCriteria baseCriteria) throws CalculationException
DiscountServiceDiscountInformations for given criteria.getDiscountInformation in interface DiscountServicebaseCriteria - BaseCriteriaList of all DiscountInformations which matching baseCriteria. If no matching
discounts were found, an empty collection is returned.CalculationException - if error occurredpublic void setDiscountDao(DiscountDao discountDao)
public void setFindDiscountValuesStrategy(FindDiscountValuesStrategy findDiscountValuesStrategy)
public void setApplicationContext(ApplicationContext ctx)
public void afterPropertiesSet()
throws java.lang.Exception
AbstractServicesuper.afterPropertiesSet() before or the java serialization won't work.afterPropertiesSet in class AbstractServicejava.lang.ExceptionInitializingBean#afterPropertiesSet()Copyright © 2018 SAP SE. All Rights Reserved.