Enterprise Information Portal APIs

com.ibm.mm.sdk.server
Class dkAbstractResultSetCursor

java.lang.Object
  |
  +--com.ibm.mm.sdk.server.dkAbstractResultSetCursor
All Implemented Interfaces:
DKConstant, DKMessageId, dkResultSetCursor
Direct Known Subclasses:
dkAbstractResultSetCursorScrollable, DKResultSetCursorCollDL, DKResultSetCursorDB2, DKResultSetCursorDD, DKResultSetCursorDJ, DKResultSetCursorDL, DKResultSetCursorEmptyDB2, DKResultSetCursorEmptyDES, DKResultSetCursorEmptyDJ, DKResultSetCursorEmptyDL, DKResultSetCursorEmptyIC, DKResultSetCursorEmptyICM, DKResultSetCursorEmptyJDBC, DKResultSetCursorEmptyV4, DKResultSetCursorFed, DKResultSetCursorFedDL, DKResultSetCursorIC, DKResultSetCursorICM, DKResultSetCursorIP, DKResultSetCursorJDBC, DKResultSetCursorOD, DKResultSetCursorOptDL, DKResultSetCursorQBIC, DKResultSetCursorTS, DKResultSetCursorV4

public synchronized class dkAbstractResultSetCursor
extends java.lang.Object
implements dkResultSetCursor, DKConstant, DKMessageId


Fields inherited from interface com.ibm.mm.sdk.common.DKConstant
    For details, see the class or interface
 
Fields inherited from interface com.ibm.mm.sdk.common.DKMessageId
    For details, see the class or interface
 
Constructor Summary
dkAbstractResultSetCursor()
           
 
Method Summary
 void addObject(DKDDO)
          Adds an element to the datastore
 int cardinality()
          Gets the number of query results if supported.
 void close()
          Close the cursor and invalidates the result set.
 java.lang.String datastoreName()
          Gets the datastore name
 java.lang.String datastoreType()
          Gets the datastore type
 void deleteObject()
          Deletes element at the current cursor position from the datastore
 void destroy()
          Destroys the cursor.
 DKDDO fetchNext()
          Sets cursor to point to the position of the next data object and fetches the element in the cursor at that position
 java.lang.Object fetchNextByName(java.lang.String)
          Sets cursor to point to the position of the next data object and fetches the data item value in the cursor at that position by data item name.
 boolean fetchNextN(int, dkCollection)
          Fetches the next N elements of the cursor and inserts them into the given collection
 boolean fetchNextNByName(java.lang.String, int, java.lang.Object[])
          Fetches the next N data item values of the cursor and inserts them into the given array
 DKDDO fetchObject()
          Fetches the element in the cursor at the current position
 java.lang.Object fetchObjectByName(java.lang.String)
          Fetches the data item value in the cursor at the current position by data item name
 DKDDO findObject(int, java.lang.String)
          Find the data object which satisfies the given predicate, move the cursor to that position, fetch
 int getPosition()
          Gets the current cursor position
 DKHandle handle(int)
          Gets a cursor handle
 DKHandle handle(java.lang.String)
          Gets a cursor handle
 boolean isBegin()
          Begin indicator
 boolean isEnd()
          End indicator
 boolean isInBetween()
          Between data objects in cursor indicator
 boolean isOpen()
          Open indicator
 boolean isScrollable()
          Scrollable indicator
 boolean isUpdatable()
          Updatable indicator
 boolean isValid()
          Valid indicator
 DKDDO newObject()
          Constructs a new DDO of the same type as the items in the result
 java.lang.String objectType()
          Gets the cursor object type
 void open()
          Opens the cursor.
 void open(DKNVPair[])
          Opens the cursor.
 void setPosition(int, java.lang.Object)
          Sets the cursor position
 void setToNext()
          Sets cursor to point to the position of the next data object in the cursor
 void updateObject(DKDDO)
          Updates element at the current cursor position from the datastore
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

dkAbstractResultSetCursor

public dkAbstractResultSetCursor()
Method Detail

isScrollable

