avignon.handlers.database
Class DCountQuery
java.lang.Object
avignon.handlers.database.DLookupQuery
avignon.handlers.database.DCountQuery
- public class DCountQuery
- extends DLookupQuery
Helpers class for getting the number of records matching some criteria in a table or view.
|
Constructor Summary |
DCountQuery(java.lang.String tableName)
Construct a DCountQuery that will returns total number of rows in the table or view. |
DCountQuery(java.lang.String tableName,
java.lang.String whereCondition)
Construct a DCountQuery that will returns number of rows matching the given criteria in the table or view. |
|
Method Summary |
int |
getCount(java.sql.Connection database)
Runs a count query against the given database and returns the result. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DCountQuery
public DCountQuery(java.lang.String tableName)
- Construct a DCountQuery that will returns total number of rows in the table or view.
- Parameters:
tableName - Name of a table or view that the query will operate on.
DCountQuery
public DCountQuery(java.lang.String tableName,
java.lang.String whereCondition)
- Construct a DCountQuery that will returns number of rows matching the given criteria in the table or view.
- Parameters:
tableName - Name of a table or view that the query will operate on.whereCondition - SQL where expression.
getCount
public int getCount(java.sql.Connection database)
throws java.sql.SQLException
- Runs a count query against the given database and returns the result.
- Parameters:
database -
- Returns:
-
- Throws:
java.sql.SQLException