Interface BusinessObject
- All Superinterfaces:
MessageListHolder,Serializable
- All Known Subinterfaces:
Address,Basket,BillTo,CommonConfiguration,ConnectedDocument,ConnectedDocumentItem,ConnectedObject,CPQItem,Header,HeaderBase,Item,ItemBase,Order,PartnerBase,SalesDocument,SalesDocumentBase<L,,I, H> SalesDocumentConfiguration,Schedline,ShipTo,SimpleDocument<L,,I, H> SimpleHeader,SimpleItem,TransactionConfiguration
- All Known Implementing Classes:
AddressImpl,BasketImpl,BillToImpl,BusinessObjectBase,ConnectedDocumentImpl,ConnectedDocumentItemImpl,ConnectedObjectImpl,ConverterImpl,CPQItemSalesDoc,HeaderBaseImpl,HeaderSalesDocument,ItemBaseImpl,ItemSalesDoc,OrderHistoryImpl,OrderImpl,PartnerBaseImpl,SalesDocumentBaseImpl,SalesDocumentImpl,SapCreditCheckBOImpl,SapInvoiceBOImpl,SapPricingImpl,SapProductAvailabilityBOImpl,SchedlineImpl,SearchImpl,ShipToImpl,SimpleDocumentImpl,SimpleHeaderImpl,SimpleItemImpl,TestBusinessObjectBaseBEDeterminationImpl,TestBusinessObjectBaseBEDeterminationNotFoundImpl,TestBusinessObjectBaseBEInjectionImpl,TestBusinessObjectBaseBENotUniqueDeterminationImpl,TestBusinessObjectBaseBESingleImplementationImpl,TransactionConfigurationImpl
Business Object interface.
-
Field Summary
Fields inherited from interface de.hybris.platform.sap.core.common.message.MessageListHolder
INVALID, VALID -
Method Summary
Modifier and TypeMethodDescriptionvoidaddExtensionData(String key, Object value) This method stores arbitrary data within this Business Object.voidclearMessages(String resourceKey) Removes all messages with the given key from the list of messages.voidClears all messages and set state of the Business Object to valid.voidcopy the messages from an another BusinessObject and add this to the object.voidcopyMessages(MessageListHolder messageListHolder) Copy the messages from an another Message list holder and add this to the object.voidThis method creates a unique handle, as an alternative key for the business object, because at the creation point no techkey for the object exists.voiddestroy()This method is called before the bean is invalidated It needs to be defined in the Spring bean definition as destroy-method.getExtensionData(String key) This method retrieves extension data associated with the Business Object.This method retrieves all extension data associated with the Business Object.Returns the extension map.This method returns the handle, as an alternative key for the business object, because at the creation point no techKey for the object exists.Returns the messages of the Business Object itself.The method returns an iterator over all sub objects of the BusinessObject.Retrieves the key for the object.booleanReturns the information, if a handle for the object exists.booleanReturns if the business object or one of it sub objects has a message.booleanReturns if the business object itself has a message.voidinit()This method is called after all properties have been set It needs to be defined in the Spring bean definition as init-method.booleanisValid()Returns if the business object is valid.voidlogMessage(Message message) Log an message to the IsaLocation of BusinessObject.voidThis method removes extension data from the Business Object.voidThis method removes all extensions data from the Business Object.voidsetExtensionMap(Map<String, Object> extensionData) Sets the extension map to the given map.voidThis method sets the handle, as an alternative key for the business object, because at the creation point no techkey for the object exists.voidSet the Business Object invalid, no property.voidsetTechKey(TechKey techKey) Sets the key for the document.voidsetValid()Set the Business Object valid, no property.Methods inherited from interface de.hybris.platform.sap.core.common.message.MessageListHolder
addMessage, clearMessages, getMessageList
-
Method Details
-
getTechKey
TechKey getTechKey()Retrieves the key for the object.- Returns:
- The object's key
-
setTechKey
Sets the key for the document.- Parameters:
techKey- Key to be set
-
createUniqueHandle
void createUniqueHandle()This method creates a unique handle, as an alternative key for the business object, because at the creation point no techkey for the object exists. Therefore maybay the handle is needed to identify the object in backend -
setHandle
This method sets the handle, as an alternative key for the business object, because at the creation point no techkey for the object exists. Therefore maybay the handle is needed to identify the object in backend- Parameters:
handle- the handle of business object which identifies the object in the backend, if the techkey still not exists
-
getHandle
String getHandle()This method returns the handle, as an alternative key for the business object, because at the creation point no techKey for the object exists. Therefore maybe the handle is needed to identify the object in back end return the handle of business object which is needed to identify the object in the back end, if the techKey still not exists- Returns:
- the BO handle
-
hasHandle
boolean hasHandle()Returns the information, if a handle for the object exists.- Returns:
- true, if there is a handle false, if the handle is
nullor if the handle is an empty string.
-
getSubObjectIterator
Iterator<BusinessObjectBase> getSubObjectIterator()The method returns an iterator over all sub objects of the BusinessObject.- Returns:
- Iterator to loop over sub objects
-
setInvalid
void setInvalid()Set the Business Object invalid, no property. -
setValid
void setValid()Set the Business Object valid, no property. -
isValid
boolean isValid()Returns if the business object is valid.- Returns:
- valid
-
copyMessages
copy the messages from an another BusinessObject and add this to the object.- Parameters:
bob- reference to aBusinessObjectBaseobject
-
copyMessages
Copy the messages from an another Message list holder and add this to the object.- Parameters:
messageListHolder- reference to aMessageListHolderobject
-
hasMessages
boolean hasMessages()Returns if the business object or one of it sub objects has a message.- Returns:
true, if at least one message exists
-
clearMessages
Removes all messages with the given key from the list of messages.- Parameters:
resourceKey- resourceKey of messages
-
clearOwnMessages
void clearOwnMessages()Clears all messages and set state of the Business Object to valid. -
hasOwnMessages
boolean hasOwnMessages()Returns if the business object itself has a message.- Returns:
true, if at least one message exists
-
getOwnMessageList
MessageList getOwnMessageList()Returns the messages of the Business Object itself.- Returns:
- message list of Business Object without child objects
-
logMessage
Log an message to the IsaLocation of BusinessObject.- Parameters:
message- message to log
-
addExtensionData
This method stores arbitrary data within this Business Object.- Parameters:
key- key with which the specified value is to be associated.value- value to be associated with the specified key.
-
getExtensionData
This method retrieves extension data associated with the Business Object.- Parameters:
key- key with which the specified value is to be associated.- Returns:
- value which is associated with the specified key
-
removeExtensionData
This method removes extension data from the Business Object.- Parameters:
key- key of the extension data
-
getExtensionDataValues
This method retrieves all extension data associated with the Business Object.- Returns:
- all extension data as entry set
-
removeExtensionDataValues
void removeExtensionDataValues()This method removes all extensions data from the Business Object. -
setExtensionMap
Sets the extension map to the given map.- Parameters:
extensionData- the new extension HashMap for the object
-
getExtensionMap
Returns the extension map.- Returns:
- extensionData, the extension Map of the object
-
init
void init()This method is called after all properties have been set It needs to be defined in the Spring bean definition as init-method. -
destroy
void destroy()This method is called before the bean is invalidated It needs to be defined in the Spring bean definition as destroy-method.
-