public interface CannedQueryDAO
Modifier and Type | Interface and Description |
---|---|
static interface |
CannedQueryDAO.ResultHandler<R>
A simple, typed results handler.
|
Modifier and Type | Method and Description |
---|---|
Long |
executeCountQuery(String sqlNamespace,
String queryName,
Object parameterObj)
Execute a count(*)-style query returning a count value.
|
<R> List<R> |
executeQuery(String sqlNamespace,
String queryName,
Object parameterObj,
int offset,
int limit)
Execute a query that returns one or more results.
|
<R> void |
executeQuery(String sqlNamespace,
String queryName,
Object parameterObj,
int offset,
int limit,
CannedQueryDAO.ResultHandler<R> handler)
Execute a query that returns one or more results, processing the results using a handler.
|
<R> R |
executeQueryUnique(String sqlNamespace,
String queryName,
Object parameterObj)
Execute a query that returns exactly one result.
|
Long executeCountQuery(String sqlNamespace, String queryName, 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 results<R> R executeQueryUnique(String sqlNamespace, String queryName, Object parameterObj)
R
- the return value's typesqlNamespace
- 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)IllegalArgumentException
- concurrency-related exception if a single object was not found<R> List<R> executeQuery(String sqlNamespace, String queryName, Object parameterObj, int offset, int limit)
R
- the return value's typesqlNamespace
- 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 limit<R> void executeQuery(String sqlNamespace, String queryName, Object parameterObj, int offset, int limit, CannedQueryDAO.ResultHandler<R> handler)
R
- the return value's typesqlNamespace
- 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–2017 Alfresco Software. All rights reserved.