com.ibm.mm.sdk.common

Class DKRetrieveOptionsICM

  • java.lang.Object
    • com.ibm.mm.sdk.common.DKRetrieveOptionsICM


  • public class DKRetrieveOptionsICM
    extends java.lang.Object
    Comprehensive retrieval options for controlling data fetching in CM8.

    This class provides fine-grained control over what data is retrieved from the datastore, including attributes, content, links, children, and various behavioral options. It enables performance optimization by retrieving only the data you need.

    Key Features:

    • Base attribute retrieval control
    • Content and parts management
    • Link retrieval (inbound/outbound)
    • Child object retrieval
    • Behavioral options (checkout, versioning, error handling)
    • Attribute filtering via projection lists
    • Pagination support

    Option Categories:

    • Base Options: baseAttributes(), basePropertyAclName(), basePropertyCheckedOutDetails()
    • Behavior Options: behaviorDoNotForceCheckout(), behaviorIgnoreNoneFoundError(), etc.
    • Child Options: childAttributes(), childListOneLevel(), childListAllLevels()
    • Function Options: functionCheckOut(), functionVersionLatest()
    • Link Options: linksInbound(), linksOutbound(), linksDescriptors(), etc.
    • Parts Options: partsList(), partsAttributes(), partsPropertyAclName()
    • Resource Options: resourceContent()

    Example usage:

     // Create retrieve options
     DKRetrieveOptionsICM options = DKRetrieveOptionsICM.createInstance(datastore);
    
     // Configure what to retrieve
     options.baseAttributes(true);           // Retrieve base attributes
     options.partsList(true);                // Retrieve content parts list
     options.linksInbound(true);             // Retrieve inbound links
     options.childListOneLevel(true);        // Retrieve immediate children
    
     // Add attribute filtering for performance
     DKProjectionListICM projections = DKProjectionListICM.createInstance(datastore);
     projections.addProjection("Document", new String[]{"DocumentTitle", "DateCreated"});
     options.attributeFilters(projections);
    
     // Use with retrieve
     DKDDO doc = datastore.createDDO("Document", DKConstant.DK_CM_DOCUMENT);
     doc.retrieve(options.dkNVPair());
     
    See Also:
    DKProjectionListICM, DKNVPair, DKDDO.retrieve(DKNVPair[])
    • Method Detail

      • createInstance

        public static DKRetrieveOptionsICM createInstance(DKDatastoreICM dsICM)
                                                   throws DKUsageError,
                                                          java.lang.Exception
        Factory method to create a new retrieve options instance.
        Parameters:
        dsICM - the datastore to associate with these options
        Returns:
        a new DKRetrieveOptionsICM instance
        Throws:
        DKUsageError - if the datastore is null or not connected
        java.lang.Exception - if creation fails
      • baseAttributes

        public void baseAttributes(boolean baseAttributesRequested)
        Sets whether to retrieve base attributes.

        Base attributes are the core properties of an object. Setting this to true enables retrieval of object properties.

        Parameters:
        baseAttributesRequested - true to retrieve base attributes, false otherwise
      • baseAttributes

        public boolean baseAttributes()
        Gets whether base attributes will be retrieved.
        Returns:
        true if base attributes will be retrieved, false otherwise
      • basePropertyAclName

        public void basePropertyAclName(java.lang.Boolean basePropertyAclNameRequested)
      • basePropertyAclName

        public boolean basePropertyAclName()
      • basePropertyCheckedOutDetails

        public void basePropertyCheckedOutDetails(boolean basePropertyCheckedOutDetailsRequested)
      • basePropertyCheckedOutDetails

        public boolean basePropertyCheckedOutDetails()
      • behaviorDoNotForceCheckout

        public void behaviorDoNotForceCheckout(boolean behaviorDoNotForceCheckout)
      • behaviorDoNotForceCheckout

        public boolean behaviorDoNotForceCheckout()
      • behaviorIgnoreNoneFoundError

        public void behaviorIgnoreNoneFoundError(boolean behaviorIgnoreNoneFoundErrorRequested)
      • behaviorIgnoreNoneFoundError

        public boolean behaviorIgnoreNoneFoundError()
      • behaviorPartsAttributesCoreOnly

        public void behaviorPartsAttributesCoreOnly(boolean behaviorPartsAttributesCoreOnly)
      • behaviorPartsAttributesCoreOnly

        public boolean behaviorPartsAttributesCoreOnly()
      • behaviorRecordLastRetrieveOption

        public void behaviorRecordLastRetrieveOption(boolean behaviorRecordLastRetrieveOptionRequested)
      • behaviorRecordLastRetrieveOption

        public boolean behaviorRecordLastRetrieveOption()
      • behaviorRetrieveOnCheckoutError

        public void behaviorRetrieveOnCheckoutError(boolean behaviorRetrieveOnCheckoutError)
      • behaviorRetrieveOnCheckoutError

        public boolean behaviorRetrieveOnCheckoutError()
      • behaviorSkipExistenceCheck

        public void behaviorSkipExistenceCheck(boolean behaviorSkipExistenceCheckRequested)
      • behaviorSkipExistenceCheck

        public boolean behaviorSkipExistenceCheck()
      • behaviorSkipResourceAttrRefresh

        public void behaviorSkipResourceAttrRefresh(boolean behaviorSkipResourceAttrRefreshRequested)
      • behaviorSkipResourceAttrRefresh

        public boolean behaviorSkipResourceAttrRefresh()
      • childAttributes

        public void childAttributes(boolean childAttributesRequested)
      • childAttributes

        public boolean childAttributes()
      • childListAllLevels

        public void childListAllLevels(boolean childListAllLevelsRequested)
      • childListAllLevels

        public boolean childListAllLevels()
      • childListOneLevel

        public void childListOneLevel(boolean childListOneLevelRequested)
      • childListOneLevel

        public boolean childListOneLevel()
      • functionCheckOut

        public void functionCheckOut(boolean functionCheckOutRequested)
      • functionCheckOut

        public boolean functionCheckOut()
      • functionVersionLatest

        public void functionVersionLatest(boolean functionVersionLatestRequested)
      • functionVersionLatest

        public boolean functionVersionLatest()
      • linksDescriptors

        public void linksDescriptors(boolean linksDescriptorsRequested)
      • linksDescriptors

        public boolean linksDescriptors()
      • linksInbound

        public void linksInbound(boolean linksInboundRequested)
      • linksInbound

        public boolean linksInbound()
      • linksInboundFolderSources

        public void linksInboundFolderSources(boolean folderSourceDDOsRequested)
      • linksInboundFolderSources

        public boolean linksInboundFolderSources()
      • linksLevelTwo

        public void linksLevelTwo(boolean linksLevelTwoRequested)
      • linksLevelTwo

        public boolean linksLevelTwo()
      • linksLevelTwoCount

        public void linksLevelTwoCount(boolean linksLevelTwoCountRequested)
      • linksLevelTwoCount

        public boolean linksLevelTwoCount()
      • linksOutbound

        public void linksOutbound(boolean linksOutboundRequested)
      • linksOutbound

        public boolean linksOutbound()
      • partsAttributes

        public void partsAttributes(boolean partsAttributesRequested)
      • partsAttributes

        public boolean partsAttributes()
      • partsList

        public void partsList(boolean partsListRequested)
      • partsList

        public boolean partsList()
      • partsPropertyAclName

        public void partsPropertyAclName(boolean partsPropertyAclNameRequested)
      • partsPropertyAclName

        public boolean partsPropertyAclName()
      • resourceContent

        public void resourceContent(boolean resourceContentRequested)
      • resourceContent

        public boolean resourceContent()
      • linksTypeFilter

        public void linksTypeFilter(java.lang.String linkTypeNameRequested)
      • linksTypeFilter

        public java.lang.String linksTypeFilter()
      • pageSize

        public DKRetrieveOptionsICM pageSize(int pageSize)
        Sets the page size for paginated retrieval.

        When retrieving large result sets, pagination can improve performance and reduce memory usage.

        Parameters:
        pageSize - the number of items per page
        Returns:
        this instance for method chaining
      • continuable

        public DKRetrieveOptionsICM continuable(boolean continuable)
        Sets whether the result set should be continuable.

        Continuable result sets allow fetching additional pages of results.

        Parameters:
        continuable - true to make the result set continuable
        Returns:
        this instance for method chaining
      • getPageSize

        public java.lang.Integer getPageSize()
        Gets the configured page size.
        Returns:
        the page size, or null if not set
      • isContinuable

        public java.lang.Boolean isContinuable()
        Gets whether the result set is continuable.
        Returns:
        true if continuable, false otherwise, or null if not set
      • getDatastore

        public DKDatastoreICM getDatastore()
        Gets the associated datastore.
        Returns:
        the datastore instance
      • toString

        public java.lang.String toString()
        Returns a string representation showing included options.
        Overrides:
        toString in class java.lang.Object
        Returns:
        string representation with included and excluded options
      • toString

        public java.lang.String toString(boolean showExcludeList)
        Returns a string representation of these retrieve options.
        Parameters:
        showExcludeList - if true, shows both included and excluded options; if false, shows only included
        Returns:
        string representation of the options
      • attributeFilters

        public void attributeFilters(DKProjectionListICM attributeFilters)
        Improve performance by requesting only subset of attributes that you desire.

        If you are only interested in some of the attributes, specify which attributes you want to be retrieved, saving time and memory by omitting those that you do not need. Furthermore, you can filter entire child component types from the childList...() settings by omitting a projection for any component type. You only retrieve the attributes and child components specifically specified in the projection list.

        IMPORTANT: This setting only filters attributes and does not enable retrieval of attributes. You must request attributes through other retrieve options for the applicable DDOs that you are interested in retrieving attributes. If attribute retrieval is not requested or specifically set to 'false', the general attribute requests take precedence and the projection list is ignored because there are no attributes to be returned.

        This setting only filters component types and does not enable retrieval of child components. You must request child components through other retrieve options. See childList...() settings. The child list and attribute requests take precedence. If no child list settings are requested or if childAttributes(false), the projections for the affected component types are ignored.

        DEFAULT: null (All Attributes and Component Types Implicitly Selected)

        PRECEDENCE: If 'null', this setting has no effect, indicating that no filter is supplied (everything shows through, limited of course to actual selections by other retrieve options). This setting only filters data requested by other options and does not select any new data.

        PERFORMANCE: Filtering the number of attributes and child component types to only those that you plan can save table joins, network communication, and memory allocation. However, using attribute filters is not always faster due to processing overhead. Attribute filters show the best advantages when:

        • Large attributes are filtered out (such as large CLOB or BLOB attributes)
        • Large numbers of attributes per item or component are filtered out
        • Large numbers of items or components are being retrieved
        • Entire item types and component types are filtered out by omitted projections

        For more details on projections, refer to DKProjectionListICM.

        Parameters:
        attributeFilters - Projection list specifying which attributes are desired for each item type. If 'null', all projections filtering attributes are discarded and all attributes are selected by default.
        See Also:
        DKProjectionListICM, baseAttributes(boolean), childAttributes(boolean), partsAttributes(boolean), childListOneLevel(boolean), childListAllLevels(boolean)
      • dkNVPair

        public DKNVPair[] dkNVPair()
        Converts these retrieve options to a DKNVPair array for use with retrieve methods.

        This is the standard way to pass retrieve options to DKDDO.retrieve() and similar methods.

        Returns:
        array containing a single DKNVPair with these options
        See Also:
        DKDDO.retrieve(DKNVPair[])
Copyright © 2024 IBM Corporation

Copyright © 2024 IBM Corporation. All rights reserved.