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 voidclose()Closes the cursor and releases associated resources.voiddeleteObject()Deletes the current object from the datastore.voiddestroy()Permanently destroys the cursor and releases all resources.DKDDOfetchNext()Fetches the next document from the result set and advances the cursor.java.lang.ObjectfetchNextByName(java.lang.String name)Fetches the next value of a specific property by name.intfetchNextNByName(java.lang.String name, int n, java.lang.Object[] result)Fetches the next N values of a specific property by name.DKDDOfetchObject()Fetches the current object without advancing the cursor position.DKDDOfindObject(int option, java.lang.String predicate)Find the data object which satisfies the given predicate.booleanisEnd()Checks if the cursor has reached the end of the result set.voidopen()Opens the cursor for use, initializing it for fetching results.voidupdateObject(DKDDO ddo)Updates the current object in the datastore with the provided DDO.
-
-
-
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.ExceptionConstructor for query-based result set cursor.- Parameters:
query- The SQL query string to executepageSize- Maximum number of results per pagepropertyFilter- Filter for properties to retrievecontinuable- Whether the cursor is continuablesqlTimeout- Query timeout in millisecondsprefetchSize- Number of rows to prefetch in each blockprepareOnly- If true, prepare query but don't execute immediatelydocumentService- Service for document operationsdatastoreICM- Reference to the datastore- Throws:
java.lang.Exception- if initialization fails
-
-
Method Detail
-
open
public void open() throws DKExceptionDescription copied from interface:dkResultSetCursorOpens the cursor for use, initializing it for fetching results. Must be called before fetching operations.- Specified by:
openin interfacedkResultSetCursor- Throws:
DKException- if the open operation fails
-
close
public void close() throws DKException, java.lang.ExceptionDescription copied from interface:dkResultSetCursorCloses the cursor and releases associated resources. The cursor can be reopened after closing.- Specified by:
closein interfacedkResultSetCursor- Throws:
DKException- if the close operation failsjava.lang.Exception- for other errors during close
-
destroy
public void destroy() throws DKException, java.lang.ExceptionDescription copied from interface:dkResultSetCursorPermanently destroys the cursor and releases all resources. The cursor cannot be used after destruction.- Specified by:
destroyin interfacedkResultSetCursor- Throws:
DKException- if the destroy operation failsjava.lang.Exception- for other errors during destruction
-
fetchNext
public DKDDO fetchNext() throws DKException, java.lang.Exception
Description copied from interface:dkResultSetCursorFetches the next document from the result set and advances the cursor.- Specified by:
fetchNextin interfacedkResultSetCursor- Returns:
- the next DKDDO object in the result set
- Throws:
DKException- if the fetch operation failsjava.lang.Exception- for other errors during fetch
-
fetchObject
public DKDDO fetchObject() throws DKException, java.lang.Exception
Description copied from interface:dkResultSetCursorFetches the current object without advancing the cursor position.- Specified by:
fetchObjectin interfacedkResultSetCursor- Returns:
- the current DKDDO object at the cursor position
- Throws:
DKException- if the fetch operation failsjava.lang.Exception- for other errors
-
fetchNextByName
public java.lang.Object fetchNextByName(java.lang.String name) throws DKException, java.lang.ExceptionDescription copied from interface:dkResultSetCursorFetches the next value of a specific property by name.- Specified by:
fetchNextByNamein interfacedkResultSetCursor- Parameters:
name- the property name to fetch- Returns:
- the property value
- Throws:
DKException- if the fetch operation failsjava.lang.Exception- for other errors
-
fetchNextNByName
public int fetchNextNByName(java.lang.String name, int n, java.lang.Object[] result) throws DKException, java.lang.ExceptionDescription copied from interface:dkResultSetCursorFetches the next N values of a specific property by name.- Specified by:
fetchNextNByNamein interfacedkResultSetCursor- Parameters:
name- the property name to fetchn- the number of values to fetchresult- array to store the fetched values- Returns:
- the actual number of values fetched
- Throws:
DKException- if the fetch operation failsjava.lang.Exception- for other errors
-
isEnd
public boolean isEnd() throws DKException, java.lang.ExceptionDescription copied from interface:dkResultSetCursorChecks if the cursor has reached the end of the result set.- Specified by:
isEndin interfacedkResultSetCursor- Returns:
- true if there are no more results to fetch, false otherwise
- Throws:
DKException- if the check failsjava.lang.Exception- for other errors
-
findObject
public DKDDO findObject(int option, java.lang.String predicate) throws DKException, java.lang.Exception
Description copied from interface:dkResultSetCursorFind the data object which satisfies the given predicate. Moves the cursor to that position and fetches the object.- Specified by:
findObjectin interfacedkResultSetCursor- 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 failsjava.lang.Exception- for other errors
-
deleteObject
public void deleteObject() throws DKException, java.lang.ExceptionDescription copied from interface:dkResultSetCursorDeletes the current object from the datastore. The cursor position is advanced after deletion.- Specified by:
deleteObjectin interfacedkResultSetCursor- Throws:
DKException- if the delete operation failsjava.lang.Exception- for other errors
-
updateObject
public void updateObject(DKDDO ddo) throws DKException, java.lang.Exception
Description copied from interface:dkResultSetCursorUpdates the current object in the datastore with the provided DDO.- Specified by:
updateObjectin interfacedkResultSetCursor- Parameters:
ddo- the DKDDO object containing updated values- Throws:
DKException- if the update operation failsjava.lang.Exception- for other errors
-
-