|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface CannedQueryDAO
DAO services for general-use database canned queries. Note that this is specifically targeted at low-level queries to the persistance layer.
| Nested Class Summary | |
|---|---|
static interface |
CannedQueryDAO.ResultHandler
A simple, typed results handler. |
| Method Summary | |
|---|---|
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. |
| Method Detail |
|---|
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 results
java.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 found
java.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 limit
void 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 limit
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||