Class OrderImpl
- java.lang.Object
-
- de.hybris.platform.sap.core.bol.businessobject.BusinessObjectBase
-
- de.hybris.platform.sap.sapordermgmtbol.transaction.businessobject.impl.SimpleDocumentImpl<L,I,H>
-
- de.hybris.platform.sap.sapordermgmtbol.transaction.businessobject.impl.SalesDocumentBaseImpl<ItemList,Item,Header>
-
- de.hybris.platform.sap.sapordermgmtbol.transaction.salesdocument.businessobject.impl.SalesDocumentImpl
-
- de.hybris.platform.sap.sapordermgmtbol.transaction.order.businessobject.impl.OrderImpl
-
- All Implemented Interfaces:
BackendAware,BusinessObject,MessageListHolder,Order,SalesDocument,SalesDocumentBase<ItemList,Item,Header>,SimpleDocument<ItemList,Item,Header>,java.io.Serializable,java.lang.Cloneable,java.lang.Iterable<Item>
- Direct Known Subclasses:
OrderHistoryImpl
public class OrderImpl extends SalesDocumentImpl implements Order
Class representing the BOL order.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected SalesDocumentBackendbackendServiceGuestBackend service / guest scenariostatic Log4JWrappersapLoggerreference to SAP logging API-
Fields inherited from class de.hybris.platform.sap.sapordermgmtbol.transaction.salesdocument.businessobject.impl.SalesDocumentImpl
alreadyInitialized, backendService, checkCatalogNecessary, determinationRequired, externalToOrder, grossValueAvailable, itemsWithAlternativeProductList, netValueAvailable, pricesTraced, redemptionValue, transactionConfiguration
-
Fields inherited from class de.hybris.platform.sap.sapordermgmtbol.transaction.businessobject.impl.SalesDocumentBaseImpl
billToList, changeHeaderOnly, persistentInBackend, shipToList
-
Fields inherited from class de.hybris.platform.sap.core.bol.businessobject.BusinessObjectBase
backendObject, backendType, bobMessages, bobState, extensionData, genericFactory, handle, moduleConfigurationAccess, techKey
-
Fields inherited from interface de.hybris.platform.sap.core.common.message.MessageListHolder
INVALID, VALID
-
Fields inherited from interface de.hybris.platform.sap.sapordermgmtbol.transaction.businessobject.interf.SalesDocumentBase
NO_OF_ITEMS_UNKNOWN
-
-
Constructor Summary
Constructors Constructor Description OrderImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()Makes a copy of the object.voiddestroy()Method will be called by theBusinessObjectManagerwhen the end of the life cycle is reached, so that all used resources can be released.voiddestroyContent()Destroy the data of the document (items and header) in the backend representation.protected SalesDocumentBackendgetBackendService()Method retrieving the backend object for the object.TechKeygetBasketId()Returns the TechKey of the basket used for creating this order.booleanisCancelable()Checks if the order is cancelablebooleansaveAndCommit()Saves the order in the backend.booleansaveOrderAndCommit()Saves the order in the backend.voidsetBackendService(OrderBackend service)This method can be used to set a fixed back end service (e.g.voidsetBasketId(TechKey basketId)Sets the TechKey of basket used for creating this ordervoidsetLoadStateCreate()Sets the creation mode of LO-API.-
Methods inherited from class de.hybris.platform.sap.sapordermgmtbol.transaction.salesdocument.businessobject.impl.SalesDocumentImpl
adaptHeaderDocumentType, addShipTo, afterDeleteItemInBackend, afterDeleteItemInBackend, afterUpdateItemInBackend, clearItemBuffer, clearShipTos, createBillTo, createInBackend, createItem, createItemKey, createShipTo, deleteItemInt, determineConfigurableItemsToRelease, emptyContent, getDocumentType, getDublicatesForItems, getSalesDocumentHooks, getSessionService, getSoldToGuid, getTransactionConfiguration, hasPredecessorOfSpecificType, init, init, init, isBackendDown, isCheckCatalogNecessary, isDeterminationRequired, isExistingInBackend, isExternalToOrder, isGrossValueAvailable, isInitialized, isItemBasedAvailability, isMultipleAddressesSupported, isNetValueAvailable, isUpdateMissing, mergeIdenticalProducts, mergeIdenticalProductsIfRequired, mergingItem, prepareItemsWithChangedProducts, processItems, read, read, readForUpdate, readForUpdate, removeItem, removeItems, setBillToList, setCheckCatalogNecessary, setConverter, setDeterminationRequired, setExternalToOrder, setGrossValueAvailable, setInitialized, setNetValueAvailable, setSalesDocumentHooks, setSessionService, setShipToList, setSoldToGuid, setSoldToGuid, setTransactionConfiguration, setUpdateMissing, toString, update, updateInBackend, validate
-
Methods inherited from class de.hybris.platform.sap.sapordermgmtbol.transaction.businessobject.impl.SalesDocumentBaseImpl
clear, getAlternativeBillTos, getAlternativeShipTos, isChangeHeaderOnly, isPersistentInBackend, setPersistentInBackend
-
Methods inherited from class de.hybris.platform.sap.sapordermgmtbol.transaction.businessobject.impl.SimpleDocumentImpl
addItem, clearHeader, clearItems, clearMessages, getApplicationId, getChangeDate, getHeader, getItem, getItemList, getTypedExtensionMap, getVersion, isDirty, iterator, setApplicationId, setChangeDate, setDirty, setHeader, setItemList, setTechKey, setVersion
-
Methods inherited from class de.hybris.platform.sap.core.bol.businessobject.BusinessObjectBase
addExtensionData, addMessage, clearMessages, clearOwnMessages, copyMessages, copyMessages, createUniqueHandle, determineBackendObject, equals, getBackendBusinessObject, getBackendBusinessObject, getBackendType, getExtensionData, getExtensionDataValues, getExtensionMap, getHandle, getMessageList, getModuleConfigurationAccess, getOwnMessageList, getSubObjectIterator, getTechKey, hasHandle, hashCode, hasMessages, hasOwnMessages, init, isValid, logMessage, removeExtensionData, removeExtensionDataValues, setBackendObject, setBackendType, setExtensionMap, setGenericFactory, setHandle, setInvalid, setModuleConfigurationAccess, setValid
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface de.hybris.platform.sap.core.bol.businessobject.BusinessObject
addExtensionData, clearMessages, clearOwnMessages, copyMessages, copyMessages, createUniqueHandle, getExtensionData, getExtensionDataValues, getExtensionMap, getHandle, getOwnMessageList, getSubObjectIterator, getTechKey, hasHandle, hasMessages, hasOwnMessages, init, isValid, logMessage, removeExtensionData, removeExtensionDataValues, setExtensionMap, setHandle, setInvalid, setTechKey, setValid
-
Methods inherited from interface de.hybris.platform.sap.core.common.message.MessageListHolder
addMessage, clearMessages, getMessageList
-
Methods inherited from interface de.hybris.platform.sap.sapordermgmtbol.transaction.businessobject.interf.SalesDocument
afterDeleteItemInBackend, clearItemBuffer, clearShipTos, createBillTo, createItem, createShipTo, getDocumentType, getTransactionConfiguration, hasPredecessorOfSpecificType, init, init, isBackendDown, isCheckCatalogNecessary, isExistingInBackend, isExternalToOrder, isGrossValueAvailable, isInitialized, isItemBasedAvailability, isMultipleAddressesSupported, isNetValueAvailable, isUpdateMissing, read, read, readForUpdate, readForUpdate, removeItem, removeItems, setBillToList, setCheckCatalogNecessary, setConverter, setExternalToOrder, setGrossValueAvailable, setInitialized, setNetValueAvailable, setShipToList, setSoldToGuid, setTransactionConfiguration, setUpdateMissing, update, validate
-
Methods inherited from interface de.hybris.platform.sap.sapordermgmtbol.transaction.businessobject.interf.SalesDocumentBase
getAlternativeBillTos, getAlternativeShipTos, isChangeHeaderOnly, isDeterminationRequired, isPersistentInBackend, setDeterminationRequired, setPersistentInBackend
-
Methods inherited from interface de.hybris.platform.sap.sapordermgmtbol.transaction.businessobject.interf.SimpleDocument
addItem, clear, clearHeader, clearItems, getApplicationId, getChangeDate, getHeader, getItem, getItemList, getSoldToGuid, getTypedExtensionMap, getVersion, isDirty, setApplicationId, setChangeDate, setDirty, setHeader, setItemList, setSoldToGuid, setVersion
-
-
-
-
Field Detail
-
backendServiceGuest
protected SalesDocumentBackend backendServiceGuest
Backend service / guest scenario
-
sapLogger
public static final Log4JWrapper sapLogger
reference to SAP logging API
-
-
Method Detail
-
getBasketId
public TechKey getBasketId()
Returns the TechKey of the basket used for creating this order.- Specified by:
getBasketIdin interfaceOrder- Returns:
- TechKey of Basket
-
setBasketId
public void setBasketId(TechKey basketId)
Sets the TechKey of basket used for creating this order- Specified by:
setBasketIdin interfaceOrder- Parameters:
basketId- TechKey of the basket
-
saveAndCommit
public boolean saveAndCommit() throws CommunicationExceptionSaves the order in the backend.- Specified by:
saveAndCommitin interfaceSalesDocument- Specified by:
saveAndCommitin classSalesDocumentImpl- Returns:
- true if the save and commit was successful
- Throws:
CommunicationException
-
saveOrderAndCommit
public boolean saveOrderAndCommit() throws CommunicationExceptionSaves the order in the backend.- Specified by:
saveOrderAndCommitin interfaceOrder- Returns:
- true if the save and commit were successful
- Throws:
CommunicationException- in case of a back-end error
-
destroyContent
public void destroyContent() throws CommunicationExceptionDescription copied from interface:SalesDocumentDestroy the data of the document (items and header) in the backend representation. After a call to this method, the object is in an undefined state. You have to call init() before you can use it again.
This method is normally called before removing the BO-representation of the object using the BOM.- Specified by:
destroyContentin interfaceOrder- Specified by:
destroyContentin interfaceSalesDocument- Overrides:
destroyContentin classSalesDocumentImpl- Throws:
CommunicationException- in case back-end error
-
getBackendService
protected SalesDocumentBackend getBackendService() throws BackendException
Description copied from class:SalesDocumentImplMethod retrieving the backend object for the object. This method is abstract because every concrete subclass ofSalesDocumentmay use its own implementation of a backend object.- Specified by:
getBackendServicein classSalesDocumentImpl- Returns:
- Backend object to be used
- Throws:
BackendException
-
setBackendService
public void setBackendService(OrderBackend service)
This method can be used to set a fixed back end service (e.g. mock it)- Parameters:
service- back end service to be used by this order
-
setLoadStateCreate
public void setLoadStateCreate() throws BusinessObjectExceptionDescription copied from interface:OrderSets the creation mode of LO-API. It is only used in ERP scenario.- Specified by:
setLoadStateCreatein interfaceOrder- Throws:
BusinessObjectException- in case of a back-end error
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedExceptionDescription copied from class:BusinessObjectBaseMakes a copy of the object. The MessageList is copied.- Overrides:
clonein classBusinessObjectBase- Returns:
- a copy of object
- Throws:
java.lang.CloneNotSupportedException-CloneNotSupportedException
-
destroy
public void destroy()
Description copied from class:SalesDocumentBaseImplMethod will be called by theBusinessObjectManagerwhen the end of the life cycle is reached, so that all used resources can be released.- Specified by:
destroyin interfaceBusinessObject- Overrides:
destroyin classSalesDocumentImpl
-
isCancelable
public boolean isCancelable() throws CommunicationExceptionDescription copied from interface:OrderChecks if the order is cancelable- Specified by:
isCancelablein interfaceOrder- Returns:
- true if order is cancelable
- Throws:
CommunicationException- in case of a back-end error
-
-