org.ejdb.driver
Class EJDBQuery

java.lang.Object
  extended by org.ejdb.driver.EJDBQuery

public class EJDBQuery
extends java.lang.Object

EJDB Query object.

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

Field Summary
protected static int JBQRYCOUNT
           
 
Method Summary
 int count()
          Convenient count(*) operation
 int count(java.io.OutputStream log)
          Convenient count(*) operation
protected  org.ejdb.driver.EJDBQuery.QResult execute(BSONObject query, BSONObject[] qors, BSONObject hints, int flags, java.io.OutputStream log)
           
protected  org.ejdb.driver.EJDBQuery.QResult execute(BSONObject hints, int flags, java.io.OutputStream log)
           
 EJDBResultSet find()
          Execute query
 EJDBResultSet find(java.io.OutputStream log)
          Execute query
 BSONObject findOne()
          Same as find() but retrieves only one matching JSON object.
 BSONObject findOne(java.io.OutputStream log)
          Same as find() but retrieves only one matching JSON object.
 int update()
          Executes update query
 int update(java.io.OutputStream log)
          Executes update query
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JBQRYCOUNT

protected static final int JBQRYCOUNT
See Also:
Constant Field Values
Method Detail

find

public EJDBResultSet find()
                   throws EJDBException
Execute query

Throws:
EJDBException

find

public EJDBResultSet find(java.io.OutputStream log)
                   throws EJDBException,
                          java.io.IOException
Execute query

Throws:
EJDBException
java.io.IOException

findOne

public BSONObject findOne()
                   throws EJDBException
Same as find() but retrieves only one matching JSON object.

Throws:
EJDBException

findOne

public BSONObject findOne(java.io.OutputStream log)
                   throws EJDBException,
                          java.io.IOException
Same as find() but retrieves only one matching JSON object.

Throws:
EJDBException
java.io.IOException

update

public int update()
           throws EJDBException
Executes update query

Returns:
count of affected objects
Throws:
EJDBException

update

public int update(java.io.OutputStream log)
           throws EJDBException,
                  java.io.IOException
Executes update query

Returns:
count of affected objects
Throws:
EJDBException
java.io.IOException

count

public int count()
          throws EJDBException
Convenient count(*) operation

Throws:
EJDBException

count

public int count(java.io.OutputStream log)
          throws EJDBException,
                 java.io.IOException
Convenient count(*) operation

Throws:
EJDBException
java.io.IOException

execute

protected org.ejdb.driver.EJDBQuery.QResult execute(BSONObject hints,
                                                    int flags,
                                                    java.io.OutputStream log)
                                             throws EJDBException,
                                                    java.io.IOException
Throws:
EJDBException
java.io.IOException

execute

protected org.ejdb.driver.EJDBQuery.QResult execute(BSONObject query,
                                                    BSONObject[] qors,
                                                    BSONObject hints,
                                                    int flags,
                                                    java.io.OutputStream log)
                                             throws EJDBException,
                                                    java.io.IOException
Throws:
EJDBException
java.io.IOException