Enterprise Information Portal APIs

com.ibm.mm.beans
Class CMBResultSetCursor

java.lang.Object
  |
  +--com.ibm.mm.beans.CMBResultSetCursor
All Implemented Interfaces:
java.io.Serializable

public class CMBResultSetCursor
extends java.lang.Object
implements java.io.Serializable

This is the helper class for the CMBSearchResults bean. This class provides functions for cursor manipulation.

Since:
6.1
See Also:
CMBSearchResults, Serialized Form

Method Summary
 void close()
          Close the cursor and invalidates the result set.
 void deleteObject()
          Deletes element at the current cursor position from the datastore
 void destroy()
          Destroys the cursor.
 CMBItem fetchNext()
          Sets cursor to point to the position of the next data object and fetches the element in the cursor at that position
 CMBItem fetchObject()
          Fetches the element in the cursor at the current position
 CMBItem findObject(int position, java.lang.String predicate)
          Find the data object which satisfies the given predicate, move the cursor to that position, fetch
 int getPosition()
          Gets the current cursor position
 int getResultCount()
          Gets the number of query results
 boolean isBegin()
          Begin indicator
 boolean isEnd()
          End indicator
 boolean isInBetween()
          Between data objects in cursor indicator
 boolean isOpen()
          Open indicator
 boolean isValid()
          Valid indicator
 CMBItem newObject()
          Constructs a new CMBItem of the same type as the items in the result
 void setPosition(int position, java.lang.Object value)
          Sets the cursor position
 void setToNext()
          Sets cursor to point to the position of the next data object in the cursor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isValid

public boolean isValid()
                throws java.lang.Exception
Valid indicator
Returns:
true if cursor is valid.

isOpen

public boolean isOpen()
               throws CMBCursorNotValidException,
                      java.lang.Exception
Open indicator
Returns:
true is cursor is in an opened state.

isBegin

public boolean isBegin()
                throws CMBCursorNotValidException,
                       java.lang.Exception
Begin indicator
Returns:
true if cursor is positioned at the beginning.

isEnd

public boolean isEnd()
              throws CMBCursorNotValidException,
                     java.lang.Exception
End indicator
Returns:
true if cursor is positioned at the end.

isInBetween

public boolean isInBetween()
                    throws CMBCursorNotValidException,
                           java.lang.Exception
Between data objects in cursor indicator
Returns:
true if cursor is in between data objects in the cursor.

getPosition

public int getPosition()
                throws CMBCursorNotValidException,
                       java.lang.Exception
Gets the current cursor position
Returns:
cursor position

setPosition

public void setPosition(int position,
                        java.lang.Object value)
                 throws CMBCursorNotValidException,
                        java.lang.Exception
Sets the cursor position
Parameters:
position - cursor position option
value - cursor position value

setToNext

public void setToNext()
               throws CMBCursorNotValidException,
                      java.lang.Exception
Sets cursor to point to the position of the next data object in the cursor.

fetchObject

public CMBItem fetchObject()
                    throws CMBCursorNotValidException,
                           java.lang.Exception
Fetches the element in the cursor at the current position
Returns:
DDO

fetchNext

public CMBItem fetchNext()
                  throws CMBCursorNotValidException,
                         java.lang.Exception
Sets cursor to point to the position of the next data object and fetches the element in the cursor at that position
Returns:
DDO

findObject

public CMBItem findObject(int position,
                          java.lang.String predicate)
                   throws CMBCursorNotValidException,
                          java.lang.Exception
Find the data object which satisfies the given predicate, move the cursor to that position, fetch
Returns:
DDO

deleteObject

public void deleteObject()
                  throws CMBCursorNotValidException,
                         java.lang.Exception
Deletes element at the current cursor position from the datastore

newObject

public CMBItem newObject()
                  throws CMBCursorNotValidException,
                         java.lang.Exception
Constructs a new CMBItem of the same type as the items in the result
Returns:
CMBItem object

close

public void close()
           throws CMBCursorNotValidException,
                  java.lang.Exception
Close the cursor and invalidates the result set.

destroy

public void destroy()
             throws CMBCursorNotValidException,
                    java.lang.Exception
Destroys the cursor. This method allows for cleanup, before garbage-collection is done on this class.

getResultCount

public int getResultCount()
                   throws CMBCursorNotValidException,
                          java.lang.Exception
Gets the number of query results
Returns:
number of query results

EIP JavaBeans

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