Class BusinessObjectBase

    • Field Detail

      • techKey

        protected TechKey techKey
        Technical key.
      • handle

        protected java.lang.String handle
        Temporary handle.
      • bobMessages

        protected MessageList bobMessages
        Business Object messages.
      • bobState

        protected int bobState
        Business Object state.
      • extensionData

        protected java.util.Map<java.lang.String,​java.lang.Object> extensionData
        Extension data map.
      • backendType

        protected java.lang.String backendType
        Backend type.
      • genericFactory

        protected GenericFactory genericFactory
        Generic Factory to create data container beans.
      • moduleConfigurationAccess

        protected ModuleConfigurationAccess moduleConfigurationAccess
        Access to module configuration data.
    • Constructor Detail

      • BusinessObjectBase

        public BusinessObjectBase()
        Standard constructor.
    • Method Detail

      • setBackendObject

        public void setBackendObject​(BackendBusinessObject backendObject)
        Set the current backend business object (optional).
        Parameters:
        backendObject - the backend business object to use
      • setBackendType

        public void setBackendType​(java.lang.String backendType)
        Set the current backend type.
        Parameters:
        backendType - backend type
      • init

        public void init()
        Description copied from interface: BusinessObject
        This method is called after all properties have been set It needs to be defined in the Spring bean definition as init-method.
        Specified by:
        init in interface BusinessObject
      • destroy

        public void destroy()
        Description copied from interface: BusinessObject
        This method is called before the bean is invalidated It needs to be defined in the Spring bean definition as destroy-method.
        Specified by:
        destroy in interface BusinessObject
      • getBackendType

        public java.lang.String getBackendType()
        Get the current backend type.
        Returns:
        backend type
      • setTechKey

        public void setTechKey​(TechKey techKey)
        Description copied from interface: BusinessObject
        Sets the key for the document.
        Specified by:
        setTechKey in interface BusinessObject
        Parameters:
        techKey - Key to be set
      • createUniqueHandle

        public void createUniqueHandle()
        Description copied from interface: BusinessObject
        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
        Specified by:
        createUniqueHandle in interface BusinessObject
      • setHandle

        public void setHandle​(java.lang.String handle)
        Description copied from interface: BusinessObject
        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
        Specified by:
        setHandle in interface BusinessObject
        Parameters:
        handle - the handle of business object which identifies the object in the backend, if the techkey still not exists
      • getHandle

        public java.lang.String getHandle()
        Description copied from interface: BusinessObject
        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
        Specified by:
        getHandle in interface BusinessObject
        Returns:
        the BO handle
      • hasHandle

        public boolean hasHandle()
        Description copied from interface: BusinessObject
        Returns the information, if a handle for the object exists.
        Specified by:
        hasHandle in interface BusinessObject
        Returns:
        true, if there is a handle false, if the handle is null or if the handle is an empty string.
      • setInvalid

        public void setInvalid()
        Description copied from interface: BusinessObject
        Set the Business Object invalid, no property.
        Specified by:
        setInvalid in interface BusinessObject
      • setValid

        public void setValid()
        Description copied from interface: BusinessObject
        Set the Business Object valid, no property.
        Specified by:
        setValid in interface BusinessObject
      • isValid

        public boolean isValid()
        Description copied from interface: BusinessObject
        Returns if the business object is valid.
        Specified by:
        isValid in interface BusinessObject
        Returns:
        valid
      • copyMessages

        public void copyMessages​(BusinessObjectBase bob)
        Description copied from interface: BusinessObject
        copy the messages from an another BusinessObject and add this to the object.
        Specified by:
        copyMessages in interface BusinessObject
        Parameters:
        bob - reference to a BusinessObjectBase object
      • copyMessages

        public void copyMessages​(MessageListHolder messageListHolder)
        Description copied from interface: BusinessObject
        Copy the messages from an another Message list holder and add this to the object.
        Specified by:
        copyMessages in interface BusinessObject
        Parameters:
        messageListHolder - reference to a MessageListHolder object
      • hasMessages

        public boolean hasMessages()
        Description copied from interface: BusinessObject
        Returns if the business object or one of it sub objects has a message.
        Specified by:
        hasMessages in interface BusinessObject
        Returns:
        true, if at least one message exists
      • clearMessages

        public void clearMessages​(java.lang.String resourceKey)
        Description copied from interface: BusinessObject
        Removes all messages with the given key from the list of messages.
        Specified by:
        clearMessages in interface BusinessObject
        Parameters:
        resourceKey - resourceKey of messages
      • hasOwnMessages

        public boolean hasOwnMessages()
        Description copied from interface: BusinessObject
        Returns if the business object itself has a message.
        Specified by:
        hasOwnMessages in interface BusinessObject
        Returns:
        true, if at least one message exists
      • getOwnMessageList

        public MessageList getOwnMessageList()
        Description copied from interface: BusinessObject
        Returns the messages of the Business Object itself.
        Specified by:
        getOwnMessageList in interface BusinessObject
        Returns:
        message list of Business Object without child objects
      • clearOwnMessages

        public void clearOwnMessages()
        Description copied from interface: BusinessObject
        Clears all messages and set state of the Business Object to valid.
        Specified by:
        clearOwnMessages in interface BusinessObject
      • getMessageList

        public MessageList getMessageList()
        Description copied from interface: MessageListHolder
        Returns the messages list object itself. Always the reference of the original object should be provided.
        Specified by:
        getMessageList in interface MessageListHolder
        Returns:
        reference to message list
      • logMessage

        public void logMessage​(Message message)
        Description copied from interface: BusinessObject
        Log an message to the IsaLocation of BusinessObject.
        Specified by:
        logMessage in interface BusinessObject
        Parameters:
        message - message to log
      • getSubObjectIterator

        public java.util.Iterator<BusinessObjectBase> getSubObjectIterator()
        The method returns an iterator over all sub objects of the BusinessObject.
        Specified by:
        getSubObjectIterator in interface BusinessObject
        Returns:
        Iterator to loop over sub objects
      • addExtensionData

        public void addExtensionData​(java.lang.String key,
                                     java.lang.Object value)
        Description copied from interface: BusinessObject
        This method stores arbitrary data within this Business Object.
        Specified by:
        addExtensionData in interface BusinessObject
        Parameters:
        key - key with which the specified value is to be associated.
        value - value to be associated with the specified key.
      • getExtensionData

        public java.lang.Object getExtensionData​(java.lang.String key)
        Description copied from interface: BusinessObject
        This method retrieves extension data associated with the Business Object.
        Specified by:
        getExtensionData in interface BusinessObject
        Parameters:
        key - key with which the specified value is to be associated.
        Returns:
        value which is associated with the specified key
      • removeExtensionData

        public void removeExtensionData​(java.lang.String key)
        Description copied from interface: BusinessObject
        This method removes extension data from the Business Object.
        Specified by:
        removeExtensionData in interface BusinessObject
        Parameters:
        key - key of the extension data
      • getExtensionDataValues

        public java.util.Set<java.util.Map.Entry<java.lang.String,​java.lang.Object>> getExtensionDataValues()
        Description copied from interface: BusinessObject
        This method retrieves all extension data associated with the Business Object.
        Specified by:
        getExtensionDataValues in interface BusinessObject
        Returns:
        all extension data as entry set
      • setExtensionMap

        public void setExtensionMap​(java.util.Map<java.lang.String,​java.lang.Object> extensionData)
        Description copied from interface: BusinessObject
        Sets the extension map to the given map.
        Specified by:
        setExtensionMap in interface BusinessObject
        Parameters:
        extensionData - the new extension HashMap for the object
      • getExtensionMap

        public java.util.Map<java.lang.String,​java.lang.Object> getExtensionMap()
        Description copied from interface: BusinessObject
        Returns the extension map.
        Specified by:
        getExtensionMap in interface BusinessObject
        Returns:
        extensionData, the extension Map of the object
      • determineBackendObject

        protected void determineBackendObject​(boolean initialize)
        Determines the backend object.
        Parameters:
        initialize - if true, backend object is reset first (works only in determination mode!)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Compares this object to the specified object. The result is true if and only if the argument is not null and is of the same class that has the same technical key ( TechKey) as this object.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        o - Object to compare with
        Returns:
        true if the objects are identical; otherwiese false.
      • hashCode

        public int hashCode()
        Returns the hash code for this object.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        Hash code
      • clone

        public java.lang.Object clone()
                               throws java.lang.CloneNotSupportedException
        Makes a copy of the object. The MessageList is copied.
        Overrides:
        clone in class java.lang.Object
        Returns:
        a copy of object
        Throws:
        java.lang.CloneNotSupportedException - CloneNotSupportedException