public class WrappedOrderEntry
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
WrappedOrderEntry.PromotionResultComparator
Comparator for
PromotionResult that compares by certainty and then by priority. |
| Modifier | Constructor and Description |
|---|---|
protected |
WrappedOrderEntry(SessionContext ctx,
AbstractOrderEntry orderEntry) |
protected |
WrappedOrderEntry(SessionContext ctx,
AbstractOrderEntry orderEntry,
long quantity) |
protected |
WrappedOrderEntry(SessionContext ctx,
AbstractOrderEntry orderEntry,
long quantity,
java.util.Collection<PromotionResult> promotionResults) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addPromotionResult(SessionContext ctx,
PromotionResult promotionResult)
Add a promotion result to this wrapped order entry.
|
protected void |
addPromotionResults(SessionContext ctx,
java.util.Collection<PromotionResult> promotionResults)
Add a multiple promotion results to this wrapped order entry.
|
protected void |
consume(long quantity)
Protected method to allow order entries to be adjusted by consuming quantities.
|
protected boolean |
consumePromotionOrderEntryConsumed(SessionContext ctx,
PromotionOrderEntryConsumed poec) |
AbstractOrderEntry |
getBaseOrderEntry()
The product in this order entry.
|
double |
getEntryPrice()
Get the total price for this order entry (unit price * quantity).
|
double |
getEntryPrice(SessionContext ctx)
Get the total price for this order entry (unit price * quantity).
|
Product |
getProduct()
The product in this order entry.
|
Product |
getProduct(SessionContext ctx)
The product in this order entry.
|
java.util.List<PromotionResult> |
getPromotionResults()
The list of
PromotionResult objects that applied to this order entry. |
long |
getQuantity()
The quantity of the order entry.
|
long |
getQuantity(SessionContext ctx)
The quantity of the order entry.
|
Unit |
getUnit()
Get the unit for this entry.
|
Unit |
getUnit(SessionContext ctx)
Get the unit for this entry.
|
double |
getUnitPrice()
Get the price for one unit of the represented product.
|
double |
getUnitPrice(SessionContext ctx)
Returns the price for one unit of the represented product.
|
protected boolean |
isLegacyPromotion(PromotionOrderEntryConsumed poec)
Returns false if the Promotion of the Promotion Result is/extends one from promotionengineservices.
|
protected WrappedOrderEntry(SessionContext ctx, AbstractOrderEntry orderEntry)
protected WrappedOrderEntry(SessionContext ctx, AbstractOrderEntry orderEntry, long quantity)
protected WrappedOrderEntry(SessionContext ctx, AbstractOrderEntry orderEntry, long quantity, java.util.Collection<PromotionResult> promotionResults)
public long getQuantity()
public long getQuantity(SessionContext ctx)
ctx - The hybris session contextpublic Product getProduct()
public Product getProduct(SessionContext ctx)
ctx - The hybris session contextpublic AbstractOrderEntry getBaseOrderEntry()
public java.util.List<PromotionResult> getPromotionResults()
PromotionResult objects that applied to this order entry.PromotionResult objectsprotected void addPromotionResult(SessionContext ctx, PromotionResult promotionResult)
ctx - The hybris session contextpromotionResult - The promotion result to addprotected void addPromotionResults(SessionContext ctx, java.util.Collection<PromotionResult> promotionResults)
ctx - The hybris session contextpromotionResults - The promotion results to addprotected void consume(long quantity)
quantity - The quantity to consumepublic double getEntryPrice()
public double getEntryPrice(SessionContext ctx)
ctx - The hybris session contextpublic double getUnitPrice()
public double getUnitPrice(SessionContext ctx)
ctx - The hybris session contextpublic Unit getUnit()
public Unit getUnit(SessionContext ctx)
ctx - The hybris session contextprotected boolean consumePromotionOrderEntryConsumed(SessionContext ctx, PromotionOrderEntryConsumed poec)
protected boolean isLegacyPromotion(PromotionOrderEntryConsumed poec)
Copyright © 2018 SAP SE. All Rights Reserved.