com.ibm.mm.sdk.server

Class DKResultSetCursorICM

  • java.lang.Object
    • com.ibm.mm.sdk.server.DKResultSetCursorICM
  • All Implemented Interfaces:
    dkResultSetCursor


    public class DKResultSetCursorICM
    extends java.lang.Object
    implements dkResultSetCursor
    DKResultSetCursorICM is a datastore cursor that managfindObject(int, String)es a collection of DDO objects. The collection contains the results of a query submitted to the datastore. Elements are not added to the collection until a datastore fetch operation is executed. This implementation provides FileNet P8-specific cursor functionality for CM8 SDK compatibility.
    • Constructor Summary

      Constructors 
      Constructor and Description
      DKResultSetCursorICM(java.lang.String query, java.lang.Integer pageSize, com.filenet.api.property.PropertyFilter propertyFilter, java.lang.Boolean continuable, java.lang.Integer sqlTimeout, java.lang.Integer prefetchSize, boolean prepareOnly, CM8DocumentService documentService, DKDatastoreICM datastoreICM)
      Constructor for query-based result set cursor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void close()
      Closes the cursor and releases associated resources.
      void deleteObject()
      Deletes the current object from the datastore.
      void destroy()
      Permanently destroys the cursor and releases all resources.
      DKDDO fetchNext()
      Fetches the next document from the result set and advances the cursor.
      java.lang.Object fetchNextByName(java.lang.String name)
      Fetches the next value of a specific property by name.
      int fetchNextNByName(java.lang.String name, int n, java.lang.Object[] result)
      Fetches the next N values of a specific property by name.
      DKDDO fetchObject()
      Fetches the current object without advancing the cursor position.
      DKDDO findObject(int option, java.lang.String predicate)
      Find the data object which satisfies the given predicate.
      boolean isEnd()
      Checks if the cursor has reached the end of the result set.
      void open()
      Opens the cursor for use, initializing it for fetching results.
      void updateObject(DKDDO ddo)
      Updates the current object in the datastore with the provided DDO.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DKResultSetCursorICM

        public DKResultSetCursorICM(java.lang.String query,
                                    java.lang.Integer pageSize,
                                    com.filenet.api.property.PropertyFilter propertyFilter,
                                    java.lang.Boolean continuable,
                                    java.lang.Integer sqlTimeout,
                                    java.lang.Integer prefetchSize,
                                    boolean prepareOnly,
                                    CM8DocumentService documentService,
                                    DKDatastoreICM datastoreICM)
                             throws java.lang.Exception
        Constructor for query-based result set cursor.
        Parameters:
        query - The SQL query string to execute
        pageSize - Maximum number of results per page
        propertyFilter - Filter for properties to retrieve
        continuable - Whether the cursor is continuable
        sqlTimeout - Query timeout in milliseconds
        prefetchSize - Number of rows to prefetch in each block
        prepareOnly - If true, prepare query but don't execute immediately
        documentService - Service for document operations
        datastoreICM - Reference to the datastore
        Throws:
        java.lang.Exception - if initialization fails
    • Method Detail

      • open

        public void open()
                  throws DKException
        Description copied from interface: dkResultSetCursor
        Opens the cursor for use, initializing it for fetching results. Must be called before fetching operations.
        Specified by:
        open in interface dkResultSetCursor
        Throws:
        DKException - if the open operation fails
      • close

        public void close()
                   throws DKException,
                          java.lang.Exception
        Description copied from interface: dkResultSetCursor
        Closes the cursor and releases associated resources. The cursor can be reopened after closing.
        Specified by:
        close in interface dkResultSetCursor
        Throws:
        DKException - if the close operation fails
        java.lang.Exception - for other errors during close
      • destroy

        public void destroy()
                     throws DKException,
                            java.lang.Exception
        Description copied from interface: dkResultSetCursor
        Permanently destroys the cursor and releases all resources. The cursor cannot be used after destruction.
        Specified by:
        destroy in interface dkResultSetCursor
        Throws:
        DKException - if the destroy operation fails
        java.lang.Exception - for other errors during destruction
      • fetchNext

        public DKDDO fetchNext()
                        throws DKException,
                               java.lang.Exception
        Description copied from interface: dkResultSetCursor
        Fetches the next document from the result set and advances the cursor.
        Specified by:
        fetchNext in interface dkResultSetCursor
        Returns:
        the next DKDDO object in the result set
        Throws:
        DKException - if the fetch operation fails
        java.lang.Exception - for other errors during fetch
      • fetchObject

        public DKDDO fetchObject()
                          throws DKException,
                                 java.lang.Exception
        Description copied from interface: dkResultSetCursor
        Fetches the current object without advancing the cursor position.
        Specified by:
        fetchObject in interface dkResultSetCursor
        Returns:
        the current DKDDO object at the cursor position
        Throws:
        DKException - if the fetch operation fails
        java.lang.Exception - for other errors
      • fetchNextByName

        public java.lang.Object fetchNextByName(java.lang.String name)
                                         throws DKException,
                                                java.lang.Exception
        Description copied from interface: dkResultSetCursor
        Fetches the next value of a specific property by name.
        Specified by:
        fetchNextByName in interface dkResultSetCursor
        Parameters:
        name - the property name to fetch
        Returns:
        the property value
        Throws:
        DKException - if the fetch operation fails
        java.lang.Exception - for other errors
      • fetchNextNByName

        public int fetchNextNByName(java.lang.String name,
                                    int n,
                                    java.lang.Object[] result)
                             throws DKException,
                                    java.lang.Exception
        Description copied from interface: dkResultSetCursor
        Fetches the next N values of a specific property by name.
        Specified by:
        fetchNextNByName in interface dkResultSetCursor
        Parameters:
        name - the property name to fetch
        n - the number of values to fetch
        result - array to store the fetched values
        Returns:
        the actual number of values fetched
        Throws:
        DKException - if the fetch operation fails
        java.lang.Exception - for other errors
      • isEnd

        public boolean isEnd()
                      throws DKException,
                             java.lang.Exception
        Description copied from interface: dkResultSetCursor
        Checks if the cursor has reached the end of the result set.
        Specified by:
        isEnd in interface dkResultSetCursor
        Returns:
        true if there are no more results to fetch, false otherwise
        Throws:
        DKException - if the check fails
        java.lang.Exception - for other errors
      • findObject

        public DKDDO findObject(int option,
                                java.lang.String predicate)
                         throws DKException,
                                java.lang.Exception
        Description copied from interface: dkResultSetCursor
        Find the data object which satisfies the given predicate. Moves the cursor to that position and fetches the object.
        Specified by:
        findObject in interface dkResultSetCursor
        Parameters:
        option - Search option/direction (e.g., DKConstant.DK_CM_CONTENT_YES)
        predicate - Search predicate/condition to match
        Returns:
        The DKDDO object that matches the predicate, or null if not found
        Throws:
        DKException - if search fails
        java.lang.Exception - for other errors
      • deleteObject

        public void deleteObject()
                          throws DKException,
                                 java.lang.Exception
        Description copied from interface: dkResultSetCursor
        Deletes the current object from the datastore. The cursor position is advanced after deletion.
        Specified by:
        deleteObject in interface dkResultSetCursor
        Throws:
        DKException - if the delete operation fails
        java.lang.Exception - for other errors
      • updateObject

        public void updateObject(DKDDO ddo)
                          throws DKException,
                                 java.lang.Exception
        Description copied from interface: dkResultSetCursor
        Updates the current object in the datastore with the provided DDO.
        Specified by:
        updateObject in interface dkResultSetCursor
        Parameters:
        ddo - the DKDDO object containing updated values
        Throws:
        DKException - if the update operation fails
        java.lang.Exception - for other errors
Copyright © 2024 IBM Corporation

Copyright © 2024 IBM Corporation. All rights reserved.