public interface CannedQueryDAO
| Modifier and Type | Interface and Description |
|---|---|
static interface |
CannedQueryDAO.ResultHandler
A simple, typed results handler.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Long |
executeCountQuery(java.lang.String sqlNamespace,
java.lang.String queryName,
java.lang.Object parameterObj)
Execute a count(*)-style query returning a count value.
|
java.util.List |
executeQuery(java.lang.String sqlNamespace,
java.lang.String queryName,
java.lang.Object parameterObj,
int offset,
int limit)
Execute a query that returns one or more results.
|
void |
executeQuery(java.lang.String sqlNamespace,
java.lang.String queryName,
java.lang.Object parameterObj,
int offset,
int limit,
CannedQueryDAO.ResultHandler handler)
Execute a query that returns one or more results, processing the results using a handler.
|
java.lang.Object |
executeQueryUnique(java.lang.String sqlNamespace,
java.lang.String queryName,
java.lang.Object parameterObj)
Execute a query that returns exactly one result.
|
java.lang.Long executeCountQuery(java.lang.String sqlNamespace,
java.lang.String queryName,
java.lang.Object parameterObj)
All exceptions can be safely caught and handled as required.
sqlNamespace - the query namespace (defined by config file) e.g. alfresco.query.usagequeryName - the name of the query e.g. select_userCountparameterObj - the values to drive the selection (may be null if not required)QueryException - if the query returned multiple resultsjava.lang.Object executeQueryUnique(java.lang.String sqlNamespace,
java.lang.String queryName,
java.lang.Object parameterObj)
sqlNamespace - the query namespace (defined by config file) e.g. alfresco.query.usagequeryName - the name of the query e.g. select_userCountparameterObj - the values to drive the selection (may be null if not required)concurrency-related - exception if a single object was not foundjava.util.List executeQuery(java.lang.String sqlNamespace,
java.lang.String queryName,
java.lang.Object parameterObj,
int offset,
int limit)
sqlNamespace - the query namespace (defined by config file) e.g. alfresco.query.usagequeryName - the name of the query e.g. select_userCountparameterObj - the values to drive the selection (may be null if not required)offset - the number of results to skiplimit - the maximum number of results to retrieve or Integer.MAX_VALUE
for no limitvoid executeQuery(java.lang.String sqlNamespace,
java.lang.String queryName,
java.lang.Object parameterObj,
int offset,
int limit,
CannedQueryDAO.ResultHandler handler)
sqlNamespace - the query namespace (defined by config file) e.g. alfresco.query.usagequeryName - the name of the query e.g. select_userCountparameterObj - the values to drive the selection (may be null if not required)offset - the number of results to skiplimit - the maximum number of results to retrieve or Integer.MAX_VALUE
for no limitCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.