Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.jdbf.engine.sql
Class Cursor  view Cursor download Cursor.java

java.lang.Object
  extended byorg.jdbf.engine.caching.CachedObject
      extended byorg.jdbf.engine.sql.QueryResults
          extended byorg.jdbf.engine.sql.Cursor
All Implemented Interfaces:
org.jdbf.engine.caching.Cacheable

public class Cursor
extends QueryResults

This subclass of QueryResults provides rows of an sql query form cache.


Field Summary
private  org.jdbf.engine.basic.ObjectMapped[] fields
          Array of results
private  int index
          Current index
private  java.util.List results
          List of results
 
Fields inherited from class org.jdbf.engine.sql.QueryResults
className
 
Fields inherited from class org.jdbf.engine.caching.CachedObject
frequency, identifier
 
Constructor Summary
Cursor(java.util.List results, java.lang.Object id)
          Creates the Cursor object
 
Method Summary
 org.jdbf.engine.basic.ObjectMapped first()
          Retrieves first object in Cursor.
 org.jdbf.engine.basic.ObjectMapped getObject()
          Retrieves an object from an sql row.
 org.jdbf.engine.basic.ObjectMapped last()
          Retrieves last object in Cursor
 boolean next()
          The index into the results list is incremented, and true is returned if there is another result.
 void setIdentifier(java.lang.String name, java.lang.Object[] values)
          Creates the identifier into cache.Append the name with hashcode of values array
 
Methods inherited from class org.jdbf.engine.caching.CachedObject
getFrequency, getIdentifier, setFrequency, setIdentifier
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

results

private java.util.List results
List of results


index

private int index
Current index


fields

private org.jdbf.engine.basic.ObjectMapped[] fields
Array of results

Constructor Detail

Cursor

public Cursor(java.util.List results,
              java.lang.Object id)
Creates the Cursor object

Method Detail

first

public org.jdbf.engine.basic.ObjectMapped first()
Retrieves first object in Cursor.


getObject

public org.jdbf.engine.basic.ObjectMapped getObject()
Retrieves an object from an sql row.

Specified by:
getObject in class QueryResults

last

public org.jdbf.engine.basic.ObjectMapped last()
Retrieves last object in Cursor


next

public boolean next()
The index into the results list is incremented, and true is returned if there is another result.

Specified by:
next in class QueryResults

setIdentifier

public void setIdentifier(java.lang.String name,
                          java.lang.Object[] values)
Creates the identifier into cache.Append the name with hashcode of values array