public class CannedQueryDAOImpl extends AbstractCannedQueryDAOImpl
CannedQueryDAO.ResultHandler<R>
controlDAO, logger
Constructor and Description |
---|
CannedQueryDAOImpl() |
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.
|
void |
init()
Checks that properties have been set
|
void |
setSqlSessionTemplate(org.mybatis.spring.SqlSessionTemplate sqlSessionTemplate) |
setControlDAO
public final void setSqlSessionTemplate(org.mybatis.spring.SqlSessionTemplate sqlSessionTemplate)
public void init()
AbstractCannedQueryDAOImpl
init
in class AbstractCannedQueryDAOImpl
public Long executeCountQuery(String sqlNamespace, String queryName, Object parameterObj)
All exceptions can be safely caught and handled as required.
Only one return value is allowed and is checked to prevent null returns.
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)public <R> R executeQueryUnique(String sqlNamespace, String queryName, Object parameterObj)
CannedQueryDAO
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)public <R> List<R> executeQuery(String sqlNamespace, String queryName, Object parameterObj, int offset, int limit)
CannedQueryDAO
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 limitpublic <R> void executeQuery(String sqlNamespace, String queryName, Object parameterObj, int offset, int limit, CannedQueryDAO.ResultHandler<R> handler)
CannedQueryDAO
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.