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 java.lang.Object implements Populator<S,T>
Groups multipleOrderEntryDataas one entry in aAbstractOrderDatabased 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 Modifier and Type Field Description static java.lang.IntegerINVALID_ENTRY_NUMBERstatic java.lang.StringVARIANT_TYPEstatic java.lang.LongZERO_QUANTITY
-
Constructor Summary
Constructors Constructor Description GroupOrderEntryPopulator()
-
Method Summary
-
-
-
Field Detail
-
VARIANT_TYPE
public static final java.lang.String VARIANT_TYPE
- See Also:
- Constant Field Values
-
INVALID_ENTRY_NUMBER
public static final java.lang.Integer INVALID_ENTRY_NUMBER
-
ZERO_QUANTITY
public static final java.lang.Long ZERO_QUANTITY
-
-
Method Detail
-
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
protected java.util.List<OrderEntryData> groupEntries(java.util.List<OrderEntryData> entries, AbstractOrderData order)
-
isGroupable
protected boolean isGroupable(ProductData product)
-
consolidateGroupedOrderEntry
protected void consolidateGroupedOrderEntry(java.util.Map<java.lang.String,OrderEntryData> group)
-
getMaxPrice
protected PriceData getMaxPrice(OrderEntryData parentEntry, PriceData samplePrice)
-
getMinPrice
protected PriceData getMinPrice(OrderEntryData parentEntry, PriceData samplePrice)
-
isNotEmptyPrice
protected boolean isNotEmptyPrice(PriceData price)
-
getTotalPrice
protected PriceData getTotalPrice(OrderEntryData parentEntry, PriceData samplePrice)
-
getTotalQuantity
protected java.lang.Long getTotalQuantity(OrderEntryData parentEntry)
-
createGroupedOrderEntry
protected OrderEntryData createGroupedOrderEntry(OrderEntryData firstEntry)
-
createBaseProduct
protected ProductData createBaseProduct(ProductData variant)
-
setEntryGroups
protected void setEntryGroups(OrderEntryData entry, OrderEntryData groupedOrderEntry, AbstractOrderData order)
-
createRootGroup
protected EntryGroupData createRootGroup(OrderEntryData groupedOrderEntry, AbstractOrderData order)
-
unwrapEntry
protected void unwrapEntry(OrderEntryData entry, AbstractOrderData order)
-
getProductService
protected ProductService getProductService()
-
setProductService
public void setProductService(ProductService productService)
-
getPriceDataFactory
protected PriceDataFactory getPriceDataFactory()
-
setPriceDataFactory
public void setPriceDataFactory(PriceDataFactory priceDataFactory)
-
getEntryGroupUtils
protected CommerceEntryGroupUtils getEntryGroupUtils()
-
setEntryGroupUtils
public void setEntryGroupUtils(CommerceEntryGroupUtils entryGroupUtils)
-
-