Interface NamedRootObject

    • Method Detail

      • getComment

        String getComment()
        Get the value for Comment. (Optional comment)
        Returns:
        the field
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getDescription

        String getDescription()
        Get the value for Description. (Optional description)
        Returns:
        the field
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getName

        String getName()
        Get the value for Name. (The unique name of this object) This value is mandatory, and therefore will not be null if this object has been retrieved from the database.
        Returns:
        the field
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • getSearchName

        String getSearchName()
        Get the value for SearchName. (The name of this object, normalized to allow for convenient database searching.) This value is mandatory, and therefore will not be null if this object has been retrieved from the database.
        Returns:
        the field
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • isHidden

        boolean isHidden()
        Get the value for Hidden. ( When a NamedRootObject is flagged as hidden, this object will become an 'Internal object', the name will forcefully be changed to System_Internal_<Object Type>_<Object Unique Id>. The renaming is done only, when the object does not start with System_Internal_. If it does, the name is left as such. Hidden objects are treated differently in the user interface. In normal overviews of NamedRootObjects such as a JobDefinition these hidden entities are not shown. Also in LOV's they will not be visible. )
        Returns:
        the field
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setComment

        void setComment​(String newComment)
        Set the value for Comment. (Optional comment) This value is optional.
        Parameters:
        newComment - the new value for Comment.
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setDescription

        void setDescription​(String newDescription)
        Set the value for Description. (Optional description) This value is optional.
        Parameters:
        newDescription - the new value for Description.
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • setName

        void setName​(String newName)
        Set the value for Name. (The unique name of this object) This value is mandatory.
        Parameters:
        newName - the new value for Name. If this is null, then the object cannot be persisted.
        Throws:
        ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • createObjectReference

        ObjectReference createObjectReference​(NamedRootObject otherObject)
        Create an ObjectReference object. This links the other object to this NamedRootObject such that it cannot be deleted, unless either the link is removed, or the NamedRootObject is also deleted. This is particularly useful if you want to ensure that promotion works correctly, when referring to other objects, as the import will fail unless the other object is also imported, or already exists.
        Parameters:
        otherObject - The other object to create the link to
        Returns:
        The created ObjectReference
      • getLinkedObjectReferenceByName

        ObjectReference getLinkedObjectReferenceByName​(String searchName)
        Retrieve a linked object reference by it's search name. If not found, returns null.
        Parameters:
        searchName - The search name of the object reference
        Returns:
        The ObjectReference when found or null if not found
      • getLinkedObjectReferenceByLinkedObject

        ObjectReference getLinkedObjectReferenceByLinkedObject​(NamedRootObject searchObject)
        Retrieve the ObjectReference that points to given NamedRootObject, if there is one, returns null otherwise.
        Parameters:
        searchObject - The search object the ObjectReference must point to
        Returns:
        The ObjectReference when found or null if not found