本文整理汇总了Java中org.flowable.engine.common.api.query.Query类的典型用法代码示例。如果您正苦于以下问题:Java Query类的具体用法?Java Query怎么用?Java Query使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Query类属于org.flowable.engine.common.api.query包,在下文中一共展示了Query类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getForms
import org.flowable.engine.common.api.query.Query; //导入依赖的package包/类
protected <T extends Query<?, ?>, U extends Object> List<WorkflowFormTO> getForms(final Query<T, U> query) {
List<WorkflowFormTO> forms = new ArrayList<>();
query.list().forEach(obj -> {
try {
if (obj instanceof HistoricTaskInstance) {
forms.add(getFormTO((HistoricTaskInstance) obj));
} else if (obj instanceof Task) {
forms.add(getFormTO((Task) obj));
} else {
throw new FlowableException(
"Failure retrieving form", new IllegalArgumentException("Invalid task type"));
}
} catch (FlowableException e) {
LOG.debug("No form found for task {}", obj, e);
}
});
return forms;
}
示例2: paginateList
import org.flowable.engine.common.api.query.Query; //导入依赖的package包/类
@SuppressWarnings("rawtypes")
public DataResponse paginateList(Map<String, String> requestParams, Query query, String defaultSort, Map<String, QueryProperty> properties) {
return paginateList(requestParams, null, query, defaultSort, properties);
}
示例3: paginateList
import org.flowable.engine.common.api.query.Query; //导入依赖的package包/类
/**
* Uses the pagination parameters from the request and makes sure to order the result and set all pagination attributes for the response to render.
*
* @param requestParams
* The request containing the pagination parameters
* @param query
* The query to get the paged list from
* @param defaultSort
* The default sort column (the rest attribute) that later will be mapped to an internal engine name
* @param properties
*
*/
public DataResponse<RES> paginateList(Map<String, String> requestParams, Query<?, REQ> query, String defaultSort, Map<String, QueryProperty> properties) {
return paginateList(requestParams, null, query, defaultSort, properties);
}