public boolean isScrollable()
                     throws DKException,
                            java.lang.Exception
Description copied from interface: dkResultSetCursor
Scrollable indicator
Specified by:
isScrollable in interface dkResultSetCursor
Following copied from interface: com.ibm.mm.sdk.common.dkResultSetCursor
Returns:
true if cursor can be scrolled forward and backward

isUpdatable

public boolean isUpdatable()
                    throws DKException,
                           java.lang.Exception
Description copied from interface: dkResultSetCursor
Updatable indicator
Specified by:
isUpdatable in interface dkResultSetCursor
Following copied from interface: com.ibm.mm.sdk.common.dkResultSetCursor
Returns:
true if cursor is updatable

isValid

public boolean isValid()
                throws DKException,
                       java.lang.Exception
Description copied from interface: dkResultSetCursor
Valid indicator
Specified by:
isValid in interface dkResultSetCursor
Following copied from interface: com.ibm.mm.sdk.common.dkResultSetCursor
Returns:
true if cursor is valid

isOpen

public boolean isOpen()
               throws DKException,
                      java.lang.Exception
Description copied from interface: dkResultSetCursor
Open indicator
Specified by:
isOpen in interface dkResultSetCursor
Following copied from interface: com.ibm.mm.sdk.common.dkResultSetCursor
Returns:
true is cursor is in an opened state

isBegin

public boolean isBegin()
                throws DKException,
                       java.lang.Exception
Description copied from interface: dkResultSetCursor
Begin indicator
Specified by:
isBegin in interface dkResultSetCursor
Following copied from interface: com.ibm.mm.sdk.common.dkResultSetCursor
Returns:
true if cursor is positioned at the beginning

isEnd

public boolean isEnd()
              throws DKException,
                     java.lang.Exception
Description copied from interface: dkResultSetCursor
End indicator
Specified by:
isEnd in interface dkResultSetCursor
Following copied from interface: com.ibm.mm.sdk.common.dkResultSetCursor
Returns:
true if cursor is positioned at the end.

isInBetween

public boolean isInBetween()
                    throws DKException,
                           java.lang.Exception
Description copied from interface: dkResultSetCursor
Between data objects in cursor indicator
Specified by:
isInBetween in interface dkResultSetCursor
Following copied from interface: com.ibm.mm.sdk.common.dkResultSetCursor
Returns:
true if cursor is in between data objects in the cursor.

getPosition

public int getPosition()
                throws DKException,
                       java.lang.Exception
Description copied from interface: dkResultSetCursor
Gets the current cursor position
Specified by:
getPosition in interface dkResultSetCursor
Following copied from interface: com.ibm.mm.sdk.common.dkResultSetCursor
Returns:
cursor position

setPosition

public void setPosition(int,
                        java.lang.Object)
                 throws DKException,
                        java.lang.Exception
Description copied from interface: dkResultSetCursor
Sets the cursor position
Specified by:
setPosition in interface dkResultSetCursor
Following copied from interface: com.ibm.mm.sdk.common.dkResultSetCursor
Parameters:
position - cursor position option
  • DK_CM_ABSOLUTE (only scrollable cursors)
  • DK_CM_RELATIVE
  • DK_CM_BEGIN (only scrollable cursors)
  • DK_CM_END (only scrollable cursors)
  • DK_CM_FIRST (only scrollable cursors)
  • DK_CM_LAST (only scrollable cursors)
  • DK_CM_NEXT
  • DK_CM_PREVIOUS (only scrollable cursors)
value - cursor position value (optional). This value should be set when the position is DK_CM_ABSOLUTE or DK_CM_RELATIVE. This value is an Integer value.

setToNext

public void setToNext()
               throws DKException,
                      java.lang.Exception
Description copied from interface: dkResultSetCursor
Sets cursor to point to the position of the next data object in the cursor
Specified by:
setToNext in interface dkResultSetCursor

fetchObject

public DKDDO fetchObject()
                  throws DKException,
                         java.lang.Exception
