org.activiti.engine.impl.Page Java Examples
The following examples show how to use
org.activiti.engine.impl.Page.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DbSqlSession.java From activiti6-boot2 with Apache License 2.0 | 6 votes |
@SuppressWarnings("rawtypes") public List selectList(String statement, ListQueryParameterObject parameter, Page page, boolean useCache) { ListQueryParameterObject parameterToUse = parameter; if (parameterToUse == null) { parameterToUse = new ListQueryParameterObject(); } if (page != null) { parameterToUse.setFirstResult(page.getFirstResult()); parameterToUse.setMaxResults(page.getMaxResults()); } return selectList(statement, parameterToUse, useCache); }
Example #2
Source File: MybatisProcessDefinitionDataManager.java From activiti6-boot2 with Apache License 2.0 | 6 votes |
@Override @SuppressWarnings("unchecked") public List<ProcessDefinition> findProcessDefinitionsByQueryCriteria(ProcessDefinitionQueryImpl processDefinitionQuery, Page page) { // List<ProcessDefinition> processDefinitions = return getDbSqlSession().selectList("selectProcessDefinitionsByQueryCriteria", processDefinitionQuery, page); // skipped this after discussion within the team // // retrieve process definitions from cache // (https://activiti.atlassian.net/browse/ACT-1020) to have all available // information // ArrayList<ProcessDefinition> result = new // ArrayList<ProcessDefinition>(); // for (ProcessDefinition processDefinitionEntity : processDefinitions) // { // ProcessDefinitionEntity fullProcessDefinition = Context // .getProcessEngineConfiguration() // .getDeploymentCache().resolveProcessDefinition((ProcessDefinitionEntity)processDefinitionEntity); // result.add(fullProcessDefinition); // } // return result; }
Example #3
Source File: DeploymentEntityManagerImpl.java From activiti6-boot2 with Apache License 2.0 | 6 votes |
protected ProcessDefinition findNewLatestProcessDefinitionAfterRemovalOf(ProcessDefinition processDefinitionToBeRemoved) { // The latest process definition is not necessarily the one with 'version -1' (some versions could have been deleted) // Hence, the following logic ProcessDefinitionQueryImpl query = new ProcessDefinitionQueryImpl(); query.processDefinitionKey(processDefinitionToBeRemoved.getKey()); if (processDefinitionToBeRemoved.getTenantId() != null && !ProcessEngineConfiguration.NO_TENANT_ID.equals(processDefinitionToBeRemoved.getTenantId())) { query.processDefinitionTenantId(processDefinitionToBeRemoved.getTenantId()); } else { query.processDefinitionWithoutTenantId(); } query.processDefinitionVersionLowerThan(processDefinitionToBeRemoved.getVersion()); query.orderByProcessDefinitionVersion().desc(); List<ProcessDefinition> processDefinitions = getProcessDefinitionEntityManager().findProcessDefinitionsByQueryCriteria(query, new Page(0, 1)); if (processDefinitions != null && processDefinitions.size() > 0) { return processDefinitions.get(0); } return null; }
Example #4
Source File: ProcessInstanceSuspensionTest.java From activiti6-boot2 with Apache License 2.0 | 5 votes |
protected List<TimerJobEntity> executeAcquireJobsCommand() { return processEngineConfiguration.getCommandExecutor().execute(new Command<List<TimerJobEntity>>() { public List<TimerJobEntity> execute(CommandContext commandContext) { return commandContext.getTimerJobEntityManager().findTimerJobsToExecute(new Page(0, 1)); } }); }
Example #5
Source File: AcquireJobsCmd.java From activiti6-boot2 with Apache License 2.0 | 5 votes |
public AcquiredJobEntities execute(CommandContext commandContext) { AcquiredJobEntities acquiredJobs = new AcquiredJobEntities(); List<JobEntity> jobs = commandContext.getJobEntityManager().findJobsToExecute(new Page(0, asyncExecutor.getMaxAsyncJobsDuePerAcquisition())); for (JobEntity job : jobs) { lockJob(commandContext, job, asyncExecutor.getAsyncJobLockTimeInMillis()); acquiredJobs.addJob(job); } return acquiredJobs; }
Example #6
Source File: AcquireTimerJobsCmd.java From activiti6-boot2 with Apache License 2.0 | 5 votes |
public AcquiredTimerJobEntities execute(CommandContext commandContext) { AcquiredTimerJobEntities acquiredJobs = new AcquiredTimerJobEntities(); List<TimerJobEntity> timerJobs = commandContext.getTimerJobEntityManager() .findTimerJobsToExecute(new Page(0, asyncExecutor.getMaxAsyncJobsDuePerAcquisition())); for (TimerJobEntity job : timerJobs) { lockJob(commandContext, job, asyncExecutor.getAsyncJobLockTimeInMillis()); acquiredJobs.addJob(job); } return acquiredJobs; }
Example #7
Source File: DbSqlSession.java From activiti6-boot2 with Apache License 2.0 | 5 votes |
@SuppressWarnings("rawtypes") public List selectList(String statement, Object parameter, Page page, boolean useCache) { if (page != null) { return selectList(statement, parameter, page.getFirstResult(), page.getMaxResults(), useCache); } else { return selectList(statement, parameter, 0, Integer.MAX_VALUE, useCache); } }
Example #8
Source File: LDAPGroupManager.java From activiti6-boot2 with Apache License 2.0 | 5 votes |
@Override public List<Group> findGroupByQueryCriteria(GroupQueryImpl query, Page page) { // Only support for groupMember() at the moment if (query.getUserId() != null) { return findGroupsByUser(query.getUserId()); } else { throw new ActivitiIllegalArgumentException("This query is not supported by the LDAPGroupManager"); } }
Example #9
Source File: MybatisJobDataManager.java From activiti6-boot2 with Apache License 2.0 | 4 votes |
@Override @SuppressWarnings("unchecked") public List<Job> findJobsByQueryCriteria(JobQueryImpl jobQuery, Page page) { final String query = "selectJobByQueryCriteria"; return getDbSqlSession().selectList(query, jobQuery, page); }
Example #10
Source File: TimerJobEntityManagerImpl.java From activiti6-boot2 with Apache License 2.0 | 4 votes |
@Override public List<Job> findJobsByQueryCriteria(TimerJobQueryImpl jobQuery, Page page) { return jobDataManager.findJobsByQueryCriteria(jobQuery, page); }
Example #11
Source File: AttachmentQuery.java From activiti6-boot2 with Apache License 2.0 | 4 votes |
@SuppressWarnings("unchecked") @Override public List<Attachment> executeList(CommandContext commandContext, Page page) { return commandContext.getDbSqlSession().selectList("selectAttachmentByQueryCriteria", this); }
Example #12
Source File: CustomTaskQuery.java From activiti6-boot2 with Apache License 2.0 | 4 votes |
@SuppressWarnings("unchecked") public List<CustomTask> executeList(CommandContext commandContext, Page page) { return commandContext.getDbSqlSession().selectList("selectCustomTaskByQueryCriteria", this); }
Example #13
Source File: DbSqlSession.java From activiti6-boot2 with Apache License 2.0 | 4 votes |
@SuppressWarnings("rawtypes") public List selectList(String statement, ListQueryParameterObject parameter, Page page) { return selectList(statement, parameter, page, true); }
Example #14
Source File: DbSqlSession.java From activiti6-boot2 with Apache License 2.0 | 4 votes |
@SuppressWarnings("rawtypes") public List selectList(String statement, Object parameter, Page page) { return selectList(statement, parameter, page, true); }
Example #15
Source File: DeploymentEntityManagerImpl.java From activiti6-boot2 with Apache License 2.0 | 4 votes |
@Override public List<Deployment> findDeploymentsByQueryCriteria(DeploymentQueryImpl deploymentQuery, Page page) { return deploymentDataManager.findDeploymentsByQueryCriteria(deploymentQuery, page); }
Example #16
Source File: HistoricDetailEntityManagerImpl.java From activiti6-boot2 with Apache License 2.0 | 4 votes |
@Override public List<HistoricDetail> findHistoricDetailsByQueryCriteria(HistoricDetailQueryImpl historicVariableUpdateQuery, Page page) { return historicDetailDataManager.findHistoricDetailsByQueryCriteria(historicVariableUpdateQuery, page); }
Example #17
Source File: MybatisModelDataManager.java From activiti6-boot2 with Apache License 2.0 | 4 votes |
@Override @SuppressWarnings("unchecked") public List<Model> findModelsByQueryCriteria(ModelQueryImpl query, Page page) { return getDbSqlSession().selectList("selectModelsByQueryCriteria", query, page); }
Example #18
Source File: GroupEntityManagerImpl.java From activiti6-boot2 with Apache License 2.0 | 4 votes |
public List<Group> findGroupByQueryCriteria(GroupQueryImpl query, Page page) { return groupDataManager.findGroupByQueryCriteria(query, page); }
Example #19
Source File: SuspendedJobEntityManagerImpl.java From activiti6-boot2 with Apache License 2.0 | 4 votes |
@Override public List<Job> findJobsByQueryCriteria(SuspendedJobQueryImpl jobQuery, Page page) { return jobDataManager.findJobsByQueryCriteria(jobQuery, page); }
Example #20
Source File: EventSubscriptionEntityManagerImpl.java From activiti6-boot2 with Apache License 2.0 | 4 votes |
@Override public List<EventSubscriptionEntity> findEventSubscriptionsByQueryCriteria(EventSubscriptionQueryImpl eventSubscriptionQueryImpl, Page page) { return eventSubscriptionDataManager.findEventSubscriptionsByQueryCriteria(eventSubscriptionQueryImpl, page); }
Example #21
Source File: MybatisTimerJobDataManager.java From activiti6-boot2 with Apache License 2.0 | 4 votes |
@Override @SuppressWarnings("unchecked") public List<TimerJobEntity> findTimerJobsToExecute(Page page) { Date now = getClock().getCurrentTime(); return getDbSqlSession().selectList("selectTimerJobsToExecute", now, page); }
Example #22
Source File: MybatisTimerJobDataManager.java From activiti6-boot2 with Apache License 2.0 | 4 votes |
@Override @SuppressWarnings("unchecked") public List<Job> findJobsByQueryCriteria(TimerJobQueryImpl jobQuery, Page page) { String query = "selectTimerJobByQueryCriteria"; return getDbSqlSession().selectList(query, jobQuery, page); }
Example #23
Source File: MybatisExecutionDataManager.java From activiti6-boot2 with Apache License 2.0 | 4 votes |
@Override @SuppressWarnings("unchecked") public List<ExecutionEntity> findExecutionsByQueryCriteria(ExecutionQueryImpl executionQuery, Page page) { return getDbSqlSession().selectList("selectExecutionsByQueryCriteria", executionQuery, page, !performanceSettings.isEnableEagerExecutionTreeFetching()); // False -> executions should not be cached if using executionTreeFetching }
Example #24
Source File: UserEntityManagerImpl.java From activiti6-boot2 with Apache License 2.0 | 4 votes |
public List<User> findUserByQueryCriteria(UserQueryImpl query, Page page) { return userDataManager.findUserByQueryCriteria(query, page); }
Example #25
Source File: MybatisJobDataManager.java From activiti6-boot2 with Apache License 2.0 | 4 votes |
@Override @SuppressWarnings("unchecked") public List<JobEntity> findExpiredJobs(Page page) { Date now = getClock().getCurrentTime(); return getDbSqlSession().selectList("selectExpiredJobs", now, page); }
Example #26
Source File: MybatisJobDataManager.java From activiti6-boot2 with Apache License 2.0 | 4 votes |
@Override @SuppressWarnings("unchecked") public List<JobEntity> findJobsToExecute(Page page) { return getDbSqlSession().selectList("selectJobsToExecute", null, page); }
Example #27
Source File: MybatisDeadLetterJobDataManager.java From activiti6-boot2 with Apache License 2.0 | 4 votes |
@Override @SuppressWarnings("unchecked") public List<Job> findJobsByQueryCriteria(DeadLetterJobQueryImpl jobQuery, Page page) { String query = "selectDeadLetterJobByQueryCriteria"; return getDbSqlSession().selectList(query, jobQuery, page); }
Example #28
Source File: MybatisHistoricVariableInstanceDataManager.java From activiti6-boot2 with Apache License 2.0 | 4 votes |
@Override @SuppressWarnings("unchecked") public List<HistoricVariableInstance> findHistoricVariableInstancesByQueryCriteria(HistoricVariableInstanceQueryImpl historicProcessVariableQuery, Page page) { return getDbSqlSession().selectList("selectHistoricVariableInstanceByQueryCriteria", historicProcessVariableQuery, page); }
Example #29
Source File: MybatisUserDataManager.java From activiti6-boot2 with Apache License 2.0 | 4 votes |
@SuppressWarnings("unchecked") public List<User> findUserByQueryCriteria(UserQueryImpl query, Page page) { return getDbSqlSession().selectList("selectUserByQueryCriteria", query, page); }
Example #30
Source File: MybatisDeploymentDataManager.java From activiti6-boot2 with Apache License 2.0 | 4 votes |
@Override @SuppressWarnings("unchecked") public List<Deployment> findDeploymentsByQueryCriteria(DeploymentQueryImpl deploymentQuery, Page page) { final String query = "selectDeploymentsByQueryCriteria"; return getDbSqlSession().selectList(query, deploymentQuery, page); }