jnicli
Class PrefetchedCursor

java.lang.Object
  extended byjnicli.PrefetchedCursor
All Implemented Interfaces:
Cursor, java.io.Serializable

public class PrefetchedCursor
extends java.lang.Object
implements Cursor, java.io.Serializable

See Also:
Serialized Form

Field Summary
 java.lang.Object[] objects
           
 long[] oids
           
 
Constructor Summary
PrefetchedCursor()
           
 
Method Summary
 long getOid()
          Get OID of the current object.
 boolean hasMoreElements()
          Tests if this enumeration contains more elements.
 java.lang.Object nextElement()
          Returns the next element of this enumeration if this enumeration object has at least one more element to provide.
 int size()
          Get number of selected records
 void update()
          Update current object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

objects

public java.lang.Object[] objects

oids

public long[] oids
Constructor Detail

PrefetchedCursor

public PrefetchedCursor()
Method Detail

hasMoreElements

public boolean hasMoreElements()
Description copied from interface: Cursor
Tests if this enumeration contains more elements.

Specified by:
hasMoreElements in interface Cursor
Returns:
true if and only if this enumeration object contains at least one more element to provide; false otherwise.

nextElement

public java.lang.Object nextElement()
Description copied from interface: Cursor
Returns the next element of this enumeration if this enumeration object has at least one more element to provide.

Specified by:
nextElement in interface Cursor
Returns:
the next element of this enumeration.

getOid

public long getOid()
Description copied from interface: Cursor
Get OID of the current object. This method should be used only after Enumeration.nextElement() method and its result is OID of the object returned by nextElement().

Specified by:
getOid in interface Cursor

update

public void update()
Description copied from interface: Cursor
Update current object. This method should be invoked after Enumeration.nextElement() and store updated object, returned by nextElement(). This method is not supported for prefetched cursor (which is returned for remote database or when AUTOCOMMIT flag is set in select). In this case you should use Database.update method specifying OID of updated object. This OID can be obtained using Cursor.getOid() method.

Specified by:
update in interface Cursor

size

public int size()
Description copied from interface: Cursor
Get number of selected records

Specified by:
size in interface Cursor