Description copied from interface: dkResultSetCursor
Fetches the element in the cursor at the current position
Specified by:
fetchObject in interface dkResultSetCursor
Following copied from interface: com.ibm.mm.sdk.common.dkResultSetCursor
Returns:
DDO

fetchNext

public DKDDO fetchNext()
                throws DKException,
                       java.lang.Exception
Description copied from interface: dkResultSetCursor
Sets cursor to point to the position of the next data object and fetches the element in the cursor at that position
Specified by:
fetchNext in interface dkResultSetCursor
Following copied from interface: com.ibm.mm.sdk.common.dkResultSetCursor
Returns:
DDO

fetchNextN

public boolean fetchNextN(int,
                          dkCollection)
                   throws DKException,
                          java.lang.Exception
Description copied from interface: dkResultSetCursor
Fetches the next N elements of the cursor and inserts them into the given collection
Specified by:
fetchNextN in interface dkResultSetCursor
Following copied from interface: com.ibm.mm.sdk.common.dkResultSetCursor
Parameters:
how_many - how many elements the user wants to be returned in the collection.
collection - the collection where elements that are fetched are stored.
Returns:
false when no more data objects to return.

fetchObjectByName

public java.lang.Object fetchObjectByName(java.lang.String)
                                   throws DKException,
                                          java.lang.Exception
Description copied from interface: dkResultSetCursor
Fetches the data item value in the cursor at the current position by data item name
Specified by:
fetchObjectByName in interface dkResultSetCursor
Following copied from interface: com.ibm.mm.sdk.common.dkResultSetCursor
Parameters:
dataItemName - data item name
Returns:
data item value

fetchNextByName

public java.lang.Object fetchNextByName(java.lang.String)
                                 throws DKException,
                                        java.lang.Exception
Description copied from interface: dkResultSetCursor
Sets cursor to point to the position of the next data object and fetches the data item value in the cursor at that position by data item name.
Specified by:
fetchNextByName in interface dkResultSetCursor
Following copied from interface: com.ibm.mm.sdk.common.dkResultSetCursor
Parameters:
dataItemName - data item name
Returns:
data item value

fetchNextNByName

public boolean fetchNextNByName(java.lang.String,
                                int,
                                java.lang.Object[])
                         throws DKException,
                                java.lang.Exception
Description copied from interface: dkResultSetCursor
Fetches the next N data item values of the cursor and inserts them into the given array
Specified by:
fetchNextNByName in interface dkResultSetCursor
Following copied from interface: com.ibm.mm.sdk.common.dkResultSetCursor
Parameters:
dataItemName - data item name
how_many - how many data item values the user wants to be returned in the collection.
array - the array where the data item values that are fetched are stored.
Returns:
false when no more data item values to return.

findObject

public DKDDO findObject(int,
                        java.lang.String)
                 throws DKException,
                        java.lang.Exception
Description copied from interface: dkResultSetCursor
Find the data object which satisfies the given predicate, move the cursor to that position, fetch

Note:DKUsageError exception thrown if method is not implemented

Specified by:
findObject in interface dkResultSetCursor
Following copied from interface: com.ibm.mm.sdk.common.dkResultSetCursor
Parameters:
position - cursor position
predicate - search predicate.
Returns:
DDO

deleteObject

public void deleteObject()
                  throws DKException,
                         java.lang.Exception
Description copied from interface: dkResultSetCursor
Deletes element at the current cursor position from the datastore

Note:DKUsageError exception thrown if method is not implemented

Specified by:
deleteObject in interface dkResultSetCursor

updateObject

public void updateObject(DKDDO)
                  throws DKException,
                         java.lang.Exception
Description copied from interface: dkResultSetCursor
Updates element at the current cursor position from the datastore

Note:DKUsageError exception thrown if method is not implemented

Specified by:
updateObject in interface dkResultSetCursor
Following copied from interface: com.ibm.mm.sdk.common.dkResultSetCursor
Parameters:
ddo - the ddo to update

newObject

public DKDDO newObject()
                throws DKException,
                       java.lang.Exception
Description copied from interface: dkResultSetCursor
Constructs a new DDO of the same type as the items in the result

