public static SelectListDescriptor<Long> getChildInstanceIdsOfProcessInstance(final Class<SProcessInstance> class1, final long processInstanceId, final QueryOptions queryOptions) { final Map<String, Object> map = Collections.singletonMap("processInstanceId", (Object) processInstanceId); return new SelectListDescriptor<>("getChildInstanceIdsOfProcessInstance", map, class1, queryOptions); }
public static SelectListDescriptor<SAActivityInstance> getArchivedActivitiesFromProcessInstance(final long rootContainerId, final QueryOptions queryOptions) { final Map<String, Object> parameters = Collections.singletonMap("rootContainerId", (Object) rootContainerId); return new SelectListDescriptor<>("getAActivitiesFromProcessInstance", parameters, SAActivityInstance.class, queryOptions); }
public static SelectListDescriptor<SMappedDocument> getDocumentListCreatedBefore(String name, long processInstanceId, QueryOptions queryOptions, long time) { final Map<String, Object> parameters = new HashMap<>(3); parameters.put("processInstanceId", processInstanceId); parameters.put("name", name); parameters.put("time", time); return new SelectListDescriptor<>("getDocumentCreatedBeforeList", parameters, SMappedDocument.class, queryOptions); } }
public static SelectListDescriptor<SActorMember> getActorMembersOfRole(final long roleId, final int fromIndex, final int numberOfActorMembers) { final Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("roleId", roleId); final QueryOptions queryOptions = new QueryOptions(fromIndex, numberOfActorMembers); return new SelectListDescriptor<SActorMember>("getActorMembersOfRole", parameters, SActorMember.class, queryOptions); }
public static SelectListDescriptor<SFlowNodeInstance> getFlowNodesFromProcessInstance(final long parentProcessInstanceId, final int fromIndex, final int maxResults) { final Map<String, Object> parameters = Collections.singletonMap("parentProcessInstanceId", (Object) parentProcessInstanceId); final QueryOptions queryOptions = new QueryOptions(fromIndex, maxResults); return new SelectListDescriptor<>("getFlowNodesFromProcessInstance", parameters, SFlowNodeInstance.class, queryOptions); }
public static SelectListDescriptor<SAFlowNodeInstance> getArchivedFlowNodesFromProcessInstance(final long rootContainerId, final int fromIndex, final int maxResults) { final Map<String, Object> parameters = Collections.singletonMap("rootContainerId", (Object) rootContainerId); final QueryOptions queryOptions = new QueryOptions(fromIndex, maxResults); return new SelectListDescriptor<>("getArchivedFlowNodesFromProcessInstance", parameters, SAFlowNodeInstance.class, queryOptions); }
public static SelectListDescriptor<SCommand> getUserCommands(final String field, final OrderByType order, final int fromIndex, final int numberOfElements) { final Map<String, Object> parameters = Collections.singletonMap("system", (Object) false); final QueryOptions queryOptions = new QueryOptions(fromIndex, numberOfElements, SCommand.class, field, order); return new SelectListDescriptor<SCommand>("getUserCommands", parameters, SCommand.class, queryOptions); }
@Override public List<SProcessDefinitionDeployInfo> getProcessDeploymentInfosWithActorOnlyForGroups(final List<Long> groupIds, final QueryOptions queryOptions) throws SBonitaReadException { final Map<String, Object> parameters = Collections.singletonMap("groupIds", (Object) groupIds); final SelectListDescriptor<SProcessDefinitionDeployInfo> selectDescriptor = new SelectListDescriptor<>( "getProcessesWithActorOnlyForGroups", parameters, SProcessDefinitionDeployInfo.class, queryOptions); return persistenceService.selectList(selectDescriptor); }
@Override public List<SProcessDefinitionDeployInfo> getProcessDeploymentInfosWithActorOnlyForRoles(final List<Long> roleIds, final QueryOptions queryOptions) throws SBonitaReadException { final Map<String, Object> parameters = Collections.singletonMap("roleIds", (Object) roleIds); final SelectListDescriptor<SProcessDefinitionDeployInfo> selectDescriptor = new SelectListDescriptor<>( "getProcessesWithActorOnlyForRoles", parameters, SProcessDefinitionDeployInfo.class, queryOptions); return persistenceService.selectList(selectDescriptor); }
@Override public List<SProcessDefinitionDeployInfo> getProcessDeploymentInfosWithActorOnlyForUser(final long userId, final QueryOptions queryOptions) throws SBonitaReadException { final Map<String, Object> parameters = Collections.singletonMap(USER_ID, (Object) userId); final SelectListDescriptor<SProcessDefinitionDeployInfo> selectDescriptor = new SelectListDescriptor<>( "getProcessesWithActorOnlyForUser", parameters, SProcessDefinitionDeployInfo.class, queryOptions); return persistenceService.selectList(selectDescriptor); }
@Override public List<SProcessDefinitionDeployInfo> getProcessDeploymentInfosWithActorOnlyForUsers(final List<Long> userIds, final QueryOptions queryOptions) throws SBonitaReadException { final Map<String, Object> parameters = Collections.singletonMap("userIds", (Object) userIds); final SelectListDescriptor<SProcessDefinitionDeployInfo> selectDescriptor = new SelectListDescriptor<>( "getProcessesWithActorOnlyForUsers", parameters, SProcessDefinitionDeployInfo.class, queryOptions); return persistenceService.selectList(selectDescriptor); }
public static SelectListDescriptor<SCommand> getUserCommands(final String field, final OrderByType order, final int fromIndex, final int numberOfElements) { final Map<String, Object> parameters = Collections.singletonMap("system", (Object) false); final QueryOptions queryOptions = new QueryOptions(fromIndex, numberOfElements, SCommand.class, field, order); return new SelectListDescriptor<SCommand>("getUserCommands", parameters, SCommand.class, queryOptions); }
public static SelectListDescriptor<SHumanTaskInstance> getPendingUserTasks(final long userId, final int fromIndex, final int maxResults, final String sortFieldName, final OrderByType order) { final Map<String, Object> parameters = new HashMap<>(3); parameters.put("userId", userId); final QueryOptions queryOptions = new QueryOptions(fromIndex, maxResults, SActivityInstance.class, sortFieldName, order); return new SelectListDescriptor<>("getPendingUserTasksWithoutActorIds", parameters, SHumanTaskInstance.class, queryOptions); }
@Override public Set<Long> getSourceObjectIdsOfArchivedFlowNodeInstances(List<Long> sourceProcessInstanceIds) throws SBonitaReadException { return new HashSet<>(getPersistenceService().selectList(new SelectListDescriptor<Long>("getSourceObjectIdsOfArchivedFlowNodeInstances", Collections.<String, Object>singletonMap("sourceProcessInstanceIds", sourceProcessInstanceIds), SAFlowNodeInstance.class, QueryOptions.countQueryOptions()))); }
@Override public List<SProcessDefinitionDeployInfo> getProcessDeploymentInfos(final List<Long> processIds) throws SBonitaReadException { if (processIds == null || processIds.size() == 0) { return Collections.emptyList(); } final QueryOptions queryOptions = new QueryOptions(0, processIds.size(), SProcessDefinitionDeployInfo.class, "name", OrderByType.ASC); final Map<String, Object> emptyMap = Collections.singletonMap("processIds", (Object) processIds); return persistenceService.selectList(new SelectListDescriptor<SProcessDefinitionDeployInfo>("getSubSetOfProcessDefinitionDeployInfos", emptyMap, SProcessDefinitionDeployInfo.class, queryOptions)); }
@Override public List<SProcessDefinitionDeployInfo> getProcessDeploymentInfosUnrelatedToCategory(final long categoryId, final int pageIndex, final int numberPerPage, final ProcessDeploymentInfoCriterion pagingCriterion) throws SBonitaReadException { final Map<String, Object> parameters = Collections.singletonMap("categoryId", (Object) categoryId); final QueryOptions queryOptions = createQueryOptions(pageIndex, numberPerPage, pagingCriterion); final SelectListDescriptor<SProcessDefinitionDeployInfo> selectDescriptor = new SelectListDescriptor<>( "searchSProcessDefinitionDeployInfoUnrelatedToCategory", parameters, SProcessDefinitionDeployInfo.class, queryOptions); return persistenceService.selectList(selectDescriptor); }
@Override protected List<SDependency> getDependencies(QueryOptions queryOptions) throws SDependencyException { List<SDependency> dependencies; try { dependencies = persistenceService.selectList(new SelectListDescriptor<SDependency>("getDependencies", null, SDependency.class, queryOptions)); } catch (final SBonitaReadException e) { throw new SDependencyException("Can't get dependencies", e); } return dependencies; }
@Override public List<Long> getPossibleUserIdsOfActorId(final long actorId, final int startIndex, final int maxResults) throws SBonitaReadException { final Map<String, Object> parameters = Collections.singletonMap("actorId", (Object) actorId); final SelectListDescriptor<Long> descriptor = new SelectListDescriptor<Long>("getPossibleUserIdsOfActorId", parameters, SActor.class, new QueryOptions( startIndex, maxResults)); return persistenceService.selectList(descriptor); }
@Override public List<Long> getFlowNodeInstanceIdsToRestart(final QueryOptions queryOptions) throws SBonitaReadException { final List<Long> selectList = getPersistenceService().selectList( new SelectListDescriptor<Long>("getFlowNodeInstanceIdsToRestart", null, SFlowNodeInstance.class, queryOptions)); return getUnmodifiableList(selectList); }
@Override public List<SDependencyMapping> getDependencyMappings(final QueryOptions queryOptions) throws SDependencyException { NullCheckingUtil.checkArgsNotNull(queryOptions); try { return persistenceService.selectList(new SelectListDescriptor<SDependencyMapping>( "getDependencyMappings", null, SDependencyMapping.class, queryOptions)); } catch (final SBonitaReadException e) { throw new SDependencyException("Can't get dependency mappings", e); } }