com.ibm.mm.sdk.common

Interface dkCollection

  • All Known Implementing Classes:
    DKChildCollection, DKFolder, DKLinkCollection, DKParts, dkQueryableCollection, DKResults, DKSequentialCollection


    public interface dkCollection
    Interface for CM8 collection operations.

    This interface defines the contract for managing collections of objects in the CM8 API. Collections provide ordered storage and manipulation of elements, supporting operations such as adding, removing, replacing, and retrieving elements at specific positions.

    Collections can be associated with data objects and may have named attributes. Implementations typically provide sequential or indexed access to elements.

    See Also:
    DKSequentialCollection, dkIterator
    • Method Detail

      • addElement

        void addElement(java.lang.Object element)
                 throws DKUsageError
        Adds an element to the collection.
        Parameters:
        element - the element to add to the collection
        Throws:
        DKUsageError - if the element is null or cannot be added
      • addAllElements

        void addAllElements(dkCollection elements)
                     throws DKUsageError
        Adds all elements from another collection to this collection.
        Parameters:
        elements - the collection whose elements are to be added
        Throws:
        DKUsageError - if the elements collection is null or elements cannot be added
      • insertElementAt

        void insertElementAt(java.lang.Object element,
                             dkIterator where)
                      throws DKUsageError
        Inserts an element at the position specified by the iterator.
        Parameters:
        element - the element to insert
        where - the iterator position where the element should be inserted
        Throws:
        DKUsageError - if the element is null, the iterator is invalid, or insertion fails
      • removeElementAt

        void removeElementAt(dkIterator where)
                      throws DKUsageError
        Removes the element at the position specified by the iterator.
        Parameters:
        where - the iterator position of the element to remove
        Throws:
        DKUsageError - if the iterator is invalid or removal fails
      • replaceElementAt

        void replaceElementAt(java.lang.Object element,
                              dkIterator where)
                       throws DKUsageError
        Replaces the element at the position specified by the iterator with a new element.
        Parameters:
        element - the new element to replace the existing one
        where - the iterator position of the element to replace
        Throws:
        DKUsageError - if the element is null, the iterator is invalid, or replacement fails
      • retrieveElementAt

        java.lang.Object retrieveElementAt(dkIterator where)
                                    throws DKUsageError
        Retrieves the element at the position specified by the iterator.
        Parameters:
        where - the iterator position of the element to retrieve
        Returns:
        the element at the specified position
        Throws:
        DKUsageError - if the iterator is invalid or retrieval fails
      • removeAllElements

        void removeAllElements()
                        throws DKUsageError
        Removes all elements from the collection.
        Throws:
        DKUsageError - if the removal operation fails
      • getName

        java.lang.String getName()
        Returns the name of this collection.
        Returns:
        the collection name, or null if not named
      • getAssociatedAttrName

        java.lang.String getAssociatedAttrName()
        Returns the name of the attribute associated with this collection.

        Collections can be associated with specific attributes of data objects. This method returns the name of that attribute, if any.

        Returns:
        the associated attribute name, or null if not associated with an attribute
      • getOwner

        dkDataObjectBase getOwner()
        Returns the data object that owns this collection.
        Returns:
        the owner data object, or null if this collection is not owned
Copyright © 2024 IBM Corporation

Copyright © 2024 IBM Corporation. All rights reserved.