use of org.jbpm.query.jpa.data.QueryWhere in project jbpm by kiegroup.
the class ErrorInfoQueryBuilderImpl method stackTraceRegex.
@Override
public ErrorInfoQueryBuilder stackTraceRegex(String... stackTraceRegex) {
QueryWhere queryWhere = getQueryWhere();
QueryCriteriaType origCriteriaType = queryWhere.getCriteriaType();
queryWhere.setToLike();
addObjectParameter(STACK_TRACE_LIST, "stack trace regex", stackTraceRegex);
switch(origCriteriaType) {
case NORMAL:
queryWhere.setToNormal();
break;
case RANGE:
queryWhere.setToRange();
break;
case GROUP:
queryWhere.setToGroup();
break;
case REGEXP:
}
return this;
}
use of org.jbpm.query.jpa.data.QueryWhere in project jbpm by kiegroup.
the class AuditQueryCriteriaUtilTest method auditQueryCriteriaWhereTest.
@Test
public void auditQueryCriteriaWhereTest() {
QueryWhere where = new QueryWhere();
// OR
where.setToUnion();
where.addParameter(NODE_ID_LIST, "node.id");
where.addParameter(NODE_INSTANCE_ID_LIST, "node-inst");
where.addParameter(TYPE_LIST, "type");
// OR (
where.newGroup();
where.setToLike();
where.addParameter(NODE_NAME_LIST, "n*ends.X");
where.setToNormal();
where.setToIntersection();
where.addParameter(TYPE_LIST, "oneOf3", "twoOf3", "thrOf3");
where.endGroup();
where.setToIntersection();
where.addRangeParameter(PROCESS_INSTANCE_ID_LIST, 0l, true);
where.addRangeParameter(PROCESS_INSTANCE_ID_LIST, 10l, false);
where.addParameter(PROCESS_ID_LIST, "org.process.id");
List<NodeInstanceLog> result = util.doCriteriaQuery(where, NodeInstanceLog.class);
assertNotNull("Null result from 1rst query.", result);
}
use of org.jbpm.query.jpa.data.QueryWhere in project jbpm by kiegroup.
the class TaskSummaryQueryBuilderImpl method build.
@Override
public ParametrizedQuery<TaskSummary> build() {
return new ParametrizedQuery<TaskSummary>() {
private QueryWhere queryWhere = new QueryWhere(getQueryWhere());
@Override
public List<TaskSummary> getResultList() {
TaskSummaryQueryCommand cmd = new TaskSummaryQueryCommand(queryWhere);
cmd.setUserId(userId);
return executor.execute(cmd);
}
};
}
use of org.jbpm.query.jpa.data.QueryWhere in project jbpm by kiegroup.
the class AuditQueryCriteriaUtilTest method auditQueryCriteriaMetaTest.
@Test
public void auditQueryCriteriaMetaTest() {
QueryWhere where = new QueryWhere();
where.setAscending(QueryParameterIdentifiers.NODE_INSTANCE_ID_LIST);
where.setCount(10);
where.setOffset(2);
List<NodeInstanceLog> result = util.doCriteriaQuery(where, NodeInstanceLog.class);
assertNotNull("Null result from 1rst query.", result);
}
Aggregations