public class Order extends GeneratedOrder
The concrete order class of the hybris Platform. These objects are stored and managed by OrderManager.
This class also defined search context parameter for
OrderManager.searchOrders(de.hybris.platform.jalo.SearchContext).
AbstractOrder.DELIVERY_STATUS, AbstractOrder.EXPORT_STATUS, AbstractOrder.ORDER_STATUS, AbstractOrder.PAYMENT_STATUSGenericItem.GenericItemImplLocalizableItem.LocalizableItemImplExtensibleItem.ExtensibleItemImplItem.AttributeFilter, Item.AttributeMode, Item.CachedGetter, Item.CachedSetter, Item.ItemAttributeMap, Item.ItemConstraint, Item.ItemImpl, Item.JaloCachedComputationException| Modifier and Type | Field and Description |
|---|---|
protected static Map<String,Item.AttributeMode> |
DEFAULT_INITIAL_ATTRIBUTES |
static String |
END_DATE
de.hybris.platform.jalo.SearchContext parameter for
OrderManager.searchOrders(de.hybris.platform.jalo.SearchContext). |
static String |
START_DATE
de.hybris.platform.jalo.SearchContext parameter for
OrderManager.searchOrders(de.hybris.platform.jalo.SearchContext). |
ENTRIESHANDLER, USERHANDLERAPPEND_AS_LAST, CFG_TAX_FREE_ENTRIES_SUPPORT, DELIVERY_ADDRESS, DELIVERY_COST, DELIVERY_MODE, DELIVERY_STATUS, DELIVERY_STATUS_TYPE, EXPORT_STATUS, EXPORT_STATUS_TYPE, GLOBAL_DISCOUNT_VALUES, ORDER_DISCOUNT_RELATION_NAME, ORDER_STATUS_TYPE, PAYMENT_ADDRESS, PAYMENT_COST, PAYMENT_INFO, PAYMENT_MODE, PAYMENT_STATUS, PAYMENT_STATUS_TYPE, STATUS_INFO, TOTAL, TOTAL_DISCOUNTS, TOTAL_TAX, TOTAL_TAX_VALUESCALCULATED, CODE, CURRENCY, DATE, DELIVERYADDRESS, DELIVERYCOST, DELIVERYMODE, DELIVERYSTATUS, DESCRIPTION, DISCOUNTS, DISCOUNTSINCLUDEDELIVERYCOST, DISCOUNTSINCLUDEPAYMENTCOST, ENTRIES, 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 |
|---|
Order() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
changeDeliveryAddress(SessionContext ctx,
Address address,
Address oldOne) |
protected void |
changePaymentAddress(SessionContext ctx,
Address address,
Address oldOne) |
protected void |
changePaymentInfo(SessionContext ctx,
PaymentInfo info,
PaymentInfo oldOne) |
protected Address |
copyAddressIfNecessary(SessionContext ctx,
Address original) |
protected PaymentInfo |
copyPaymentInfoIfNecessary(SessionContext ctx,
PaymentInfo original) |
protected Item |
createItem(SessionContext ctx,
ComposedType type,
Item.ItemAttributeMap allAttributes)
Has to be implemented for each concrete subtype of item.
|
protected OrderEntry |
createNewEntry(SessionContext ctx,
ComposedType entryType,
Product product,
long quantity,
Unit unit,
int position) |
protected String |
getAbstractOrderEntryTypeCode() |
protected Map<String,Item.AttributeMode> |
getDefaultAttributeModes() |
void |
remove(SessionContext ctx)
Removes this item.
|
protected void |
removeOldCopyAddress(SessionContext ctx,
Address oldOne) |
protected void |
removeOldCopyPaymentInfo(SessionContext ctx,
PaymentInfo oldOne) |
void |
setDeliveryAddress(Address adr)
Contrary to
AbstractOrder.setDeliveryAddress(Address) this method copies the given address and assigns the
copied address as delivery address! |
void |
setDeliveryAddress(SessionContext ctx,
Address address)
Contrary to
AbstractOrder.setDeliveryAddress(SessionContext, Address) this method copies the given address
and assigns the copied address as delivery address! |
void |
setDeliveryAddressNoCopy(Address address)
Directly assigns the given address as delivery address without copying it.
|
void |
setDeliveryAddressNoCopy(SessionContext ctx,
Address address)
Directly assigns the given address as delivery address without copying it.
|
void |
setPaymentAddress(Address adr)
Contrary to
AbstractOrder.setPaymentAddress(Address) this method copies the given address and assigns the
copied address as payment address! |
void |
setPaymentAddress(SessionContext ctx,
Address address)
Contrary to
AbstractOrder.setPaymentAddress(Address) this method copies the given address and assigns the
copied address as payment address! |
void |
setPaymentAddressNoCopy(Address address)
Directly assigns the given address as payment address without copying it.
|
void |
setPaymentAddressNoCopy(SessionContext ctx,
Address address)
Directly assigns the given address as payment address without copying it.
|
void |
setPaymentInfo(PaymentInfo info)
Contrary to
GeneratedAbstractOrder.setPaymentInfo(PaymentInfo) this method copies the given payment info and
assigns the copy as info item! |
void |
setPaymentInfo(SessionContext ctx,
PaymentInfo info)
Contrary to
GeneratedAbstractOrder.setPaymentInfo(SessionContext, PaymentInfo) this method copies the given payment
info and assigns the copy as info item! |
void |
setPaymentInfoNoCopy(PaymentInfo info)
Directly assigns the given payment info without copying it.
|
void |
setPaymentInfoNoCopy(SessionContext ctx,
PaymentInfo info)
Directly assigns the given payment info without copying it.
|
addToEntries, addToEntries, getEntries, getEntries, removeFromEntries, removeFromEntries, setEntries, setEntriesaddAbsoluteEntryTaxValue, addAllGlobalDiscountValues, addAllGlobalDiscountValues, addAllTotalTaxValues, addAllTotalTaxValues, addDiscount, addGlobalDiscountValue, addGlobalDiscountValue, addNewEntry, addNewEntry, addNewEntry, addNewEntry, addRelativeEntryTaxValue, addTotalTaxValue, addTotalTaxValue, calculate, calculate, calculateAbsoluteTotalTaxValue, calculateDiscountValues, calculateEntries, calculateSubtotal, calculateTotals, calculateTotals, calculateTotalTaxValues, convertDiscountValues, createEntryInformation, createNewDeliveryAddress, createNewDeliveryAddress, createNewEntryNumber, createNewPaymentAddress, createNewPaymentAddress, discountsIncludeDeliveryCosts, discountsIncludePaymentCosts, doSetDeliveryAddress, doSetPaymentAddress, findDeliveryCosts, findGlobalDiscounts, findPaymentCosts, getAllEntries, getAttributeValue, getCustomEntryType, getDate, getDeliveryCosts, getDeliveryCosts, getEntries, getEntriesByProduct, getEntry, getGlobalDiscountValues, getGlobalDiscountValues, getNewEntryNumberForAppending, getNextEntryNumber, getPaymentCosts, getPaymentCosts, getTotal, getTotal, getTotalDiscounts, getTotalTax, getTotalTaxValues, getTotalTaxValues, isCalculated, isCalculated, isNet, notifyDiscountsAboutCalculation, notifyDiscountsAboutRemoval, recalculate, recalculate, recalculateEntries, removeAllEntries, removeAllGlobalDiscountValues, removeAllGlobalDiscountValues, removeAllTotalTaxValues, removeAllTotalTaxValues, removeDiscount, removeEntries, removeEntry, removeGlobalDiscountValue, removeGlobalDiscountValue, removeTotalTaxValue, removeTotalTaxValue, resetAdditionalCosts, resetAllValues, setAllEntries, setChanged, setCode, setCode, setComposedType, setCurrency, setCurrency, setDate, setDate, setDeliveryCost, setDeliveryCosts, setDeliveryCosts, setDeliveryMode, setDeliveryMode, setDeliveryStatus, setDeliveryStatus, setDiscountsIncludeDeliveryCost, setDiscountsIncludeDeliveryCosts, setDiscountsIncludePaymentCost, setDiscountsIncludePaymentCosts, setGlobalDiscountValues, setGlobalDiscountValues, setNet, setNet, setPaymentCost, setPaymentCosts, setPaymentCosts, setPaymentMode, setPaymentMode, setPaymentStatus, setPaymentStatus, setStatus, setStatus, setTotal, setTotal, setTotalTaxValues, setTotalTaxValues, setUser, setUser, shuffleEntriesOnInsertNew, tryToFindFallbackLanguageaddToDiscounts, addToDiscounts, addToEntries, addToEntries, getCode, getCode, getCurrency, getCurrency, getDate, 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, 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, setTenantprotected static final Map<String,Item.AttributeMode> DEFAULT_INITIAL_ATTRIBUTES
public static final String START_DATE
OrderManager.searchOrders(de.hybris.platform.jalo.SearchContext). Describes the start date of daterange to
search orders within .
Do not use this constant for searching via FlexibleSearch since it does not describe an order attribute!
public static final String END_DATE
OrderManager.searchOrders(de.hybris.platform.jalo.SearchContext). Describes the end date of daterange to
search orders within .
Do not use this constant for searching via FlexibleSearch since it does not describe an order attribute!
protected 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 GeneratedOrderctx - 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 Map<String,Item.AttributeMode> getDefaultAttributeModes()
getDefaultAttributeModes in class GeneratedOrderprotected String getAbstractOrderEntryTypeCode()
getAbstractOrderEntryTypeCode in class AbstractOrderpublic void setPaymentAddress(Address adr)
AbstractOrder.setPaymentAddress(Address) this method copies the given address and assigns the
copied address as payment address!setPaymentAddress in class AbstractOrderadr - the address to create a copy of which is assigned as payment addresspublic void setPaymentAddressNoCopy(Address address)
address - the address to assignpublic void setPaymentAddress(SessionContext ctx, Address address)
AbstractOrder.setPaymentAddress(Address) this method copies the given address and assigns the
copied address as payment address!setPaymentAddress in class AbstractOrderctx - the session contextaddress - the address to create a copy of which is assigned as payment addressprotected void changePaymentAddress(SessionContext ctx, Address address, Address oldOne)
protected void removeOldCopyAddress(SessionContext ctx, Address oldOne)
protected Address copyAddressIfNecessary(SessionContext ctx, Address original)
protected void removeOldCopyPaymentInfo(SessionContext ctx, PaymentInfo oldOne)
protected PaymentInfo copyPaymentInfoIfNecessary(SessionContext ctx, PaymentInfo original)
public void setPaymentAddressNoCopy(SessionContext ctx, Address address)
ctx - the session contextaddress - the address to assignpublic void setDeliveryAddress(Address adr)
AbstractOrder.setDeliveryAddress(Address) this method copies the given address and assigns the
copied address as delivery address!setDeliveryAddress in class AbstractOrderadr - the address to create a copy of which is assigned as delivery addresspublic void setDeliveryAddressNoCopy(Address address)
address - the address to assignpublic void setDeliveryAddress(SessionContext ctx, Address address)
AbstractOrder.setDeliveryAddress(SessionContext, Address) this method copies the given address
and assigns the copied address as delivery address!setDeliveryAddress in class AbstractOrderctx - the session contextaddress - the address to create a copy of which is assigned as delivery addressprotected void changeDeliveryAddress(SessionContext ctx, Address address, Address oldOne)
public void setDeliveryAddressNoCopy(SessionContext ctx, Address address)
ctx - the session contextaddress - the address to assignpublic void setPaymentInfo(PaymentInfo info)
GeneratedAbstractOrder.setPaymentInfo(PaymentInfo) this method copies the given payment info and
assigns the copy as info item!setPaymentInfo in class GeneratedAbstractOrderinfo - the payment info to create a copy of which is assigned as infopublic void setPaymentInfoNoCopy(PaymentInfo info)
info - the payment info to assignpublic void setPaymentInfo(SessionContext ctx, PaymentInfo info)
GeneratedAbstractOrder.setPaymentInfo(SessionContext, PaymentInfo) this method copies the given payment
info and assigns the copy as info item!setPaymentInfo in class GeneratedAbstractOrderctx - the session contextinfo - the payment info to create a copy of which is assigned as infoprotected void changePaymentInfo(SessionContext ctx, PaymentInfo info, PaymentInfo oldOne)
public void setPaymentInfoNoCopy(SessionContext ctx, PaymentInfo info)
ctx - the session contextinfo - the payment info to assignprotected OrderEntry createNewEntry(SessionContext ctx, ComposedType entryType, Product product, long quantity, Unit unit, int position)
createNewEntry in class AbstractOrderpublic 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 AbstractOrderctx - A SessionContext objectConsistencyCheckException - if this item could not be removed for some reasonCopyright © 2017 SAP SE. All Rights Reserved.