Package de.hybris.platform.jalo.order
Class Order
- All Implemented Interfaces:
Serializable,Comparable
- Direct Known Subclasses:
GeneratedReturnOrder,TestOrder
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).
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class de.hybris.platform.jalo.order.AbstractOrder
AbstractOrder.DELIVERY_STATUS, AbstractOrder.EXPORT_STATUS, AbstractOrder.ORDER_STATUS, AbstractOrder.PAYMENT_STATUSNested classes/interfaces inherited from class de.hybris.platform.jalo.GenericItem
GenericItem.GenericItemImplNested classes/interfaces inherited from class de.hybris.platform.jalo.c2l.LocalizableItem
LocalizableItem.LocalizableItemImplNested classes/interfaces inherited from class de.hybris.platform.jalo.ExtensibleItem
ExtensibleItem.ExtensibleItemImplNested classes/interfaces inherited from class de.hybris.platform.jalo.Item
Item.AttributeFilter, Item.AttributeMode, Item.CachedGetter, Item.CachedSetter, Item.ItemAttributeMap, Item.ItemConstraint, Item.ItemImpl, Item.JaloCachedComputationException -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Map<String,Item.AttributeMode> static final Stringde.hybris.platform.jalo.SearchContext parameter forOrderManager.searchOrders(de.hybris.platform.jalo.SearchContext).static final Stringde.hybris.platform.jalo.SearchContext parameter forOrderManager.searchOrders(de.hybris.platform.jalo.SearchContext).Fields inherited from class de.hybris.platform.jalo.order.GeneratedOrder
ENTRIESHANDLER, USERHANDLERFields inherited from class de.hybris.platform.jalo.order.AbstractOrder
APPEND_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_VALUESFields inherited from class de.hybris.platform.jalo.order.GeneratedAbstractOrder
CALCULATED, CODE, CURRENCY, DATE, DELIVERYADDRESS, DELIVERYCOST, DELIVERYMODE, DELIVERYSTATUS, DESCRIPTION, DISCOUNTS, DISCOUNTSINCLUDEDELIVERYCOST, DISCOUNTSINCLUDEPAYMENTCOST, ENTRIES, ENTRYGROUPS, 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, USERFields inherited from class de.hybris.platform.jalo.c2l.LocalizableItem
LANGUAGE_FALLBACK_ENABLEDFields inherited from class de.hybris.platform.jalo.Item
_CREATION_TIME_INTERNAL, _MODIFIED_TIME_INTERNAL, accessorLog, CREATION_TIME, DISABLE_ATTRIBUTE_CHECK, DISABLE_ITEMCHECK_BEFORE_REMOVABLE, EVEN, FEATURE_ACCESSMAP_QUALIFIER, HJMPTS, INITIAL_CREATION_FLAG, isJaloOnly, MODIFIED_TIME, NEGATIVE, NOT_FOUND, OWNER, PK, POSITIVE, SAVE_FROM_SERVICE_LAYER, staticTransientObjects, TYPEFields inherited from class de.hybris.platform.util.BridgeAbstraction
impl, tenant -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidchangeDeliveryAddress(SessionContext ctx, Address address, Address oldOne) protected voidchangePaymentAddress(SessionContext ctx, Address address, Address oldOne) protected voidchangePaymentInfo(SessionContext ctx, PaymentInfo info, PaymentInfo oldOne) protected AddresscopyAddressIfNecessary(SessionContext ctx, Address original) protected PaymentInfocopyPaymentInfoIfNecessary(SessionContext ctx, PaymentInfo original) protected ItemcreateItem(SessionContext ctx, ComposedType type, Item.ItemAttributeMap allAttributes) Has to be implemented for each concrete subtype of item.protected OrderEntrycreateNewEntry(SessionContext ctx, ComposedType entryType, Product product, long quantity, Unit unit, int position) protected Stringprotected Map<String,Item.AttributeMode> voidremove(SessionContext ctx) Removes this item.protected voidremoveOldCopyAddress(SessionContext ctx, Address oldOne) protected voidremoveOldCopyPaymentInfo(SessionContext ctx, PaymentInfo oldOne) voidsetDeliveryAddress(SessionContext ctx, Address address) Contrary toAbstractOrder.setDeliveryAddress(SessionContext, Address)this method copies the given address and assigns the copied address as delivery address!voidContrary toAbstractOrder.setDeliveryAddress(Address)this method copies the given address and assigns the copied address as delivery address!voidsetDeliveryAddressNoCopy(SessionContext ctx, Address address) Directly assigns the given address as delivery address without copying it.voidsetDeliveryAddressNoCopy(Address address) Directly assigns the given address as delivery address without copying it.voidsetPaymentAddress(SessionContext ctx, Address address) Contrary toAbstractOrder.setPaymentAddress(Address)this method copies the given address and assigns the copied address as payment address!voidsetPaymentAddress(Address adr) Contrary toAbstractOrder.setPaymentAddress(Address)this method copies the given address and assigns the copied address as payment address!voidsetPaymentAddressNoCopy(SessionContext ctx, Address address) Directly assigns the given address as payment address without copying it.voidsetPaymentAddressNoCopy(Address address) Directly assigns the given address as payment address without copying it.voidsetPaymentInfo(PaymentInfo info) Contrary toGeneratedAbstractOrder.setPaymentInfo(PaymentInfo)this method copies the given payment info and assigns the copy as info item!voidsetPaymentInfo(SessionContext ctx, PaymentInfo info) Contrary toGeneratedAbstractOrder.setPaymentInfo(SessionContext, PaymentInfo)this method copies the given payment info and assigns the copy as info item!voidDirectly assigns the given payment info without copying it.voidsetPaymentInfoNoCopy(SessionContext ctx, PaymentInfo info) Directly assigns the given payment info without copying it.Methods inherited from class de.hybris.platform.jalo.order.GeneratedOrder
addToEntries, addToEntries, getEntries, getEntries, removeFromEntries, removeFromEntries, setEntries, setEntriesMethods inherited from class de.hybris.platform.jalo.order.AbstractOrder
addAbsoluteEntryTaxValue, 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, tryToFindFallbackLanguageMethods inherited from class de.hybris.platform.jalo.order.GeneratedAbstractOrder
addToDiscounts, addToDiscounts, addToEntries, addToEntries, getCode, getCode, getCurrency, getCurrency, getDate, getDeliveryAddress, getDeliveryAddress, getDeliveryCost, getDeliveryCost, getDeliveryCostAsPrimitive, getDeliveryCostAsPrimitive, getDeliveryMode, getDeliveryMode, getDeliveryStatus, getDeliveryStatus, getDescription, getDescription, getDiscounts, getDiscounts, getDiscountsCount, getDiscountsCount, getEntryGroups, getEntryGroups, 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, isMarkModifiedDisabled, isNet, isNetAsPrimitive, isNetAsPrimitive, removeFromDiscounts, removeFromDiscounts, removeFromEntries, removeFromEntries, setCalculated, setCalculated, setCalculated, setCalculated, setDeliveryCost, setDeliveryCost, setDeliveryCost, setDescription, setDescription, setDiscounts, setDiscounts, setDiscountsIncludeDeliveryCost, setDiscountsIncludeDeliveryCost, setDiscountsIncludeDeliveryCost, setDiscountsIncludePaymentCost, setDiscountsIncludePaymentCost, setDiscountsIncludePaymentCost, setEntryGroups, setEntryGroups, 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, setTotalTaxValuesInternalMethods inherited from class de.hybris.platform.jalo.GenericItem
getImplementation, getInitialProperties, getNonInitialAttributes, getRelatedItems, getRelatedItems, setRelatedItemsMethods inherited from class de.hybris.platform.jalo.c2l.LocalizableItem
getAllLocalizedProperties, getAllLocalizedProperties, getAllLocalizedProperties, getAllLocalizedProperties, getAllValuesSessionContext, getLocalizedProperty, getLocalizedProperty, getLocalizedPropertyInternal, getLocalizedPropertyNames, getLocalizedPropertyNames, hasLanguage, isEmptyValue, isFallbackEnabled, removeLocalizedProperty, removeLocalizedProperty, setAllLocalizedProperties, setAllLocalizedProperties, setLocalizedProperty, setLocalizedPropertyMethods inherited from class de.hybris.platform.jalo.ExtensibleItem
createNonClassAccessor, getAllProperties, getAllProperties, getProperty, getProperty, getPropertyNames, getPropertyNames, removeProperty, removeProperty, setAllProperties, setAllProperties, setProperty, setPropertyMethods inherited from class de.hybris.platform.jalo.Item
addLinkedItems, 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, getPartOfRemovedSessionMarker, 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, notifyManagerAboutItemRemoval, readResolve, 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, suppressRelation, toString, useTA, writeReplaceMethods inherited from class de.hybris.platform.util.BridgeAbstraction
setTenant
-
Field Details
-
DEFAULT_INITIAL_ATTRIBUTES
-
START_DATE
de.hybris.platform.jalo.SearchContext parameter forOrderManager.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!
- See Also:
-
END_DATE
de.hybris.platform.jalo.SearchContext parameter forOrderManager.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!
- See Also:
-
-
Constructor Details
-
Order
public Order()
-
-
Method Details
-
createItem
protected Item createItem(SessionContext ctx, ComposedType type, Item.ItemAttributeMap allAttributes) throws JaloBusinessException Description copied from class:ItemHas to be implemented for each concrete subtype of item. This method is responsible for creating a new item instance ( by calling managers, ejb homes, etc. ) duringComposedType.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; }- Overrides:
createItemin classGeneratedOrder- Parameters:
ctx- 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 )- Returns:
- the new item instance
- Throws:
JaloBusinessException- indicates an error during creation - any changes will be rollbacked
-
getDefaultAttributeModes
- Overrides:
getDefaultAttributeModesin classGeneratedOrder
-
getAbstractOrderEntryTypeCode
- Specified by:
getAbstractOrderEntryTypeCodein classAbstractOrder
-
setPaymentAddress
Contrary toAbstractOrder.setPaymentAddress(Address)this method copies the given address and assigns the copied address as payment address!- Overrides:
setPaymentAddressin classAbstractOrder- Parameters:
adr- the address to create a copy of which is assigned as payment address
-
setPaymentAddressNoCopy
Directly assigns the given address as payment address without copying it. Please be aware that this may the address data cannot be protected against changes since it may still belong to the user and subject to his modifications.- Parameters:
address- the address to assign
-
setPaymentAddress
Contrary toAbstractOrder.setPaymentAddress(Address)this method copies the given address and assigns the copied address as payment address!- Overrides:
setPaymentAddressin classAbstractOrder- Parameters:
ctx- the session contextaddress- the address to create a copy of which is assigned as payment address
-
changePaymentAddress
-
removeOldCopyAddress
-
copyAddressIfNecessary
-
removeOldCopyPaymentInfo
-
copyPaymentInfoIfNecessary
-
setPaymentAddressNoCopy
Directly assigns the given address as payment address without copying it. Please be aware that this may the address data cannot be protected against changes since it may still belong to the user and subject to his modifications.- Parameters:
ctx- the session contextaddress- the address to assign
-
setDeliveryAddress
Contrary toAbstractOrder.setDeliveryAddress(Address)this method copies the given address and assigns the copied address as delivery address!- Overrides:
setDeliveryAddressin classAbstractOrder- Parameters:
adr- the address to create a copy of which is assigned as delivery address
-
setDeliveryAddressNoCopy
Directly assigns the given address as delivery address without copying it. Please be aware that this may the address data cannot be protected against changes since it may still belong to the user and subject to his modifications.- Parameters:
address- the address to assign
-
setDeliveryAddress
Contrary toAbstractOrder.setDeliveryAddress(SessionContext, Address)this method copies the given address and assigns the copied address as delivery address!- Overrides:
setDeliveryAddressin classAbstractOrder- Parameters:
ctx- the session contextaddress- the address to create a copy of which is assigned as delivery address
-
changeDeliveryAddress
-
setDeliveryAddressNoCopy
Directly assigns the given address as delivery address without copying it. Please be aware that this may the address data cannot be protected against changes since it may still belong to the user and subject to his modifications.- Parameters:
ctx- the session contextaddress- the address to assign
-
setPaymentInfo
Contrary toGeneratedAbstractOrder.setPaymentInfo(PaymentInfo)this method copies the given payment info and assigns the copy as info item!- Overrides:
setPaymentInfoin classGeneratedAbstractOrder- Parameters:
info- the payment info to create a copy of which is assigned as info
-
setPaymentInfoNoCopy
Directly assigns the given payment info without copying it. Please be aware that this may the info data cannot be protected against changes since it may still belong to the user and subject to his modifications.- Parameters:
info- the payment info to assign
-
setPaymentInfo
Contrary toGeneratedAbstractOrder.setPaymentInfo(SessionContext, PaymentInfo)this method copies the given payment info and assigns the copy as info item!- Overrides:
setPaymentInfoin classGeneratedAbstractOrder- Parameters:
ctx- the session contextinfo- the payment info to create a copy of which is assigned as info
-
changePaymentInfo
-
setPaymentInfoNoCopy
Directly assigns the given payment info without copying it. Please be aware that this may the info data cannot be protected against changes since it may still belong to the user and subject to his modifications.- Parameters:
ctx- the session contextinfo- the payment info to assign
-
createNewEntry
protected OrderEntry createNewEntry(SessionContext ctx, ComposedType entryType, Product product, long quantity, Unit unit, int position) - Specified by:
createNewEntryin classAbstractOrder
-
remove
Description copied from class:ItemRemoves this 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
- Overrides:
removein classAbstractOrder- Parameters:
ctx- A SessionContext object- Throws:
ConsistencyCheckException- if this item could not be removed for some reason
-