oracle.toplink.queryframework
Class ScrollableCursor

java.lang.Object
  |
  +--oracle.toplink.queryframework.Cursor
        |
        +--oracle.toplink.queryframework.ScrollableCursor
All Implemented Interfaces:
java.util.Enumeration, java.util.Iterator, java.util.ListIterator, java.io.Serializable

public class ScrollableCursor
extends Cursor
implements java.util.ListIterator

See Also:
Serialized Form

Fields inherited from class oracle.toplink.queryframework.Cursor
policy
 
Constructor Summary
 
Method Summary
TypeMethod
 boolean absolute(int rows)
          PUBLIC: Moves the cursor to the given row number in the result set
 void add(java.lang.Object object)
          PUBLIC: Add is not support for scrollable cursors.
 void afterLast()
          PUBLIC: Moves the cursor to the end of the result set, just after the last row.
 void beforeFirst()
          PUBLIC: Moves the cursor to the front of the result set, just before the first row
 int currentIndex()
          PUBLIC: Retrieves the current row index number
 boolean first()
          PUBLIC: Moves the cursor to the first row in the result set
 int getPosition()
          PUBLIC: Retrieves the current cursor positon (current row).
 boolean hasMoreElements()
          PUBLIC: Indicates whether the cursor can move to the the next row
 boolean hasNext()
          PUBLIC: Indicates whether the cursor can move to the the next row
 boolean hasNextElement()
          PUBLIC: Indicates whether the cursor can move to the the next row
 boolean hasPrevious()
          PUBLIC: Indicates whether the cursor can move to the the previous row
 boolean isAfterLast()
          PUBLIC: Indicates whether the cursor is after the last row in the result set.
 boolean isBeforeFirst()
          PUBLIC: Indicates whether the cursor is before the first row in the result set.
 boolean isFirst()
          PUBLIC: Indicates whether the cursor is on the first row of the result set.
 boolean isLast()
          PUBLIC: Indicates whether the cursor is on the last row of the result set.
 boolean last()
          PUBLIC: Moves the cursor to the last row in the result set
 java.lang.Object next()
          PUBLIC: This method differs slightly from conventinal read() operation on a Java stream.
 java.util.Vector next(int number)
          PUBLIC: This method differs slightly from conventinal read() operation on a Java stream.
 java.lang.Object nextElement()
          PUBLIC: Return the next object from the collection, if beyond the read limit read from the cursor.
 int nextIndex()
          PUBLIC: Retrieves the next row index (against the current row)
 java.lang.Object previous()
          PUBLIC: Return the previous object from the collection.
 int previousIndex()
          PUBLIC: Retrieves the previous row index (against the current row)
 boolean relative(int rows)
          PUBLIC: Moves the cursor a relative number of rows, either positive or negative.
 void remove()
          PUBLIC: Remove is not support with scrollable cursors.
 void set(java.lang.Object object)
          PUBLIC: Set is not supported for scrollable cursors.
 
Methods inherited from class oracle.toplink.queryframework.Cursor
close, isClosed, size
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail
Method Detail

absolute

public boolean absolute(int rows)
                 throws DatabaseException
PUBLIC: Moves the cursor to the given row number in the result set

add

public void add(java.lang.Object object)
         throws QueryException
PUBLIC: Add is not support for scrollable cursors.
Specified by:
add in interface java.util.ListIterator

afterLast

public void afterLast()
               throws DatabaseException
PUBLIC: Moves the cursor to the end of the result set, just after the last row.

beforeFirst

public void beforeFirst()
                 throws DatabaseException
PUBLIC: Moves the cursor to the front of the result set, just before the first row

currentIndex

public int currentIndex()
                 throws DatabaseException
PUBLIC: Retrieves the current row index number

first

public boolean first()
              throws DatabaseException
PUBLIC: Moves the cursor to the first row in the result set

getPosition

public int getPosition()
                throws DatabaseException
PUBLIC: Retrieves the current cursor positon (current row). The first row is number 1, the second number 2, and so on.
Overrides:
getPosition in class Cursor
Returns:
the current row number; 0 if there is no current row
Throws:
java.sql.SQLException - if a database access error occurs

hasMoreElements

public boolean hasMoreElements()
                        throws DatabaseException
PUBLIC: Indicates whether the cursor can move to the the next row

hasNext

public boolean hasNext()
                throws DatabaseException
PUBLIC: Indicates whether the cursor can move to the the next row
Specified by:
hasNext in interface java.util.ListIterator

hasNextElement

public boolean hasNextElement()
                       throws DatabaseException
PUBLIC: Indicates whether the cursor can move to the the next row

hasPrevious

public boolean hasPrevious()
                    throws DatabaseException
PUBLIC: Indicates whether the cursor can move to the the previous row
Specified by:
hasPrevious in interface java.util.ListIterator

isAfterLast

public boolean isAfterLast()
                    throws DatabaseException
PUBLIC: Indicates whether the cursor is after the last row in the result set.

isBeforeFirst

public boolean isBeforeFirst()
                      throws DatabaseException
PUBLIC: Indicates whether the cursor is before the first row in the result set.

isFirst

public boolean isFirst()
                throws DatabaseException
PUBLIC: Indicates whether the cursor is on the first row of the result set.

isLast

public boolean isLast()
               throws DatabaseException
PUBLIC: Indicates whether the cursor is on the last row of the result set.

last

public boolean last()
             throws DatabaseException
PUBLIC: Moves the cursor to the last row in the result set

next

public java.lang.Object next()
                      throws DatabaseException,
                             QueryException
PUBLIC: This method differs slightly from conventinal read() operation on a Java stream. This method return the next object in the collection rather than specifying the number of bytes to be read in. Return the next object from the collection, if beyond the read limit read from the cursor
Specified by:
next in interface java.util.ListIterator
Returns:
- next object in stream
Throws:
- - throws exception if read pass end of stream

next

public java.util.Vector next(int number)
                      throws DatabaseException
PUBLIC: This method differs slightly from conventinal read() operation on a Java stream. This method returns the next number of objects in the collection in a vector. Return the next specified number of objects from the collection, if beyond the read limit read from the cursor
Parameters:
number - - number of objects to be returned
Returns:
- vector containing next number of objects
Throws:
- - throws exception if read pass end of stream

nextElement

public java.lang.Object nextElement()
                             throws DatabaseException,
                                    QueryException
PUBLIC: Return the next object from the collection, if beyond the read limit read from the cursor.
Returns:
next object in stream

nextIndex

public int nextIndex()
              throws DatabaseException
PUBLIC: Retrieves the next row index (against the current row)
Specified by:
nextIndex in interface java.util.ListIterator

previous

public java.lang.Object previous()
                          throws DatabaseException,
                                 QueryException
PUBLIC: Return the previous object from the collection.
Specified by:
previous in interface java.util.ListIterator
Returns:
- previous object in stream
Throws:
- - throws exception if read pass first of stream

previousIndex

public int previousIndex()
                  throws DatabaseException
PUBLIC: Retrieves the previous row index (against the current row)
Specified by:
previousIndex in interface java.util.ListIterator

relative

public boolean relative(int rows)
                 throws DatabaseException
PUBLIC: Moves the cursor a relative number of rows, either positive or negative. Attempting to move beyond the first/last row in the result set positions the cursor before/after the the first/last row

remove

public void remove()
            throws QueryException
PUBLIC: Remove is not support with scrollable cursors.
Specified by:
remove in interface java.util.ListIterator

set

public void set(java.lang.Object object)
         throws QueryException
PUBLIC: Set is not supported for scrollable cursors.
Specified by:
set in interface java.util.ListIterator