Class SalesDocumentBaseImpl<L extends ItemListBase<I>,I extends ItemBase,H extends HeaderBase>
- 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<L,I,H>
-
- Type Parameters:
L- The ItemList has to extendItemListBaseI- The Item has to extendItemBaseobjectsH- The Header has to extendHeaderBase
- All Implemented Interfaces:
BackendAware,BusinessObject,MessageListHolder,SalesDocumentBase<L,I,H>,SimpleDocument<L,I,H>,java.io.Serializable,java.lang.Cloneable,java.lang.Iterable<I>
- Direct Known Subclasses:
SalesDocumentImpl
public abstract class SalesDocumentBaseImpl<L extends ItemListBase<I>,I extends ItemBase,H extends HeaderBase> extends SimpleDocumentImpl<L,I,H> implements SalesDocumentBase<L,I,H>
Base class for all sales documents, e.g. Basket, Order etc.
The document consists in principle of a Header and a ItemList, which again contains Items. The type of all 3 objects can be passed to this class via generics to enable type safe access.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<BillTo>billToListprotected booleanchangeHeaderOnlyprotected booleanpersistentInBackendprotected java.util.List<ShipTo>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 SalesDocumentBaseImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Clear the whole sales document including header and itemlist.voiddestroy()Method will be called by theBusinessObjectManagerwhen the end of the life cycle is reached, so that all used resources can be released.java.util.List<BillTo>getAlternativeBillTos()Return the list of all available shipTos of this document.java.util.List<ShipTo>getAlternativeShipTos()Return the list of all available shipTos of this document.booleanisChangeHeaderOnly()Returns true if only the header should be changedbooleanisPersistentInBackend()Returns the information, if document is persistent in the back endvoidsetPersistentInBackend(boolean isPersistent)Set flag, if document is persistent in the back end-
Methods inherited from class de.hybris.platform.sap.sapordermgmtbol.transaction.businessobject.impl.SimpleDocumentImpl
addItem, clearHeader, clearItems, clearMessages, getApplicationId, getChangeDate, getHeader, getItem, getItemList, getSoldToGuid, getTypedExtensionMap, getVersion, isDirty, iterator, setApplicationId, setChangeDate, setDirty, setHeader, setItemList, setSoldToGuid, setTechKey, setVersion, toString
-
Methods inherited from class de.hybris.platform.sap.core.bol.businessobject.BusinessObjectBase
addExtensionData, addMessage, clearMessages, clearOwnMessages, clone, 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.SalesDocumentBase
isDeterminationRequired, setDeterminationRequired
-
Methods inherited from interface de.hybris.platform.sap.sapordermgmtbol.transaction.businessobject.interf.SimpleDocument
addItem, clearHeader, clearItems, createItem, getApplicationId, getChangeDate, getHeader, getItem, getItemList, getSoldToGuid, getTypedExtensionMap, getVersion, isDirty, setApplicationId, setChangeDate, setDirty, setHeader, setItemList, setSoldToGuid, setVersion
-
-
-
-
Method Detail
-
clear
public void clear()
Description copied from interface:SimpleDocumentClear the whole sales document including header and itemlist.- Specified by:
clearin interfaceSimpleDocument<L extends ItemListBase<I>,I extends ItemBase,H extends HeaderBase>- Overrides:
clearin classSimpleDocumentImpl<L extends ItemListBase<I>,I extends ItemBase,H extends HeaderBase>
-
destroy
public void destroy()
Method 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 classBusinessObjectBase
-
isChangeHeaderOnly
public boolean isChangeHeaderOnly()
Returns true if only the header should be changed- Specified by:
isChangeHeaderOnlyin interfaceSalesDocumentBase<L extends ItemListBase<I>,I extends ItemBase,H extends HeaderBase>- Returns:
- boolean true if only the header should be changed, false else
-
getAlternativeBillTos
public java.util.List<BillTo> getAlternativeBillTos()
Description copied from interface:SalesDocumentBaseReturn the list of all available shipTos of this document. The billTos contain the address.- Specified by:
getAlternativeBillTosin interfaceSalesDocumentBase<L extends ItemListBase<I>,I extends ItemBase,H extends HeaderBase>- Returns:
- list of billTos.
-
getAlternativeShipTos
public java.util.List<ShipTo> getAlternativeShipTos()
Description copied from interface:SalesDocumentBaseReturn the list of all available shipTos of this document. The shipTos contain the address.- Specified by:
getAlternativeShipTosin interfaceSalesDocumentBase<L extends ItemListBase<I>,I extends ItemBase,H extends HeaderBase>- Returns:
- list of shipTos.
-
isPersistentInBackend
public boolean isPersistentInBackend()
Description copied from interface:SalesDocumentBaseReturns the information, if document is persistent in the back end- Specified by:
isPersistentInBackendin interfaceSalesDocumentBase<L extends ItemListBase<I>,I extends ItemBase,H extends HeaderBase>- Returns:
- true, if document persists on DB in the back end
-
setPersistentInBackend
public void setPersistentInBackend(boolean isPersistent)
Description copied from interface:SalesDocumentBaseSet flag, if document is persistent in the back end- Specified by:
setPersistentInBackendin interfaceSalesDocumentBase<L extends ItemListBase<I>,I extends ItemBase,H extends HeaderBase>- Parameters:
isPersistent- iftruedocument is considered persistent
-
-