Package de.hybris.platform.order.impl
Class DefaultAbstractOrderEntryService<T extends AbstractOrderEntryModel>
java.lang.Object
de.hybris.platform.servicelayer.internal.service.AbstractService
de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
de.hybris.platform.order.impl.DefaultAbstractOrderEntryService<T>
- All Implemented Interfaces:
AbstractOrderEntryService<T>,Serializable,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.InitializingBean
- Direct Known Subclasses:
DefaultCartEntryService,DefaultOrderEntryService
public class DefaultAbstractOrderEntryService<T extends AbstractOrderEntryModel>
extends AbstractBusinessService
implements AbstractOrderEntryService<T>
Default implementation of
AbstractOrderEntryService. Provides implementation on
AbstractOrderEntryModel type level.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
AbstractService.SerializableDTO -
Field Summary
FieldsFields inherited from class de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
modelService, sessionService, txManagerFields inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
tenant -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAllDiscountValues(T entry, List<DiscountValue> discountValues) Adds a collection of discount values into given entry.voidaddAllTaxValues(T entry, List<TaxValue> taxValues) Adds a collection of tax values into given entry.voidaddDiscountValue(T entry, DiscountValue discountValue) Adds a new discount value to the given entry.voidaddTaxValue(T entry, TaxValue taxValue) Adds a new tax value into given entry.createEntry(AbstractOrderModel order) Creates a new instance of order entry for a given abstract order instance.createEntry(ComposedTypeModel entryType, AbstractOrderModel order) Creates a new instance of abstract order entry of the specific composed type for a given order instance.getGlobalDiscountValue(T entry, DiscountValue discountValue) Searches for complete discount value (with calculated applied value) object created using given discountValue.voidremoveDiscountValue(T entry, DiscountValue discountValue) Removes given discount value from the given entry.voidremoveTaxValue(T entry, TaxValue taxValue) Removes given tax value from the given entry.voidsetAbstractOrderEntryTypeService(AbstractOrderEntryTypeService abstractOrderEntryTypeService) Methods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
getModelService, getSessionService, getTxManager, setModelService, setSessionService, setTxManagerMethods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
afterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, writeReplace
-
Field Details
-
abstractOrderEntryTypeService
-
-
Constructor Details
-
DefaultAbstractOrderEntryService
public DefaultAbstractOrderEntryService()
-
-
Method Details
-
createEntry
Description copied from interface:AbstractOrderEntryServiceCreates a new instance of order entry for a given abstract order instance. The entry type is chosen to best suit the order instance. New entry remains not persisted.- Specified by:
createEntryin interfaceAbstractOrderEntryService<T extends AbstractOrderEntryModel>- Parameters:
order- target order- Returns:
- new order entry of the suitable runtime type.
- See Also:
-
createEntry
Description copied from interface:AbstractOrderEntryServiceCreates a new instance of abstract order entry of the specific composed type for a given order instance. New entry remains not persisted.- Specified by:
createEntryin interfaceAbstractOrderEntryService<T extends AbstractOrderEntryModel>- Parameters:
entryType- create entry of this specific typeorder- target order- Returns:
- new abstract order entry of the specific runtime type.
-
addDiscountValue
Description copied from interface:AbstractOrderEntryServiceAdds a new discount value to the given entry. Entry remains not persisted. By default, after save operation, the entry will be not calculated. User needs to recalculate order in order to notice the added discount in the total price.- Specified by:
addDiscountValuein interfaceAbstractOrderEntryService<T extends AbstractOrderEntryModel>- Parameters:
entry- targetAbstractOrderEntryModeldiscountValue- discount value to add- See Also:
-
addTaxValue
Description copied from interface:AbstractOrderEntryServiceAdds a new tax value into given entry. Entry remains not persisted. By default, after save operation, the entry will be not calculated. User needs to recalculate entry in order to notice the added tax value in the orders total tax. After recalculation of the order, the newTaxValueshould be present in orders tax valuesAbstractOrderModel.TOTALTAXVALUES.- Specified by:
addTaxValuein interfaceAbstractOrderEntryService<T extends AbstractOrderEntryModel>- Parameters:
entry- targetAbstractOrderEntryModeltaxValue- tax value to add- See Also:
-
addAllDiscountValues
Description copied from interface:AbstractOrderEntryServiceAdds a collection of discount values into given entry. Entry remains not persisted and not calculated. User needs to recalculate order in order to notice the added discounts in the total price.- Specified by:
addAllDiscountValuesin interfaceAbstractOrderEntryService<T extends AbstractOrderEntryModel>- Parameters:
entry- targetAbstractOrderEntryModeldiscountValues- discount values to add- See Also:
-
addAllTaxValues
Description copied from interface:AbstractOrderEntryServiceAdds a collection of tax values into given entry. Entry remains not persisted and not calculated. User needs to recalculate entry in order to notice the added tax values in the orders total tax. After recalculation of the order, the newTaxValues should be present in orders tax valuesAbstractOrderModel.TOTALTAXVALUES.- Specified by:
addAllTaxValuesin interfaceAbstractOrderEntryService<T extends AbstractOrderEntryModel>- Parameters:
entry- targetAbstractOrderEntryModeltaxValues- tax values to add- See Also:
-
removeDiscountValue
Description copied from interface:AbstractOrderEntryServiceRemoves given discount value from the given entry. Entry remains not persisted and not calculated. User needs to recalculate order in order to notice the removed discount in the total price.- Specified by:
removeDiscountValuein interfaceAbstractOrderEntryService<T extends AbstractOrderEntryModel>- Parameters:
entry- targetAbstractOrderEntryModeldiscountValue- discount value to remove- See Also:
-
removeTaxValue
Description copied from interface:AbstractOrderEntryServiceRemoves given tax value from the given entry. Entry remains not persisted and not calculated. User needs to recalculate entry in order to see the difference in order's total tax. After recalculation of the order, the removedTaxValueshould be removed from orders tax valuesAbstractOrderModel.TOTALTAXVALUES.- Specified by:
removeTaxValuein interfaceAbstractOrderEntryService<T extends AbstractOrderEntryModel>- Parameters:
entry- targetAbstractOrderEntryModeltaxValue- tax value to remove- See Also:
-
setAbstractOrderEntryTypeService
public void setAbstractOrderEntryTypeService(AbstractOrderEntryTypeService abstractOrderEntryTypeService) -
getGlobalDiscountValue
Description copied from interface:AbstractOrderEntryServiceSearches for complete discount value (with calculated applied value) object created using given discountValue. Returns null when discount value for given parameter can not be found.- Specified by:
getGlobalDiscountValuein interfaceAbstractOrderEntryService<T extends AbstractOrderEntryModel>
-