Note:DKUsageError exception thrown if method is not implemented

Specified by:
newObject in interface dkResultSetCursor
Following copied from interface: com.ibm.mm.sdk.common.dkResultSetCursor
Returns:
DDO

addObject

public void addObject(DKDDO)
               throws DKException,
                      java.lang.Exception
Description copied from interface: dkResultSetCursor
Adds an element to the datastore

Note:DKUsageError exception thrown if method is not implemented

Specified by:
addObject in interface dkResultSetCursor
Following copied from interface: com.ibm.mm.sdk.common.dkResultSetCursor
Parameters:
ddo - the ddo to add

open

public void open()
          throws DKException,
                 java.lang.Exception
Description copied from interface: dkResultSetCursor
Opens the cursor. This reexcutes the query and repositions the cursor to the beginning.
Specified by:
open in interface dkResultSetCursor

close

public void close()
           throws DKException,
                  java.lang.Exception
Description copied from interface: dkResultSetCursor
Close the cursor and invalidates the result set.
Specified by:
close in interface dkResultSetCursor

destroy

public void destroy()
             throws DKException,
                    java.lang.Exception
Description copied from interface: dkResultSetCursor
Destroys the cursor. This method allows for cleanup, before garbage-collection is done on this class.
Specified by:
destroy in interface dkResultSetCursor

open

public void open(DKNVPair[])
          throws DKException,
                 java.lang.Exception
Description copied from interface: dkResultSetCursor
Opens the cursor. This reexecutes the query and repositions the cursor to the beginning.
Specified by:
open in interface dkResultSetCursor
Following copied from interface: com.ibm.mm.sdk.common.dkResultSetCursor
Parameters:
parms - allows for parameters to be passed in for the reexecution of the query.

datastoreName

public java.lang.String datastoreName()
                               throws java.lang.Exception
Description copied from interface: dkResultSetCursor
Gets the datastore name
Specified by:
datastoreName in interface dkResultSetCursor
Following copied from interface: com.ibm.mm.sdk.common.dkResultSetCursor
Returns:
datastore name

datastoreType

public java.lang.String datastoreType()
                               throws java.lang.Exception
Description copied from interface: dkResultSetCursor
Gets the datastore type
Specified by:
datastoreType in interface dkResultSetCursor
Following copied from interface: com.ibm.mm.sdk.common.dkResultSetCursor
Returns:
datastore type

handle

public DKHandle handle(int)
                throws java.lang.Exception
Description copied from interface: dkResultSetCursor
Gets a cursor handle
Specified by:
handle in interface dkResultSetCursor
Following copied from interface: com.ibm.mm.sdk.common.dkResultSetCursor
Parameters:
type - type of cursor handle wanted
Returns:
a cursor handle
See Also:
dkResultSetCursor.handle(java.lang.String)

handle

public DKHandle handle(java.lang.String)
                throws java.lang.Exception
Description copied from interface: dkResultSetCursor
Gets a cursor handle
Specified by:
handle in interface dkResultSetCursor
Following copied from interface: com.ibm.mm.sdk.common.dkResultSetCursor
Parameters:
type - type of cursor handle wanted
Returns:
a cursor handle

cardinality

public int cardinality()
                throws DKException,
                       java.lang.Exception
Description copied from interface: dkResultSetCursor
Gets the number of query results if supported. This number may be an approximation for some back end datastores.

Note:DKUsageError exception thrown if method is not implemented

Specified by:
cardinality in interface dkResultSetCursor
Following copied from interface: com.ibm.mm.sdk.common.dkResultSetCursor
Returns:
number of query results. May be approximation.

objectType

public java.lang.String objectType()
                            throws java.lang.Exception
Description copied from interface: dkResultSetCursor
Gets the cursor object type
Specified by:
objectType in interface dkResultSetCursor
Following copied from interface: com.ibm.mm.sdk.common.dkResultSetCursor
Returns:
cursor object type

EIP Java APIs

(c) Copyright International Business Machines Corporation 1996, 2002. IBM Corp. All rights reserved.