use of com.qlangtech.tis.workflow.dao.IWorkFlowDAO in project tis by qlangtech.
the class OfflineDatasourceAction method doGetWorkflows.
// /**
// * Do get commit version diff. 获取两个版本的变更记录
// *
// * @param context the context
// * @throws Exception the exception
// */
// public void doGetCommitVersionDiff(Context context) throws Exception {
// String fromVersion = this.getString("fromVersion");
// String toVersion = this.getString("toVersion");
// if (StringUtils.isBlank(fromVersion) || fromVersion.length() != 40) {
// this.addErrorMessage(context, "fromVersion版本号错误");
// return;
// }
// if (StringUtils.isBlank(toVersion) || toVersion.length() != 40) {
// this.addErrorMessage(context, "toVersion版本号错误");
// return;
// }
// String directory = this.getString("directory");
// int projectId;
// if (StringUtils.equals("datasource_daily", directory)) {
// projectId = GitUtils.DATASOURCE_PROJECT_ID;
// } else if (StringUtils.equals("datasource_online", directory)) {
// projectId = GitUtils.DATASOURCE_PROJECT_ID;
// } else if (StringUtils.equals("workflow", directory)) {
// projectId = GitUtils.WORKFLOW_GIT_PROJECT_ID;
// } else {
// throw new RuntimeException("directory = " + directory + " is wrong!");
// }
// GitCommitVersionDiff diff = GitUtils.$().getGitCommitVersionDiff(fromVersion, toVersion, projectId);
// this.setBizResult(context, diff);
// }
/**
* Do get workflows. 获取去数据库查找所有工作流
*
* @param context the context
* @throws Exception the exception
*/
public void doGetWorkflows(Context context) throws Exception {
Pager pager = createPager();
IWorkFlowDAO wfDAO = this.getWorkflowDAOFacade().getWorkFlowDAO();
WorkFlowCriteria query = new WorkFlowCriteria();
query.createCriteria();
query.setOrderByClause("id desc");
pager.setTotalCount(wfDAO.countByExample(query));
this.setBizResult(context, new PaginationResult(pager, wfDAO.selectByExample(query, pager.getCurPage(), pager.getRowsPerPage())));
}
Aggregations