Class GroupOrderEntryPopulator<S extends AbstractOrderModel,T extends AbstractOrderData>
java.lang.Object
de.hybris.platform.commercefacades.order.converters.populator.GroupOrderEntryPopulator<S,T>
- All Implemented Interfaces:
Populator<S,T>
- Direct Known Subclasses:
AcceleratorGroupOrderEntryPopulator,GroupOrderConsignmentEntryPopulator
public class GroupOrderEntryPopulator<S extends AbstractOrderModel,T extends AbstractOrderData>
extends Object
implements Populator<S,T>
Groups multiple
OrderEntryData as one entry in a AbstractOrderData based on the multidimensional
variants that share the same base product. All non multidimensional product entries will be leaved unmodified as a
single entry.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected PriceDatabuildPrice(PriceData base, BigDecimal amount) protected voidprotected ProductDatacreateBaseProduct(ProductData variant) protected OrderEntryDatacreateGroupedOrderEntry(OrderEntryData firstEntry) protected EntryGroupDatacreateRootGroup(OrderEntryData groupedOrderEntry, AbstractOrderData order) protected CommerceEntryGroupUtilsprotected PriceDatagetMaxPrice(OrderEntryData parentEntry, PriceData samplePrice) protected PriceDatagetMinPrice(OrderEntryData parentEntry, PriceData samplePrice) protected PriceDataFactoryprotected ProductServiceprotected PriceDatagetTotalPrice(OrderEntryData parentEntry, PriceData samplePrice) protected LonggetTotalQuantity(OrderEntryData parentEntry) protected List<OrderEntryData>groupEntries(List<OrderEntryData> entries, AbstractOrderData order) protected booleanisGroupable(ProductData product) protected booleanisNotEmptyPrice(PriceData price) voidpopulate(AbstractOrderModel source, AbstractOrderData target) Populate the target instance with values from the source instance.protected voidsetEntryGroups(OrderEntryData entry, OrderEntryData groupedOrderEntry, AbstractOrderData order) voidsetEntryGroupUtils(CommerceEntryGroupUtils entryGroupUtils) voidsetPriceDataFactory(PriceDataFactory priceDataFactory) voidsetProductService(ProductService productService) protected voidunwrapEntry(OrderEntryData entry, AbstractOrderData order)
-
Field Details
-
VARIANT_TYPE
- See Also:
-
INVALID_ENTRY_NUMBER
-
ZERO_QUANTITY
-
-
Constructor Details
-
GroupOrderEntryPopulator
public GroupOrderEntryPopulator()
-
-
Method Details
-
populate
public void populate(AbstractOrderModel source, AbstractOrderData target) throws ConversionException Description copied from interface:PopulatorPopulate the target instance with values from the source instance.- Specified by:
populatein interfacePopulator<S extends AbstractOrderModel,T extends AbstractOrderData> - Parameters:
source- the source objecttarget- the target to fill- Throws:
ConversionException- if an error occurs
-
groupEntries
-
isGroupable
-
consolidateGroupedOrderEntry
-
getMaxPrice
-
getMinPrice
-
isNotEmptyPrice
-
getTotalPrice
-
getTotalQuantity
-
createGroupedOrderEntry
-
createBaseProduct
-
setEntryGroups
protected void setEntryGroups(OrderEntryData entry, OrderEntryData groupedOrderEntry, AbstractOrderData order) -
createRootGroup
-
unwrapEntry
-
buildPrice
-
getProductService
-
setProductService
-
getPriceDataFactory
-
setPriceDataFactory
-
getEntryGroupUtils
-
setEntryGroupUtils
-