org.ejdb.driver
Class EJDBResultSet

java.lang.Object
  extended by org.ejdb.driver.EJDBResultSet
All Implemented Interfaces:
java.io.Closeable, java.lang.Iterable<BSONObject>, java.util.Iterator<BSONObject>

public class EJDBResultSet
extends java.lang.Object
implements java.lang.Iterable<BSONObject>, java.util.Iterator<BSONObject>, java.io.Closeable

Version:
$Id$
Author:
Tyutyunkov Vyacheslav (tve@softmotions.com)

Method Summary
protected  BSONObject _get(int position)
          Returns object by position
 void close()
          
protected  void finalize()
          
 BSONObject get(int position)
          Returns object by position
 boolean hasNext()
          
 java.util.Iterator<BSONObject> iterator()
          
 int length()
          Returns objects count in result set
 BSONObject next()
          
 void remove()
          
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

_get

protected BSONObject _get(int position)
                   throws EJDBException
Returns object by position

Throws:
EJDBException

get

public BSONObject get(int position)
               throws EJDBException
Returns object by position

Throws:
EJDBException

length

public int length()
Returns objects count in result set


iterator

public java.util.Iterator<BSONObject> iterator()

Specified by:
iterator in interface java.lang.Iterable<BSONObject>

hasNext

public boolean hasNext()

Specified by:
hasNext in interface java.util.Iterator<BSONObject>

next

public BSONObject next()
                throws EJDBException

Specified by:
next in interface java.util.Iterator<BSONObject>
Throws:
EJDBException

remove

public void remove()

Specified by:
remove in interface java.util.Iterator<BSONObject>

close

public void close()
           throws EJDBException

Specified by:
close in interface java.io.Closeable
Throws:
EJDBException

finalize

protected void finalize()
                 throws java.lang.Throwable

Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable