org.tentackle.appworx
Class AppDbQuery<T extends AppDbObject>

java.lang.Object
  extended by org.tentackle.db.Query
      extended by org.tentackle.appworx.AppDbQuery<T>
Type Parameters:
T - the database object class

public class AppDbQuery<T extends AppDbObject>
extends Query

Extends Query for application database objects.

Author:
harald

Constructor Summary
AppDbQuery(QbfParameter qbfPar)
          Construct a default query from a QbfParameter.
This is just a legacy constructor to save typing.
AppDbQuery(QbfParameter qbfPar, T object)
          Construct a default query from a QbfParameter for this kind of object.
Initializes the query with default query for the given object.
 
Method Summary
 AppDbCursor<T> cursor()
          Executes the query and returns a cursor with ResultSet.TYPE_FORWARD_ONLY and ResultSet.CONCUR_READ_ONLY.
 AppDbCursor<T> cursor(Class clazz)
          Executes the query and returns a cursor with ResultSet.TYPE_FORWARD_ONLY and ResultSet.CONCUR_READ_ONLY.
 AppDbCursor<T> cursor(Class clazz, int resultSetType)
          Executes the query and returns a cursor with ResultSet.CONCUR_READ_ONLY.
 AppDbCursor<T> cursor(Class clazz, int resultSetType, int resultSetConcurrency)
          Executes the query and returns a cursor.
 AppDbCursor<T> cursor(int resultSetType)
          Executes the query and returns a cursor with ResultSet.CONCUR_READ_ONLY.
 ResultSetWrapper execute()
          Executes the query with ResultSet.TYPE_FORWARD_ONLY and ResultSet.CONCUR_READ_ONLY.
 ResultSetWrapper execute(int resultSetType)
          Executes the query with ResultSet.CONCUR_READ_ONLY.
 ResultSetWrapper execute(int resultSetType, int resultSetConcurrency)
          Executes the query.
 
Methods inherited from class org.tentackle.db.Query
add, apply, execute, execute, execute, getEstimatedRowCount, getFetchSize, getLimit, getMaxRows, getOffset, getSql, isCloseStatementOnClose, setCloseStatementOnClose, setFetchSize, setLimit, setMaxRows, setOffset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AppDbQuery

public AppDbQuery(QbfParameter qbfPar)
Construct a default query from a QbfParameter.
This is just a legacy constructor to save typing. Use this constructor if the query should not be initialized with the default query.

Parameters:
qbfPar - the qbfParameter

AppDbQuery

public AppDbQuery(QbfParameter qbfPar,
                  T object)
Construct a default query from a QbfParameter for this kind of object.
Initializes the query with default query for the given object.

Parameters:
qbfPar - the qbfParameter
object - the AppDbObject to create the default query for
Method Detail

execute

public ResultSetWrapper execute(int resultSetType,
                                int resultSetConcurrency)
Executes the query.

Parameters:
resultSetType - one of ResultSet.TYPE_...
resultSetConcurrency - one of ResultSet.CONCUR_...
Returns:
the result set

execute

public ResultSetWrapper execute(int resultSetType)
Executes the query with ResultSet.CONCUR_READ_ONLY.

Parameters:
resultSetType - one of ResultSet.TYPE_...
Returns:
the result set

execute

public ResultSetWrapper execute()
Executes the query with ResultSet.TYPE_FORWARD_ONLY and ResultSet.CONCUR_READ_ONLY.

Returns:
the result set

cursor

public AppDbCursor<T> cursor(Class clazz,
                             int resultSetType,
                             int resultSetConcurrency)
Executes the query and returns a cursor.

Parameters:
clazz - the optional clazz, null = take from qbfPar
resultSetType - one of ResultSet.TYPE_...
resultSetConcurrency - one of ResultSet.CONCUR_...
Returns:
the cursor

cursor

public AppDbCursor<T> cursor(Class clazz,
                             int resultSetType)
Executes the query and returns a cursor with ResultSet.CONCUR_READ_ONLY.

Parameters:
clazz - the optional clazz, null = take from qbfPar
resultSetType - one of ResultSet.TYPE_...
Returns:
the cursor

cursor

public AppDbCursor<T> cursor(int resultSetType)
Executes the query and returns a cursor with ResultSet.CONCUR_READ_ONLY.

Parameters:
resultSetType - one of ResultSet.TYPE_...
Returns:
the cursor

cursor

public AppDbCursor<T> cursor(Class clazz)
Executes the query and returns a cursor with ResultSet.TYPE_FORWARD_ONLY and ResultSet.CONCUR_READ_ONLY.

Parameters:
clazz - the optional clazz, null = take from qbfPar
Returns:
the cursor

cursor

public AppDbCursor<T> cursor()
Executes the query and returns a cursor with ResultSet.TYPE_FORWARD_ONLY and ResultSet.CONCUR_READ_ONLY.

Returns:
the cursor


Copyright © 2001-2008 Harald Krake, Bergstr. 48, 78098 Triberg, Germany, harald@krake.de