Search in sources :

Example 1 with HumanTaskJPQLQueryBuilder

use of org.wso2.carbon.humantask.core.dao.sql.HumanTaskJPQLQueryBuilder in project carbon-business-process by wso2.

the class HumanTaskDAOConnectionImpl method getTasksCount.

public int getTasksCount(SimpleQueryCriteria queryCriteria) {
    HumanTaskJPQLQueryBuilder queryBuilder = new HumanTaskJPQLQueryBuilder(queryCriteria, entityManager);
    Query countQuery = queryBuilder.buildCount();
    int firstResult = Integer.parseInt(countQuery.getSingleResult().toString());
    return firstResult;
}
Also used : Query(javax.persistence.Query) HumanTaskJPQLQueryBuilder(org.wso2.carbon.humantask.core.dao.sql.HumanTaskJPQLQueryBuilder)

Example 2 with HumanTaskJPQLQueryBuilder

use of org.wso2.carbon.humantask.core.dao.sql.HumanTaskJPQLQueryBuilder in project carbon-business-process by wso2.

the class HumanTaskDAOConnectionImpl method removeTasks.

public void removeTasks(SimpleQueryCriteria queryCriteria) {
    HumanTaskJPQLQueryBuilder queryBuilder = new HumanTaskJPQLQueryBuilder(queryCriteria, entityManager);
    Query taskQuery = queryBuilder.build();
    taskQuery.executeUpdate();
}
Also used : Query(javax.persistence.Query) HumanTaskJPQLQueryBuilder(org.wso2.carbon.humantask.core.dao.sql.HumanTaskJPQLQueryBuilder)

Example 3 with HumanTaskJPQLQueryBuilder

use of org.wso2.carbon.humantask.core.dao.sql.HumanTaskJPQLQueryBuilder in project carbon-business-process by wso2.

the class HumanTaskDAOConnectionImpl method searchTasks.

public List<TaskDAO> searchTasks(SimpleQueryCriteria queryCriteria) {
    HumanTaskJPQLQueryBuilder queryBuilder = new HumanTaskJPQLQueryBuilder(queryCriteria, entityManager);
    Query taskQuery = queryBuilder.build();
    return taskQuery.getResultList();
}
Also used : Query(javax.persistence.Query) HumanTaskJPQLQueryBuilder(org.wso2.carbon.humantask.core.dao.sql.HumanTaskJPQLQueryBuilder)

Aggregations

Query (javax.persistence.Query)3 HumanTaskJPQLQueryBuilder (org.wso2.carbon.humantask.core.dao.sql.HumanTaskJPQLQueryBuilder)3