public abstract class AbstractOrder extends GeneratedAbstractOrder
Mainly an order consists of several entries which represents ordered products of a certain quantity and unit. Further
it holds delivery, payment, discount and tax information.
An order does not provide pricing information unless it was calculated explicitly via calculate(),
calculate(Date), recalculate() or recalculate(Date). Once prices have been set you may
also use calculateTotals(boolean) which does not fetch new prices, taxes or discounts but consolidates all
totals according to price relevant changes of this order ( e.g. entry quantities, base prices etc. ). After
calculation the order is marked as calculated. Please note that all values are fixed and
do not change automatically upon changes in the price model ( via PriceFactory ). You have to recalculate the order
to see these changes.
Since prices, taxes and discounts are retrieved from the installed pricefactory refer to its documentation how to
manage prices, taxes and discounts.
Similar refer to the installed payment and delivery mode extension documentation for how to manager payment and
delivery prices. the order calculation process fetches payment and delivery prices from them.
If you like to bypass the pricefactory and implement you own logic within a special jalo order type you have to
override findDeliveryCosts(), findGlobalDiscounts() and findPaymentCosts(). Further you
have to provide a own jalo type for order entries which
overrides AbstractOrderEntry.findPrice(),
AbstractOrderEntry.findTaxes() and
AbstractOrderEntry.findDiscounts().
| Modifier and Type | Class and Description |
|---|---|
static interface |
AbstractOrder.DELIVERY_STATUS
Deprecated.
use
DeliveryStatus instead |
static interface |
AbstractOrder.EXPORT_STATUS
Deprecated.
use
ExportStatus instead |
static interface |
AbstractOrder.ORDER_STATUS
Deprecated.
use
OrderStatus instead |
static interface |
AbstractOrder.PAYMENT_STATUS
Deprecated.
use
PaymentStatus instead |
GenericItem.GenericItemImplLocalizableItem.LocalizableItemImplExtensibleItem.ExtensibleItemImplItem.AttributeFilter, Item.AttributeMode, Item.CachedGetter, Item.CachedSetter, Item.ItemAttributeMap, Item.ItemConstraint, Item.ItemImpl, Item.JaloCachedComputationExceptionCALCULATED, CODE, CURRENCY, DATE, DEFAULT_INITIAL_ATTRIBUTES, DELIVERYADDRESS, DELIVERYCOST, DELIVERYMODE, DELIVERYSTATUS, DESCRIPTION, DISCOUNTS, DISCOUNTSINCLUDEDELIVERYCOST, DISCOUNTSINCLUDEPAYMENTCOST, ENTRIES, ENTRIESHANDLER, EXPIRATIONTIME, EXPORTSTATUS, GLOBALDISCOUNTVALUESINTERNAL, NAME, NET, ORDERDISCOUNTRELATION_MARKMODIFIED, ORDERDISCOUNTRELATION_SRC_ORDERED, ORDERDISCOUNTRELATION_TGT_ORDERED, PAYMENTADDRESS, PAYMENTCOST, PAYMENTINFO, PAYMENTMODE, PAYMENTSTATUS, STATUS, STATUSINFO, SUBTOTAL, TOTALDISCOUNTS, TOTALPRICE, TOTALTAX, TOTALTAXVALUESINTERNAL, USERLANGUAGE_FALLBACK_ENABLED_CREATION_TIME_INTERNAL, _MODIFIED_TIME_INTERNAL, accessorLog, CREATION_TIME, DISABLE_ATTRIBUTE_CHECK, DISABLE_ITEMCHECK_BEFORE_REMOVABLE, EVEN, FEATURE_ACCESSMAP_QUALIFIER, INITIAL_CREATION_FLAG, isJaloOnly, MODIFIED_TIME, NEGATIVE, NOT_FOUND, OWNER, PK, POSITIVE, SAVE_FROM_SERVICE_LAYER, staticTransientObjects, TYPEimpl, tenant| Constructor and Description |
|---|
AbstractOrder() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addAbsoluteEntryTaxValue(long entryQuantity,
TaxValue taxValue,
Map<TaxValue,Map<Set<TaxValue>,Double>> taxValueMap) |
void |
addAllGlobalDiscountValues(Collection values)
Deprecated.
Use OrderService.addAllGlobalDiscountValues(de.hybris.platform.core.model.order.AbstractOrderModel,
List) instead.
|
void |
addAllGlobalDiscountValues(SessionContext ctx,
Collection values)
Deprecated.
Use OrderService.addAllGlobalDiscountValues(de.hybris.platform.core.model.order.AbstractOrderModel,
List) instead.
|
void |
addAllTotalTaxValues(Collection values)
Deprecated.
Use OrderService.addAllTotalTaxValues(de.hybris.platform.core.model.order.AbstractOrderModel, List)
instead.
|
void |
addAllTotalTaxValues(SessionContext ctx,
Collection values)
Deprecated.
Use OrderService.addAllTotalTaxValues(de.hybris.platform.core.model.order.AbstractOrderModel, List)
instead.
|
void |
addDiscount(Discount discount)
Deprecated.
|
void |
addGlobalDiscountValue(DiscountValue discountValue)
Deprecated.
Use OrderService.addGlobalDiscountValue(de.hybris.platform.core.model.order.AbstractOrderModel,
DiscountValue) instead.
|
void |
addGlobalDiscountValue(SessionContext ctx,
DiscountValue discountValue)
Deprecated.
Use OrderService.addGlobalDiscountValue(de.hybris.platform.core.model.order.AbstractOrderModel,
DiscountValue) instead.
|
AbstractOrderEntry |
addNewEntry(ComposedType type,
Product prod,
long qtd,
Unit unit,
int position,
boolean addToPresent)
Deprecated.
since 4.3, please use suitable OrderService.addNewEntry() method
|
AbstractOrderEntry |
addNewEntry(Product prod,
long qtd,
Unit unit)
Deprecated.
since 4.3, please use suitable OrderService.addNewEntry() method
|
AbstractOrderEntry |
addNewEntry(Product prod,
long qtd,
Unit unit,
boolean addToPresent)
Deprecated.
since 4.3, please use suitable OrderService.addNewEntry() method
|
AbstractOrderEntry |
addNewEntry(Product prod,
long qtd,
Unit unit,
int position,
boolean addToPresent)
Deprecated.
since 4.3, please use suitable OrderService.addNewEntry() method
|
protected void |
addRelativeEntryTaxValue(double entryTotal,
TaxValue taxValue,
Set<TaxValue> relativeEntryTaxValues,
Map<TaxValue,Map<Set<TaxValue>,Double>> taxValueMap) |
void |
addTotalTaxValue(SessionContext ctx,
TaxValue taxValue)
Deprecated.
Use OrderService.addTotalTaxValue(de.hybris.platform.core.model.order.AbstractOrderModel, TaxValue)
instead.
|
void |
addTotalTaxValue(TaxValue taxValue)
Deprecated.
Use OrderService.addTotalTaxValue(de.hybris.platform.core.model.order.AbstractOrderModel, TaxValue)
instead.
|
void |
calculate()
Deprecated.
Use CalculationService.calculate(de.hybris.platform.core.model.order.AbstractOrderModel) instead.
|
void |
calculate(Date date)
Deprecated.
Use CalculationService#calculate(de.hybris.platform.core.model.order.AbstractOrderModel, Date)
|
protected TaxValue |
calculateAbsoluteTotalTaxValue(Currency curr,
String currencyIso,
int digits,
boolean net,
TaxValue taxValue,
double cumulatedEntryQuantities) |
protected double |
calculateDiscountValues(boolean recalculate)
Returns the total discount for this abstract order.
|
protected void |
calculateEntries()
calls
AbstractOrderEntry.calculate() on all entries of this order and sets this orders subtotal to the sum
of the entry totals. |
protected Map<TaxValue,Map<Set<TaxValue>,Double>> |
calculateSubtotal(boolean recalculate)
Calculates this order's subtotal and returns a total tax value map.
|
void |
calculateTotals(boolean recalculate)
Deprecated.
Use CalculationService#calculateTotals(de.hybris.platform.core.model.order.AbstractOrderModel,
boolean) instead
|
protected void |
calculateTotals(boolean recalculate,
Map<TaxValue,Map<Set<TaxValue>,Double>> taxValueMap)
calculates all totals.
|
protected double |
calculateTotalTaxValues(boolean recalculate,
int digits,
double taxAdjustmentFactor,
Map<TaxValue,Map<Set<TaxValue>,Double>> taxValueMap) |
protected List |
convertDiscountValues(List dvs) |
protected String |
createEntryInformation(AbstractOrderEntry newEntry)
Deprecated.
since 4.3 order entry info is set in prepare interceptor.
|
protected Item |
createItem(SessionContext ctx,
ComposedType type,
Item.ItemAttributeMap allAttributes)
Has to be implemented for each concrete subtype of item.
|
Address |
createNewDeliveryAddress()
creates a new address which is set as this orders delivery address.
|
Address |
createNewDeliveryAddress(SessionContext ctx)
creates a new address which is set as this orders delivery address.
|
protected abstract AbstractOrderEntry |
createNewEntry(SessionContext ctx,
ComposedType entryType,
Product product,
long quantity,
Unit unit,
int position) |
protected int |
createNewEntryNumber(int requested) |
Address |
createNewPaymentAddress()
creates a new address which is set as this orders payment address.
|
Address |
createNewPaymentAddress(SessionContext ctx)
creates a new address which is set as this orders payment address.
|
boolean |
discountsIncludeDeliveryCosts()
Deprecated.
|
boolean |
discountsIncludePaymentCosts()
Deprecated.
|
protected void |
doSetDeliveryAddress(SessionContext ctx,
Address newOne)
Performs changing of delivery address.
|
protected void |
doSetPaymentAddress(SessionContext ctx,
Address newOne)
Performs changing of payment address.
|
protected PriceValue |
findDeliveryCosts()
Called during
calculate(), calculate(Date), recalculate() and
recalculate(Date) to fetch and set the delivery cost for this order. |
protected List |
findGlobalDiscounts()
Called during
calculate(), calculate(Date), recalculate() and
recalculate(Date) to fetch and set global discount values for this order. |
protected PriceValue |
findPaymentCosts()
called during
calculate(), calculate(Date), recalculate() and
recalculate(Date) to fetch and set the payment costs for this order. |
protected abstract String |
getAbstractOrderEntryTypeCode() |
List |
getAllEntries()
Deprecated.
|
protected Object |
getAttributeValue(Item item,
String qualifer) |
protected ComposedType |
getCustomEntryType()
when overriding abstract order type this defines the corresponding entry type
|
Date |
getDate(SessionContext ctx)
The creation date of an order.
|
double |
getDeliveryCosts()
The calculated delivery costs of this order.
|
double |
getDeliveryCosts(SessionContext ctx)
Deprecated.
|
List<AbstractOrderEntry> |
getEntries()
Generated method - Getter of the
AbstractOrder.entries attribute. |
Collection |
getEntries(int startIdx,
int endIdx) |
List<AbstractOrderEntry> |
getEntries(SessionContext ctx)
Generated method - Getter of the
AbstractOrder.entries attribute. |
List |
getEntriesByProduct(Product product)
Returns all entries which belong to a specified product.
|
AbstractOrderEntry |
getEntry(int index)
Deprecated.
Use OrderService.getEntryForNumber(de.hybris.platform.core.model.order.AbstractOrderModel, int)
instead.
|
List |
getGlobalDiscountValues()
Deprecated.
Use model getter AbstractOrderModel.getGlobalDiscountValues() instead.
|
List |
getGlobalDiscountValues(SessionContext ctx)
Deprecated.
Use model getter AbstractOrderModel.getGlobalDiscountValues() instead.
|
protected int |
getNewEntryNumberForAppending(List<AbstractOrderEntry> all) |
protected int |
getNextEntryNumber(AbstractOrderEntry forMe) |
double |
getPaymentCosts()
The calculated costs according to the chosen payment mode.
|
double |
getPaymentCosts(SessionContext ctx)
Deprecated.
|
double |
getTotal()
Deprecated.
|
double |
getTotal(SessionContext ctx)
Deprecated.
|
Double |
getTotalDiscounts()
returns the sum of all discounts of this (calculated) order.
|
Double |
getTotalTax()
The calculated total tax amount of this order.
|
Collection |
getTotalTaxValues()
Deprecated.
Use model getter AbstractOrderModel.getTotalTaxValues() instead.
|
Collection |
getTotalTaxValues(SessionContext ctx)
Deprecated.
Use model getter AbstractOrderModel.getTotalTaxValues() instead.
|
Boolean |
isCalculated()
Shows if this order was calculated before.
|
Boolean |
isCalculated(SessionContext ctx)
Shows if this order was calculated before.
|
Boolean |
isNet()
The gross / net status of this order.
|
protected void |
notifyDiscountsAboutCalculation() |
protected void |
notifyDiscountsAboutRemoval() |
void |
recalculate()
Deprecated.
Use CalculationService#recalculate(de.hybris.platform.core.model.order.AbstractOrderModel) instead.
|
void |
recalculate(Date date)
Deprecated.
Use CalculationService#recalculate(de.hybris.platform.core.model.order.AbstractOrderModel,
java.util.Date) instead.
|
protected void |
recalculateEntries()
calls
AbstractOrderEntry.recalculate() on all entries of this order and sets this orders subtotal to the
sum of the entry totals. |
void |
remove(SessionContext ctx)
Removes this item.
|
void |
removeAllEntries()
Deprecated.
Use
ModelService.remove() instead. All the remove logic is handled by dedicated
RemoveInterceptors. Removes all entries from this order. Since entries can per
definition not exists without a containing order they are permanently deleted. Please use this method
with care. |
void |
removeAllGlobalDiscountValues()
Deprecated.
Use model setter AbstractOrderModel.setGlobalDiscountValues(List) and ModelService.save() method
instead.
|
void |
removeAllGlobalDiscountValues(SessionContext ctx)
Deprecated.
Use model setter AbstractOrderModel.setGlobalDiscountValues(List) and ModelService.save() method
instead.
|
void |
removeAllTotalTaxValues()
Deprecated.
Use model setter AbstractOrderModel.setTotalTaxValues(Collection) and ModelService.save() method
instead.
|
void |
removeAllTotalTaxValues(SessionContext ctx)
Deprecated.
Use model setter AbstractOrderModel.setTotalTaxValues(Collection) and ModelService.save() method
instead.
|
void |
removeDiscount(Discount discount)
Deprecated.
|
protected void |
removeEntries(SessionContext ctx,
Set<AbstractOrderEntry> entries)
Deprecated.
Use
ModelService.remove() instead. All the remove logic is handled by dedicated
RemoveInterceptors. |
void |
removeEntry(AbstractOrderEntry entry)
Deprecated.
Use
ModelService.remove() instead. All the remove logic is handled by dedicated
RemoveInterceptors. Removes an entry from this order. Since entries can per
definition not exists without a containing order the entry object is permanently deleted, so be
careful. |
void |
removeGlobalDiscountValue(DiscountValue discountValue)
Deprecated.
Use OrderService.removeGlobalDiscountValue(de.hybris.platform.core.model.order.AbstractOrderModel,
DiscountValue) instead.
|
void |
removeGlobalDiscountValue(SessionContext ctx,
DiscountValue discountValue)
Deprecated.
Use OrderService.removeGlobalDiscountValue(de.hybris.platform.core.model.order.AbstractOrderModel,
DiscountValue) instead.
|
void |
removeTotalTaxValue(SessionContext ctx,
TaxValue taxValue)
Deprecated.
Use OrderService.removeTotalTaxValue(de.hybris.platform.core.model.order.AbstractOrderModel, TaxValue)
instead.
|
void |
removeTotalTaxValue(TaxValue taxValue)
Deprecated.
Use OrderService.removeTotalTaxValue(de.hybris.platform.core.model.order.AbstractOrderModel, TaxValue)
instead.
|
protected void |
resetAdditionalCosts(Collection<TaxValue> relativeTaxValues) |
protected Map |
resetAllValues()
fetches all prices, taxes, discount, payment and delivery costs and sets these fields.
|
protected void |
setAllEntries(SessionContext ctx,
List value) |
protected void |
setChanged(boolean entriesToo) |
void |
setCode(SessionContext ctx,
String code)
Sets the order code.
|
void |
setCode(String code)
Sets the order code.
|
Item |
setComposedType(ComposedType type)
Changes this order's composed type and the composed type of its entries provided that
getCustomEntryType() returns a valid entry class. |
void |
setCurrency(Currency curr)
Changes the currency for all pricing informations of this order.
|
void |
setCurrency(SessionContext ctx,
Currency curr)
Changes the currency for all pricing informations of this order.
|
void |
setDate(Date date)
Changes creation date of an order.
|
void |
setDate(SessionContext ctx,
Date date)
Changes creation date of an order.
|
void |
setDeliveryAddress(Address address)
Changes the delivery address.
|
void |
setDeliveryAddress(SessionContext ctx,
Address address)
Changes the delivery address.
|
void |
setDeliveryCost(SessionContext ctx,
Double value)
Generated method - Setter of the
AbstractOrder.deliveryCost attribute. |
void |
setDeliveryCosts(double deliveryCost)
Sets The calculated delivery costs of this order.
|
void |
setDeliveryCosts(SessionContext ctx,
double deliveryCost)
Deprecated.
use
GeneratedAbstractOrder.setDeliveryCost(double) instead |
void |
setDeliveryMode(DeliveryMode mode)
Changes the chosen delivery mode for this order.
|
void |
setDeliveryMode(SessionContext ctx,
DeliveryMode mode)
Changes the chosen delivery mode for this order.
|
void |
setDeliveryStatus(EnumerationValue deliveryStatus)
Changes the order delivery status.
|
void |
setDeliveryStatus(SessionContext ctx,
EnumerationValue deliveryStatus)
Changes the order delivery status.
|
void |
setDiscountsIncludeDeliveryCost(SessionContext ctx,
Boolean value)
Generated method - Setter of the
AbstractOrder.discountsIncludeDeliveryCost attribute. |
void |
setDiscountsIncludeDeliveryCosts(boolean includes)
Deprecated.
|
void |
setDiscountsIncludePaymentCost(SessionContext ctx,
Boolean value)
Generated method - Setter of the
AbstractOrder.discountsIncludePaymentCost attribute. |
void |
setDiscountsIncludePaymentCosts(boolean includes)
Deprecated.
use
setDiscountsIncludePaymentCosts(boolean) instead |
void |
setEntries(List<AbstractOrderEntry> value)
Generated method - Setter of the
AbstractOrder.entries attribute. |
void |
setEntries(SessionContext ctx,
List<AbstractOrderEntry> value)
Generated method - Setter of the
AbstractOrder.entries attribute. |
void |
setGlobalDiscountValues(List globalDiscounts)
Deprecated.
Use model setter AbstractOrderModel.setGlobalDiscountValues(List) and ModelService.save() method
instead.
|
void |
setGlobalDiscountValues(SessionContext ctx,
List globalDiscounts)
Deprecated.
Use model setter AbstractOrderModel.setGlobalDiscountValues(List) and ModelService.save() method
instead.
|
void |
setNet(boolean net)
Changes the gross / net status of this order.
|
void |
setNet(SessionContext ctx,
boolean net)
Changes the gross / net status of this order.
|
void |
setPaymentAddress(Address adr)
Changes the payment address of this order.
|
void |
setPaymentAddress(SessionContext ctx,
Address adr)
Changes the payment address of this order.
|
void |
setPaymentCost(SessionContext ctx,
Double value)
Generated method - Setter of the
AbstractOrder.paymentCost attribute. |
void |
setPaymentCosts(double paymentCost)
Sets the costs of the chosen payment mode.
|
void |
setPaymentCosts(SessionContext ctx,
double paymentCost)
Deprecated.
|
void |
setPaymentMode(PaymentMode mode)
Changes the payment mode of this order.
|
void |
setPaymentMode(SessionContext ctx,
PaymentMode mode)
Changes the payment mode of this order.
|
void |
setPaymentStatus(EnumerationValue paymentStatus)
Changes the payment order status.
|
void |
setPaymentStatus(SessionContext ctx,
EnumerationValue paymentStatus)
Changes the order payment status.
|
void |
setStatus(EnumerationValue status)
Changes the order status.
|
void |
setStatus(SessionContext ctx,
EnumerationValue status)
Changes the order status.
|
void |
setTotal(double total)
Sets the calculated total price of this order.
|
void |
setTotal(SessionContext ctx,
double price)
Deprecated.
|
void |
setTotalTaxValues(Collection totalTaxValues)
Deprecated.
Use model setter AbstractOrderModel.setTotalTaxValues(Collection) and ModelService.save() method
instead.
|
void |
setTotalTaxValues(SessionContext ctx,
Collection totalTaxValues)
Deprecated.
Use model setter AbstractOrderModel.setTotalTaxValues(Collection) and ModelService.save() method
instead.
|
void |
setUser(SessionContext ctx,
User user)
Changes the user which this order belongs to.
|
void |
setUser(User user)
Changes the user which this order belongs to.
|
protected void |
shuffleEntriesOnInsertNew(List<AbstractOrderEntry> all,
int newEntryNumber) |
protected Language |
tryToFindFallbackLanguage(JaloSession js) |
addToDiscounts, addToDiscounts, addToEntries, addToEntries, getCode, getCode, getCurrency, getCurrency, getDate, getDefaultAttributeModes, getDeliveryAddress, getDeliveryAddress, getDeliveryCost, getDeliveryCost, getDeliveryCostAsPrimitive, getDeliveryCostAsPrimitive, getDeliveryMode, getDeliveryMode, getDeliveryStatus, getDeliveryStatus, getDescription, getDescription, getDiscounts, getDiscounts, getDiscountsCount, getDiscountsCount, getExpirationTime, getExpirationTime, getExportStatus, getExportStatus, getGlobalDiscountValuesInternal, getGlobalDiscountValuesInternal, getName, getName, getPaymentAddress, getPaymentAddress, getPaymentCost, getPaymentCost, getPaymentCostAsPrimitive, getPaymentCostAsPrimitive, getPaymentInfo, getPaymentInfo, getPaymentMode, getPaymentMode, getPaymentStatus, getPaymentStatus, getStatus, getStatus, getStatusInfo, getStatusInfo, getSubtotal, getSubtotal, getSubtotalAsPrimitive, getSubtotalAsPrimitive, getTotalDiscounts, getTotalDiscountsAsPrimitive, getTotalDiscountsAsPrimitive, getTotalPrice, getTotalPrice, getTotalPriceAsPrimitive, getTotalPriceAsPrimitive, getTotalTax, getTotalTaxAsPrimitive, getTotalTaxAsPrimitive, getTotalTaxValuesInternal, getTotalTaxValuesInternal, getUser, getUser, isCalculatedAsPrimitive, isCalculatedAsPrimitive, isDiscountsIncludeDeliveryCost, isDiscountsIncludeDeliveryCost, isDiscountsIncludeDeliveryCostAsPrimitive, isDiscountsIncludeDeliveryCostAsPrimitive, isDiscountsIncludePaymentCost, isDiscountsIncludePaymentCost, isDiscountsIncludePaymentCostAsPrimitive, isDiscountsIncludePaymentCostAsPrimitive, isNet, isNetAsPrimitive, isNetAsPrimitive, removeFromDiscounts, removeFromDiscounts, removeFromEntries, removeFromEntries, setCalculated, setCalculated, setCalculated, setCalculated, setDeliveryCost, setDeliveryCost, setDeliveryCost, setDescription, setDescription, setDiscounts, setDiscounts, setDiscountsIncludeDeliveryCost, setDiscountsIncludeDeliveryCost, setDiscountsIncludeDeliveryCost, setDiscountsIncludePaymentCost, setDiscountsIncludePaymentCost, setDiscountsIncludePaymentCost, setExpirationTime, setExpirationTime, setExportStatus, setExportStatus, setGlobalDiscountValuesInternal, setGlobalDiscountValuesInternal, setName, setName, setNet, setNet, setPaymentCost, setPaymentCost, setPaymentCost, setPaymentInfo, setPaymentInfo, setStatusInfo, setStatusInfo, setSubtotal, setSubtotal, setSubtotal, setSubtotal, setTotalDiscounts, setTotalDiscounts, setTotalDiscounts, setTotalDiscounts, setTotalPrice, setTotalPrice, setTotalPrice, setTotalPrice, setTotalTax, setTotalTax, setTotalTax, setTotalTax, setTotalTaxValuesInternal, setTotalTaxValuesInternalgetInitialProperties, getNonInitialAttributesgetAllLocalizedProperties, getAllLocalizedProperties, getAllLocalizedProperties, getAllLocalizedProperties, getAllValuesSessionContext, getLocalizedProperty, getLocalizedProperty, getLocalizedPropertyInternal, getLocalizedPropertyNames, getLocalizedPropertyNames, hasLanguage, isEmptyValue, isFallbackEnabled, removeLocalizedProperty, removeLocalizedProperty, setAllLocalizedProperties, setAllLocalizedProperties, setLocalizedProperty, setLocalizedPropertycreateNonClassAccessor, getAllProperties, getAllProperties, getProperty, getProperty, getPropertyNames, getPropertyNames, removeProperty, removeProperty, setAllProperties, setAllProperties, setProperty, setPropertyaddLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addNegativePermission, addPermission, addPositivePermission, assureExtensionsLoaded, changeTypeAfterCreation, checkConstraint, checkItemPermission, checkMandatoryAttribute, checkMandatoryAttribute, checkPermission, checkPermission, checkRemovable, clearPermission, compareTo, ctx, doAfterRemove, doBeforeRemove, equals, getAccessorFor, getAllAttributes, getAllAttributes, getAllAttributes, getAllAttributes, getAllAttributesInternal, getAllLinkedItems, getAndCheckCacheBoundItem, getAttribute, getAttribute, getCacheBoundItem, getComposedType, getComposedTypePK, getCreationTime, getCurrentlyRemovingCount, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItemsCount, getLinkedItemsCount, getLinkedItemsCount, getModificationTime, getNegativePermissions, getOwner, getPermissionMap, getPermissions, getPersistenceVersion, getPK, getPositivePermissions, getRestrictedPrincipals, getSession, getSyncObject, getTenant, getTransientObject, getTransientObjectMap, hashCode, hasRegisteredClassAccessorFor, internal_registerClassAccessorFor, internal_registerNonClassAccessorFor, invalidateLocalCaches, isAlive, isCacheBound, isCurrentlyRemoving, isCurrentlyRemoving, isEmptyRelationValue, isInCreate, isInstanceOf, isItemCheckBeforeRemoveableDisabled, isRelationLocalizationFallbackEnabled, newInstance, notifyExtensionsAfterItemCreation, notifyExtensionsBeforeItemCreation, notifyItemRemoval, readResolve, refreshRemote, registerAccessFor, registerAccessFor, registerJaloInvalidationListeners, remove, removeItemCollection, removeItemCollection, removeLinkedItems, removeLinkedItems, removeLinkedItems, removeLinkedItems, removeLinks, removePartOfItems, removePartOfItems, setAllAttributes, setAllAttributes, setAllAttributesInternal, setAllLinkedItems, setAllLinkedItems, setAllLinkedItems, setAllLinkedItems, setAttribute, setAttribute, setAttributeFromString, setAttributeFromString, setCacheBound, setCreationTime, setImplementation, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setModificationTime, setNonInitialAttributes, setOwner, setPermissionsByMap, setTransientObject, setUseTA, toString, useTA, writeReplacegetImplementation, setTenantpublic static final String CFG_TAX_FREE_ENTRIES_SUPPORT
public static final int APPEND_AS_LAST
@Deprecated public static final String DELIVERY_ADDRESS
GeneratedAbstractOrder.DELIVERYADDRESS instead@Deprecated public static final String PAYMENT_ADDRESS
GeneratedAbstractOrder.PAYMENTADDRESS instead@Deprecated public static final String EXPORT_STATUS
GeneratedAbstractOrder.EXPORTSTATUS instead@Deprecated public static final String PAYMENT_MODE
GeneratedAbstractOrder.PAYMENTMODE instead@Deprecated public static final String DELIVERY_MODE
GeneratedAbstractOrder.DELIVERYMODE instead@Deprecated public static final String PAYMENT_INFO
GeneratedAbstractOrder.PAYMENTINFO instead@Deprecated public static final String PAYMENT_STATUS
GeneratedAbstractOrder.PAYMENTSTATUS instead@Deprecated public static final String DELIVERY_STATUS
GeneratedAbstractOrder.DELIVERYSTATUS instead@Deprecated public static final String GLOBAL_DISCOUNT_VALUES
@Deprecated public static final String TOTAL_TAX_VALUES
@Deprecated public static final String TOTAL_TAX
GeneratedAbstractOrder.TOTALTAX instead@Deprecated public static final String TOTAL
GeneratedAbstractOrder.TOTALPRICE instead@Deprecated public static final String DELIVERY_COST
GeneratedAbstractOrder.DELIVERYCOST instead@Deprecated public static final String PAYMENT_COST
GeneratedAbstractOrder.PAYMENTCOST instead@Deprecated public static final String STATUS_INFO
GeneratedAbstractOrder.STATUSINFO instead@Deprecated public static final String TOTAL_DISCOUNTS
GeneratedAbstractOrder.TOTALDISCOUNTS instead@Deprecated public static final String ORDER_DISCOUNT_RELATION_NAME
DiscountModel#_ORDERDISCOUNTRELATION instead@Deprecated public static final String ORDER_STATUS_TYPE
OrderStatus#_TYPECODE instead@Deprecated public static final String PAYMENT_STATUS_TYPE
PaymentStatus#_TYPECODE instead@Deprecated public static final String DELIVERY_STATUS_TYPE
DeliveryStatus#_TYPECODE instead@Deprecated public static final String EXPORT_STATUS_TYPE
ExportStatus#_TYPECODE insteadprotected Item createItem(SessionContext ctx, ComposedType type, Item.ItemAttributeMap allAttributes) throws JaloBusinessException
ItemComposedType.newInstance(Map).
In case this method uses any of the attribute values during creation it is required to override
Item.getNonInitialAttributes(SessionContext, ItemAttributeMap) too.
Sn example:
public static final String MY_ATTRIBUTE = "someAttribute"; ... protected Item createItem(SessionContext
ctx, ComposedType type, Map allAttributes ) throws JaloBusinessException { MyManager man = ... return
man.createMyItem( (String)allAttributes.get(MY_ATTRIBUTE) );
// here MY_ATTRIBUTE is used for creation, so it must not be set again } protected Map getNonInitialAttributes(
SessionContext ctx, Map allAttributes ) { // let superclass remove its own initial attributes Map ret =
super.getNonInitialAttributes( ctx, allAttributes );
// remove MY_ATTRIBUTE from all attributes since if has already been set ret.remove(MY_ATTRIBUTE); return ret; }
createItem in class GenericItemctx - the current session context which this item is created withintype - the actual item type ( since subtypes may not provide a own jalo class this may be different from the
type which this method was implemented for )JaloBusinessException - indicates an error during creation - any changes will be rollbackedprotected abstract String getAbstractOrderEntryTypeCode()
@Deprecated public List getAllEntries()
getEntries(SessionContext)public List<AbstractOrderEntry> getEntries()
GeneratedAbstractOrderAbstractOrder.entries attribute.getEntries in class GeneratedAbstractOrderpublic List<AbstractOrderEntry> getEntries(SessionContext ctx)
GeneratedAbstractOrderAbstractOrder.entries attribute.getEntries in class GeneratedAbstractOrderprotected void setAllEntries(SessionContext ctx, List value)
@Deprecated public AbstractOrderEntry getEntry(int index) throws JaloItemNotFoundException
index - JaloItemNotFoundExceptionpublic Collection getEntries(int startIdx, int endIdx)
public List getEntriesByProduct(Product product)
product - protected int createNewEntryNumber(int requested)
protected void shuffleEntriesOnInsertNew(List<AbstractOrderEntry> all, int newEntryNumber)
protected int getNewEntryNumberForAppending(List<AbstractOrderEntry> all)
protected int getNextEntryNumber(AbstractOrderEntry forMe)
@Deprecated public AbstractOrderEntry addNewEntry(Product prod, long qtd, Unit unit)
prod - - must not be nullqtd - unit - - must not be nullIllegalArgumentException - if eighter given Product or Unit was null@Deprecated public AbstractOrderEntry addNewEntry(Product prod, long qtd, Unit unit, boolean addToPresent)
prod - - must not be nullqtd - unit - - must not be nulladdToPresent - if true an existing entry with matching product and unit will get its quantity increased;
otherwise a new entry is createdIllegalArgumentException - if eighter given Product or Unit was null@Deprecated public AbstractOrderEntry addNewEntry(Product prod, long qtd, Unit unit, int position, boolean addToPresent)
prod - - must not be nullqtd - unit - - must not be nulladdToPresent - if true an existing entry with matching product and unit will get its quantity increased;
otherwise a new entry is createdIllegalArgumentException - if eighter given Product or Unit was null@Deprecated public AbstractOrderEntry addNewEntry(ComposedType type, Product prod, long qtd, Unit unit, int position, boolean addToPresent)
type - the item type of the new entry (note that the type is not changed if a existing entry is just
increased!)prod - - must not be nullqtd - unit - - must not be nulladdToPresent - if true an existing entry with matching product and unit will get its quantity increased;
otherwise a new entry is createdIllegalArgumentException - if eighter given Product or Unit was nullprotected abstract AbstractOrderEntry createNewEntry(SessionContext ctx, ComposedType entryType, Product product, long quantity, Unit unit, int position)
protected ComposedType getCustomEntryType()
public Item setComposedType(ComposedType type) throws JaloInvalidParameterException
getCustomEntryType() returns a valid entry class.setComposedType in class Itemtype - the new type of the itemJaloInvalidParameterException - in case the new type is not compatible with the current type. this happens a) if the type is abstract,
b) the new type's class is not compatible with the current class, or c) if the new type has a different
deployment (JNDI name, Table) than the current one@Deprecated protected String createEntryInformation(AbstractOrderEntry newEntry)
local.properties (or
project.properties) you can define the text and attributes for each itemtype individually.orderentry.infofield.your_type = your pattern with this ${attribute_of_your_type}orderentry.infofield.product = product "${code}" with name "${name}" generates in the info field the
entry
product "P000010" with name "bett"orderentry.infofield.shirt = product ${code} in color ${color} and size ${size.code} generates in the
info field the entry product P000123 in color green and size morderentry.infofield.xxxxxx <- all in lower case !newEntry - the newly created (and added) entry of this orderprotected Object getAttributeValue(Item item, String qualifer) throws JaloSecurityException
JaloSecurityExceptionprotected Language tryToFindFallbackLanguage(JaloSession js)
@Deprecated public void removeEntry(AbstractOrderEntry entry)
ModelService.remove() instead. All the remove logic is handled by dedicated
RemoveInterceptors. Removes an entry from this order. Since entries can per
definition not exists without a containing order the entry object is permanently deleted, so be
careful.entry - @Deprecated protected void removeEntries(SessionContext ctx, Set<AbstractOrderEntry> entries)
ModelService.remove() instead. All the remove logic is handled by dedicated
RemoveInterceptors.@Deprecated public void removeAllEntries()
ModelService.remove() instead. All the remove logic is handled by dedicated
RemoveInterceptors. Removes all entries from this order. Since entries can per
definition not exists without a containing order they are permanently deleted. Please use this method
with care.public void setCode(String code)
setCode in class GeneratedAbstractOrdercode - public void setCode(SessionContext ctx, String code)
setCode in class GeneratedAbstractOrderctx - can be used for cached access of 'code' value may be outdated! code - public void setDate(Date date)
setDate in class GeneratedAbstractOrderdate - public Date getDate(SessionContext ctx)
getDate in class GeneratedAbstractOrderctx - can be used for cached access of 'date' value may be outdated! public void setDate(SessionContext ctx, Date date)
setDate in class GeneratedAbstractOrderctx - can be used for cached access of 'date' value may be outdated! date - public void setUser(User user)
setUser in class GeneratedAbstractOrderuser - public void setUser(SessionContext ctx, User user)
setUser in class GeneratedAbstractOrderctx - can be used for cached access of the user object object may be outdated! user - public void setCurrency(Currency curr)
setCurrency in class GeneratedAbstractOrdercurr - public void setCurrency(SessionContext ctx, Currency curr)
setCurrency in class GeneratedAbstractOrderctx - can be used for cached access of the currency object object may be outdated! curr - public void setStatus(EnumerationValue status)
setStatus in class GeneratedAbstractOrderstatus - the status of this order.public void setStatus(SessionContext ctx, EnumerationValue status)
setStatus in class GeneratedAbstractOrderctx - can be used for cached access of status value may be outdated! status - the status of this orderpublic void setPaymentStatus(EnumerationValue paymentStatus)
setPaymentStatus in class GeneratedAbstractOrderpaymentStatus - the payment status of this order.public void setPaymentStatus(SessionContext ctx, EnumerationValue paymentStatus)
setPaymentStatus in class GeneratedAbstractOrderpaymentStatus - the paymentStatuspublic void setDeliveryStatus(EnumerationValue deliveryStatus)
setDeliveryStatus in class GeneratedAbstractOrderdeliveryStatus - the delivery status of this order.public void setDeliveryStatus(SessionContext ctx, EnumerationValue deliveryStatus)
setDeliveryStatus in class GeneratedAbstractOrderdeliveryStatus - the deliveryStatuspublic Boolean isNet()
isNet in class GeneratedAbstractOrderpublic void setNet(boolean net)
setNet in class GeneratedAbstractOrdernet - public void setNet(SessionContext ctx, boolean net)
setNet in class GeneratedAbstractOrderctx - can be used for cached access of net status value may be outdated! net - public void setDeliveryMode(DeliveryMode mode)
setDeliveryMode in class GeneratedAbstractOrdermode - public void setDeliveryMode(SessionContext ctx, DeliveryMode mode)
setDeliveryMode in class GeneratedAbstractOrderctx - can be used for cached access of delivery mode object object may be outdated! mode - public void setDeliveryAddress(Address address)
setDeliveryAddress in class GeneratedAbstractOrderaddress - public Address createNewDeliveryAddress()
public Address createNewDeliveryAddress(SessionContext ctx)
public void setDeliveryAddress(SessionContext ctx, Address address)
setDeliveryAddress in class GeneratedAbstractOrderctx - can be used for cached access of address object object may be outdated! address - protected void doSetDeliveryAddress(SessionContext ctx, Address newOne)
public double getDeliveryCosts()
isCalculated() returns true
and/or it was set by your own using the method setDeliveryCosts(double).public void setDeliveryCosts(double deliveryCost)
deliveryCost - @Deprecated public double getDeliveryCosts(SessionContext ctx)
GeneratedAbstractOrder.getDeliveryCostAsPrimitive(SessionContext) insteadisCalculated() returns true
and/or it was set by your own using the method setDeliveryCosts(SessionContext,double).@Deprecated public void setDeliveryCosts(SessionContext ctx, double deliveryCost)
GeneratedAbstractOrder.setDeliveryCost(double) insteadctx - deliveryCost - public void setDeliveryCost(SessionContext ctx, Double value)
GeneratedAbstractOrderAbstractOrder.deliveryCost attribute.setDeliveryCost in class GeneratedAbstractOrdervalue - the deliveryCostpublic void setPaymentMode(PaymentMode mode)
setPaymentMode in class GeneratedAbstractOrdermode - public void setPaymentMode(SessionContext ctx, PaymentMode mode)
setPaymentMode in class GeneratedAbstractOrderctx - can be used for cached access object may be outdated! mode - public void setPaymentAddress(Address adr)
setPaymentAddress in class GeneratedAbstractOrderadr - public Address createNewPaymentAddress()
public Address createNewPaymentAddress(SessionContext ctx)
public void setPaymentAddress(SessionContext ctx, Address adr)
setPaymentAddress in class GeneratedAbstractOrderctx - can be used for cached access object may be outdated! adr - protected void doSetPaymentAddress(SessionContext ctx, Address newOne)
public double getPaymentCosts()
public void setPaymentCosts(double paymentCost)
paymentCost - @Deprecated public double getPaymentCosts(SessionContext ctx)
GeneratedAbstractOrder.getPaymentCost(SessionContext) instead@Deprecated public void setPaymentCosts(SessionContext ctx, double paymentCost)
GeneratedAbstractOrder.setPaymentCost(SessionContext, double) insteadctx - paymentCost - public void setPaymentCost(SessionContext ctx, Double value)
GeneratedAbstractOrderAbstractOrder.paymentCost attribute.setPaymentCost in class GeneratedAbstractOrdervalue - the paymentCostpublic Double getTotalTax()
getTotalTaxValues().getTotalTax in class GeneratedAbstractOrder@Deprecated public double getTotal()
GeneratedAbstractOrder.getTotalPriceAsPrimitive() insteadpublic void setTotal(double total)
calculate() , calculate(Date), recalculate(), recalculate(Date) or
calculateTotals(boolean) is called.total - @Deprecated public double getTotal(SessionContext ctx)
GeneratedAbstractOrder.getTotalPriceAsPrimitive(SessionContext) instead@Deprecated public void setTotal(SessionContext ctx, double price)
GeneratedAbstractOrder.setTotalPrice(SessionContext, double) insteadcalculate(), calculate(Date), recalculate(), recalculate(Date) or
calculateTotals(boolean) is called.ctx - price - @Deprecated public void addTotalTaxValue(TaxValue taxValue)
calculate(),
calculate(Date), recalculate(), recalculate(Date) or calculateTotals(boolean)
is called.taxValue - @Deprecated public void addAllTotalTaxValues(Collection values)
calculate(), calculate(Date), recalculate(), recalculate(Date) or
calculateTotals(boolean) is called.values - @Deprecated public void removeTotalTaxValue(TaxValue taxValue)
calculate(),
calculate(Date), recalculate(), recalculate(Date) or calculateTotals(boolean)
is called.taxValue - @Deprecated public void removeAllTotalTaxValues()
calculate()
, calculate(Date), recalculate(), recalculate(Date) or
calculateTotals(boolean) is called.@Deprecated public Collection getTotalTaxValues()
TaxValue) of this order. These values represent the grouped taxes of all
entries.@Deprecated public Collection getTotalTaxValues(SessionContext ctx)
TaxValue) of this order. These values represent the grouped taxes of all
entries.@Deprecated public void addTotalTaxValue(SessionContext ctx, TaxValue taxValue)
calculate(),
calculate(Date), recalculate(), recalculate(Date) or calculateTotals(boolean)
is called.taxValue - @Deprecated public void addAllTotalTaxValues(SessionContext ctx, Collection values)
calculate(), calculate(Date), recalculate(), recalculate(Date) or
calculateTotals(boolean) is called.values - @Deprecated public void removeTotalTaxValue(SessionContext ctx, TaxValue taxValue)
calculate(),
calculate(Date), recalculate(), recalculate(Date) or calculateTotals(boolean)
is called.taxValue - @Deprecated public void removeAllTotalTaxValues(SessionContext ctx)
calculate(), calculate(Date), recalculate(), recalculate(Date) or
calculateTotals(boolean) is called.@Deprecated public void setTotalTaxValues(Collection totalTaxValues)
@Deprecated public void setTotalTaxValues(SessionContext ctx, Collection totalTaxValues)
@Deprecated public void addGlobalDiscountValue(DiscountValue discountValue)
discountValue - @Deprecated public void addAllGlobalDiscountValues(Collection values)
values - @Deprecated public void removeGlobalDiscountValue(DiscountValue discountValue)
discountValue - @Deprecated public void removeAllGlobalDiscountValues()
@Deprecated public List getGlobalDiscountValues()
@Deprecated public List getGlobalDiscountValues(SessionContext ctx)
@Deprecated public void addGlobalDiscountValue(SessionContext ctx, DiscountValue discountValue)
discountValue - @Deprecated public void addAllGlobalDiscountValues(SessionContext ctx, Collection values)
values - @Deprecated public void removeGlobalDiscountValue(SessionContext ctx, DiscountValue discountValue)
discountValue - @Deprecated public void removeAllGlobalDiscountValues(SessionContext ctx)
@Deprecated public void setGlobalDiscountValues(List globalDiscounts)
@Deprecated public void setGlobalDiscountValues(SessionContext ctx, List globalDiscounts)
public Boolean isCalculated()
true .isCalculated in class GeneratedAbstractOrdercalculate(),
calculate(Date),
recalculate(),
recalculate(Date),
calculateTotals(boolean)public Boolean isCalculated(SessionContext ctx)
true .isCalculated in class GeneratedAbstractOrdercalculate(),
calculate(Date),
recalculate(),
recalculate(Date),
calculateTotals(boolean)@Deprecated public boolean discountsIncludePaymentCosts()
GeneratedAbstractOrder.isDiscountsIncludePaymentCostAsPrimitive() instead@Deprecated public void setDiscountsIncludePaymentCosts(boolean includes)
setDiscountsIncludePaymentCosts(boolean) insteadpublic void setDiscountsIncludePaymentCost(SessionContext ctx, Boolean value)
GeneratedAbstractOrderAbstractOrder.discountsIncludePaymentCost attribute.setDiscountsIncludePaymentCost in class GeneratedAbstractOrdervalue - the discountsIncludePaymentCost - Tells whether payment costs should be included in discount calculation or not. If this
field is true
payment costs are changed the same way as product costs if discount values are set at this
order.@Deprecated public boolean discountsIncludeDeliveryCosts()
GeneratedAbstractOrder.isDiscountsIncludePaymentCostAsPrimitive() instead@Deprecated public void setDiscountsIncludeDeliveryCosts(boolean includes)
GeneratedAbstractOrder.setDiscountsIncludeDeliveryCost(boolean) insteadpublic void setDiscountsIncludeDeliveryCost(SessionContext ctx, Boolean value)
GeneratedAbstractOrderAbstractOrder.discountsIncludeDeliveryCost attribute.setDiscountsIncludeDeliveryCost in class GeneratedAbstractOrdervalue - the discountsIncludeDeliveryCost - Tells whether delivery costs should be included in discount calculation or not. If this
field is true
delivery costs are changed the same way as product costs if discount values are set at this
order.protected void calculateEntries()
throws JaloPriceFactoryException
AbstractOrderEntry.calculate() on all entries of this order and sets this orders subtotal to the sum
of the entry totals. this is called at start of calculate().JaloPriceFactoryException - if a pricefactory error ocurredprotected void recalculateEntries()
throws JaloPriceFactoryException
AbstractOrderEntry.recalculate() on all entries of this order and sets this orders subtotal to the
sum of the entry totals. this is called at start of recalculate().JaloPriceFactoryException - if a pricefactory error ocurredprotected PriceValue findPaymentCosts() throws JaloPriceFactoryException
calculate(), calculate(Date), recalculate() and
recalculate(Date) to fetch and set the payment costs for this order.
as default this method calls PaymentMode.getCost(AbstractOrder) when a payment mode was set. you may
override this method to implement different behavior. please note that at this time no order total have been
set ( except the order total which holds the entry total sum )so dont rely on these values.
JaloPriceFactoryExceptionprotected PriceValue findDeliveryCosts() throws JaloPriceFactoryException
calculate(), calculate(Date), recalculate() and
recalculate(Date) to fetch and set the delivery cost for this order.
As default this method calls DefaultDeliveryCostsStrategy.findDeliveryCosts(de.hybris.platform.jalo.SessionContext, de.hybris.platform.jalo.order.AbstractOrder) when a delivery mode was set.
You may override this method to implement different behavior. Please note that at this time no order total have
been set (Except the order total which holds the entry total sum) so dont rely on these values. You may
replace this strtegy by configuirng your spring.xml accordingly See: Configuration: core-spring.xml
bean id="core.orderManager" class="de.hybris.platform.jalo.order.OrderManager" scope="tenant"> <property name="deliveryCostsStrategy" ref="core.deliverycostsstrategy.default"/> /bean>
JaloPriceFactoryExceptionprotected List findGlobalDiscounts() throws JaloPriceFactoryException
calculate(), calculate(Date), recalculate() and
recalculate(Date) to fetch and set global discount values for this order.
As default this method calls
AbstractPriceFactory.getDiscountValues(AbstractOrder). you may
override this method to implement different behavior. please note that at this time no order total have been
set ( except the order total which holds the entry total sum )so dont rely on these values.
JaloPriceFactoryException@Deprecated public void calculateTotals(boolean recalculate) throws JaloPriceFactoryException
recalculate - forces setting total even if order is marked as calculatedJaloPriceFactoryExceptionprotected void calculateTotals(boolean recalculate,
Map<TaxValue,Map<Set<TaxValue>,Double>> taxValueMap)
throws JaloPriceFactoryException
recalculate - if false calculation is done only if the calculated flag is not settaxValueMap - the map { tax value -> Double( sum of all entry totals for this tax ) } obtainable via
calculateSubtotal(boolean)JaloPriceFactoryExceptionpublic Double getTotalDiscounts()
getTotalDiscounts in class GeneratedAbstractOrderprotected Map<TaxValue,Map<Set<TaxValue>,Double>> calculateSubtotal(boolean recalculate)
entry 1: base price = 10 EUR, tax values = [ VAT_FULL 19%, CUSTOM 2% ]
entry 2: base price = 20 EUR, tax values = [ VAT_FULL 19% ]
entry 3: base price = 30 EUR, tax values = [ VAT_HALF 7% ]
==>
{
VAT_FULL 19% -> {
( VAT_FULL 19% , CUSTOM 2% ) -> 10 EUR
( VAT_FULL 19% ) -> 20 EUR
}
VAT_HALF 7% -> {
( VAT_HALF 7% ) -> 30 EUR
}
CUSTOM 2% -> {
( VAT_FULL 19% , CUSTOM 2% ) -> 10 EUR
}
}
recalculate - protected void addRelativeEntryTaxValue(double entryTotal,
TaxValue taxValue,
Set<TaxValue> relativeEntryTaxValues,
Map<TaxValue,Map<Set<TaxValue>,Double>> taxValueMap)
protected void addAbsoluteEntryTaxValue(long entryQuantity,
TaxValue taxValue,
Map<TaxValue,Map<Set<TaxValue>,Double>> taxValueMap)
protected double calculateDiscountValues(boolean recalculate)
recalculate - true forces a recalculationprotected double calculateTotalTaxValues(boolean recalculate,
int digits,
double taxAdjustmentFactor,
Map<TaxValue,Map<Set<TaxValue>,Double>> taxValueMap)
recalculate - digits - taxAdjustmentFactor - taxValueMap - protected TaxValue calculateAbsoluteTotalTaxValue(Currency curr, String currencyIso, int digits, boolean net, TaxValue taxValue, double cumulatedEntryQuantities)
@Deprecated public void calculate() throws JaloPriceFactoryException
So this method will fetch prices, taxes and discounts for uncalculated or modified entries only - all other will remain unchanged. If at least one entry has been calculated or the order itself has been modified the totals will be calculated as well.
if you merely like to adjust totals while keeping prices, taxes and discounts you should call
calculateTotals(boolean) instead (e.g. if just a quantity has changed or prices have been imported and
cannot be found via price factory ).
JaloPriceFactoryException - if a pricefactory error occuredprotected void notifyDiscountsAboutCalculation()
protected void notifyDiscountsAboutRemoval()
protected Map resetAllValues() throws JaloPriceFactoryException
calculateSubtotal(boolean) - use this for further tax
calculation instead of calling calculateSubtotal(boolean) multiple timesJaloPriceFactoryExceptionprotected void resetAdditionalCosts(Collection<TaxValue> relativeTaxValues) throws JaloPriceFactoryException
JaloPriceFactoryException@Deprecated public void calculate(Date date) throws JaloPriceFactoryException
So this method will fetch prices, taxes and discounts for uncalculated or modified entries only - all other will remain unchanged. If at least one entry has been calculated or the order itself has been modified the totals will be calculated as well.
if you merely like to adjust totals while keeping prices, taxes and discounts you should call
calculateTotals(boolean) instead (e.g. if just a quantity has changed or prices have been imported and
cannot be found via price factory ).
date - assumes a given date to perform calculations for - be careful with that since this method will calculate
modified or uncalculated entries only, so the given date may not apply to all entries!JaloPriceFactoryException - if a pricefactory error occured@Deprecated public void recalculate() throws JaloPriceFactoryException
if you merely like to adjust totals while keeping prices, taxes and discounts you should call
calculateTotals(boolean) instead (e.g. if just a quantity has changed or prices have been imported and
cannot be found via price factory ).
JaloPriceFactoryException - if a pricefactory error occured@Deprecated public void recalculate(Date date) throws JaloPriceFactoryException
if you merely like to adjust totals while keeping prices, taxes and discounts you should call
calculateTotals(boolean) instead (e.g. if just a quantity has changed or prices have been imported and
cannot be found via price factory ).
date - the date to calculate prices forJaloPriceFactoryException - if a pricefactory error occured@Deprecated public void addDiscount(Discount discount)
GeneratedAbstractOrder.addToDiscounts(Discount)value via Discount.getDiscountValue(AbstractOrder). Unlike all calculated
values the discount collection is not cleared by (re)calculation !discount - the discount to assign@Deprecated public void removeDiscount(Discount discount)
GeneratedAbstractOrder.removeFromDiscounts(Discount)value via Discount.getDiscountValue(AbstractOrder). Unlike all calculated
values the discount collection is not cleared by (re)calculation !discount - the discount to unassignprotected void setChanged(boolean entriesToo)
public void remove(SessionContext ctx) throws ConsistencyCheckException
Item
This method is using the following attributes of the given SessionContext:
| CacheUsage | Language | StagingMethod | ||
|---|---|---|---|---|
| n/a (this is a setter method) | no, language doesn't matter for removal | yes if called on a StageableItem, no otherwise |
remove in class Itemctx - A SessionContext objectConsistencyCheckException - if this item could not be removed for some reasonpublic void setEntries(List<AbstractOrderEntry> value)
GeneratedAbstractOrderAbstractOrder.entries attribute.setEntries in class GeneratedAbstractOrdervalue - the entriespublic void setEntries(SessionContext ctx, List<AbstractOrderEntry> value)
GeneratedAbstractOrderAbstractOrder.entries attribute.setEntries in class GeneratedAbstractOrdervalue - the entriesCopyright © 2017 SAP SE. All Rights Reserved.