Class OrderBaseERP
- java.lang.Object
-
- de.hybris.platform.sap.core.bol.backend.BackendBusinessObjectBase
-
- de.hybris.platform.sap.core.bol.backend.jco.BackendBusinessObjectBaseJCo
-
- de.hybris.platform.sap.sapordermgmtbol.transaction.salesdocument.backend.impl.erp.IsaBackendBusinessObjectBaseSalesERP
-
- de.hybris.platform.sap.sapordermgmtbol.transaction.salesdocument.backend.impl.erp.SalesDocumentERP
-
- de.hybris.platform.sap.sapordermgmtbol.transaction.order.backend.impl.erp.OrderBaseERP
-
- All Implemented Interfaces:
BackendBusinessObject,BackendBusinessObjectJCo,OrderBaseBackend,BackendState,SalesDocumentBackend
- Direct Known Subclasses:
OrderERP,OrderHistoryERP
public abstract class OrderBaseERP extends SalesDocumentERP implements OrderBaseBackend
Back end Object representing an ERP Order document
-
-
Field Summary
Fields Modifier and Type Field Description protected ConnectedDocumentquotationPredecessorDocumentWhen the order is created with a reference to a quotation, the following reads of the order do not return docflow entries as long as the order was not saved.-
Fields inherited from class de.hybris.platform.sap.sapordermgmtbol.transaction.salesdocument.backend.impl.erp.SalesDocumentERP
additionalPricing, createProcess, deliveryPriority, erroneous, getAllStrategy, headerCondTypeFreight, isIncompletionLogRequested, isUMEDisabledWarningNecessary, itemVariantMap, lrdActionsStrategy, ORDER_HEADER_STRUCTURE, ORDER_ITEM_STRUCTURE, RESOURCE_KEY, setStrategy, showInlineConfig, STRATEGY_FACTORY_ERP, transactionConfiguration
-
Fields inherited from class de.hybris.platform.sap.sapordermgmtbol.transaction.salesdocument.backend.impl.erp.IsaBackendBusinessObjectBaseSalesERP
docflowRead, headerDocFlow, headerPriceAttribs, headerPropMap, itemConfigChangeableMap, itemDocFlow, itemsPriceAttribMap, itemsPropMap, loadState, messageBufferMap, predecessorShipTo, savedItemsMap, setIpcPriceAttributes, shipToMap
-
Fields inherited from class de.hybris.platform.sap.core.bol.backend.BackendBusinessObjectBase
genericFactory, moduleConfigurationAccess
-
-
Constructor Summary
Constructors Constructor Description OrderBaseERP()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SalesDocumentTypegetSalesDocumentType()Each implementing class has to define the used sales document type.booleanisCancelable(Order order)The ERP order can be canceled if the overall status is opened or if the overall status is in process , but not shipped, not billed and no delivery created for the any position can be cancelled.booleansaveInBackend(Order ordr, boolean commit)Saves the order in the backend.
The order will be saved in the backend.protected booleansaveOrder(Order ordr, boolean commit)Saves the order in the backend and returns, if it was successufull.intsaveOrderInBackend(Order ordr, boolean commit)Copies the basket object to the order objectvoidsetLoadStateCreate()Sets the Load State of LO-API to "create" mode.voidupdateInBackend(SalesDocument salesDocument, TransactionConfiguration shop)Update object in the backend by putting the data into the underlying storage.-
Methods inherited from class de.hybris.platform.sap.sapordermgmtbol.transaction.salesdocument.backend.impl.erp.SalesDocumentERP
addErroneousItem, afterReadFromBackend, afterWriteDocument, checkForInitializationError, checkShippingConditions, clearErroneousItems, clearItemBuffer, closeBackendSession, createInBackend, createInBackend, deleteItemInBackend, deleteItemsInBackend, emptyInBackend, executeAdditionalPricing, fixErroneousHeader, fixErroneousItem, getAdditionalPricing, getCloseStrategy, getErroneousHeader, getErroneousItems, getGetAllStrategy, getItemBuffer, getItemVariantMap, getLrdActionsStrategy, getModuleConfigurationAccess, getPayerHandle, getSalesDocumentERPHooks, getSetStrategy, getShippingCondition, getSoldToHandle, handleInvalidHeaderAfterRead, handleInvalidHeaderAfterUpdate, handleInvalidHeaderBeforeUpdate, handleInvalidItems, handleInvalidItemsAfterRead, handleInvalidItemsAfterUpdate, initBackendObject, isBackendDown, isCreateProcess, isDocumentInitial, isErroneous, isInBackend, isItemBasedAvailability, isMultipleAddressesSupported, prepareForValidation, readForUpdateFromBackend, readFromBackend, recoverFromBackend, removeErroneousItems, restoreErroneousHeaderAfterRead, restoreErroneousHeaderAfterSet, restoreErroneousItem, setAdditionalPricing, setCloseStrategy, setDocumentInitial, setErroneous, setErroneousHeader, setGData, setGetAllStrategy, setItemBuffer, setLrdActionsStrategy, setPayerHandle, setSalesDocumentERPHooks, setSetStrategy, setShippingCondition, setSoldToHandle, updateInBackend, updateInBackend, validate
-
Methods inherited from class de.hybris.platform.sap.sapordermgmtbol.transaction.salesdocument.backend.impl.erp.IsaBackendBusinessObjectBaseSalesERP
adjustFreeGoods, getHeaderDocFlow, getHeaderPriceAttribs, getHeaderPropMap, getItemDocFlow, getItemsPriceAttribMap, getItemsPropMap, getLoadState, getMessageList, getOrCreateMessageList, getSavedItemsMap, getShipToMap, isDocflowRead, removeMessageFromMessageList, setDocflowRead, setHeaderDocFlow, setItemDocFlow, setShipToMap
-
Methods inherited from class de.hybris.platform.sap.core.bol.backend.jco.BackendBusinessObjectBaseJCo
getDefaultConnectionName, getDefaultDestinationName, getDefaultJCoConnection, getJCoConnection, getJCoConnection, getModuleId, setDefaultConnectionName, setDefaultDestinationName, setManagedConnectionContainer, toString
-
Methods inherited from class de.hybris.platform.sap.core.bol.backend.BackendBusinessObjectBase
destroyBackendObject, setGenericFactory, setModuleConfigurationAccess
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface de.hybris.platform.sap.core.bol.backend.BackendBusinessObject
destroyBackendObject, initBackendObject
-
Methods inherited from interface de.hybris.platform.sap.sapordermgmtbol.transaction.salesdocument.backend.interf.SalesDocumentBackend
clearItemBuffer, closeBackendSession, createInBackend, deleteItemInBackend, deleteItemsInBackend, emptyInBackend, isBackendDown, isItemBasedAvailability, isMultipleAddressesSupported, readForUpdateFromBackend, readFromBackend, recoverFromBackend, setGData, updateInBackend, updateInBackend, validate
-
-
-
-
Field Detail
-
quotationPredecessorDocument
protected ConnectedDocument quotationPredecessorDocument
When the order is created with a reference to a quotation, the following reads of the order do not return docflow entries as long as the order was not saved. Thus we remember the Predecessor Quotation here, until the order has been saved, so we can properly fill the predecessor list for the reads before the order was saved.
-
-
Method Detail
-
saveInBackend
public boolean saveInBackend(Order ordr, boolean commit) throws BackendException
Saves the order in the backend.
The order will be saved in the backend.- Specified by:
saveInBackendin interfaceOrderBaseBackend- Parameters:
ordr- The order to be savedcommit- The transaction should also be commited- Returns:
trueif the save in the back end was successful.- Throws:
BackendException- in case of a back-end error
-
saveOrder
protected boolean saveOrder(Order ordr, boolean commit) throws BackendException
Saves the order in the backend and returns, if it was successufull.- Parameters:
ordr-commit-- Returns:
- true, if save was successfull, false otherwise
- Throws:
BackendException
-
saveOrderInBackend
public int saveOrderInBackend(Order ordr, boolean commit) throws BackendException
Copies the basket object to the order object- Parameters:
ordr- Order documentcommit- Flag controlling DB commit in back end- Returns:
- 0, if success, otherwise -1
- Throws:
BackendException- in case of a back-end error
-
setLoadStateCreate
public void setLoadStateCreate()
Sets the Load State of LO-API to "create" mode. This is needed in case a basket gets copied into an order. Only for ERP backend.- Specified by:
setLoadStateCreatein interfaceSalesDocumentBackend- Overrides:
setLoadStateCreatein classSalesDocumentERP
-
getSalesDocumentType
public SalesDocumentType getSalesDocumentType()
Description copied from interface:SalesDocumentBackendEach implementing class has to define the used sales document type. This is e.g. used for finding the right strategies.- Specified by:
getSalesDocumentTypein interfaceSalesDocumentBackend- Returns:
- sales document type
-
isCancelable
public boolean isCancelable(Order order)
The ERP order can be canceled if the overall status is opened or if the overall status is in process , but not shipped, not billed and no delivery created for the any position can be cancelled. This can happened if the credit check is switched off for instance. The credit check is performed for the order and set order status "in process". But order can be cancelled in this case- Specified by:
isCancelablein interfaceOrderBaseBackend- Parameters:
order- Order which is checked- Returns:
- true if order is cancelable
-
updateInBackend
public void updateInBackend(SalesDocument salesDocument, TransactionConfiguration shop) throws BackendException
Description copied from class:SalesDocumentERPUpdate object in the backend by putting the data into the underlying storage.- Specified by:
updateInBackendin interfaceSalesDocumentBackend- Overrides:
updateInBackendin classSalesDocumentERP- Parameters:
salesDocument- the document to updateshop- the current shop- Throws:
BackendException- This exception is thrown if an error occurs in the back end
-
-