@SuppressWarnings("unchecked") public List<HistoricTaskInstance> findHistoricTaskInstancesByNativeQuery(final Map<String, Object> parameterMap, final int firstResult, final int maxResults) { return getDbEntityManager().selectListWithRawParameter("selectHistoricTaskInstanceByNativeQuery", parameterMap, firstResult, maxResults); }
@SuppressWarnings("unchecked") public List<HistoricTaskInstance> findHistoricTaskInstancesByNativeQuery(final Map<String, Object> parameterMap, final int firstResult, final int maxResults) { return getDbEntityManager().selectListWithRawParameter("selectHistoricTaskInstanceByNativeQuery", parameterMap, firstResult, maxResults); }
public void addRemovalTimeToTaskInstancesByRootProcessInstanceId(String rootProcessInstanceId, Date removalTime) { Map<String, Object> parameters = new HashMap<>(); parameters.put("rootProcessInstanceId", rootProcessInstanceId); parameters.put("removalTime", removalTime); getDbEntityManager() .updatePreserveOrder(HistoricTaskInstanceEventEntity.class, "updateHistoricTaskInstancesByRootProcessInstanceId", parameters); }
public void addRemovalTimeToTaskInstancesByRootProcessInstanceId(String rootProcessInstanceId, Date removalTime) { Map<String, Object> parameters = new HashMap<>(); parameters.put("rootProcessInstanceId", rootProcessInstanceId); parameters.put("removalTime", removalTime); getDbEntityManager() .updatePreserveOrder(HistoricTaskInstanceEventEntity.class, "updateHistoricTaskInstancesByRootProcessInstanceId", parameters); }
public long findHistoricTaskInstanceCountByNativeQuery(final Map<String, Object> parameterMap) { return (Long) getDbEntityManager().selectOne("selectHistoricTaskInstanceCountByNativeQuery", parameterMap); }
public long findHistoricTaskInstanceCountByNativeQuery(final Map<String, Object> parameterMap) { return (Long) getDbEntityManager().selectOne("selectHistoricTaskInstanceCountByNativeQuery", parameterMap); }
public DbOperation deleteHistoricTaskInstancesByRemovalTime(Date removalTime, int minuteFrom, int minuteTo, int batchSize) { Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("removalTime", removalTime); if (minuteTo - minuteFrom + 1 < 60) { parameters.put("minuteFrom", minuteFrom); parameters.put("minuteTo", minuteTo); } parameters.put("batchSize", batchSize); return getDbEntityManager() .deletePreserveOrder(HistoricTaskInstanceEntity.class, "deleteHistoricTaskInstancesByRemovalTime", new ListQueryParameterObject(parameters, 0, batchSize)); }
public DbOperation deleteHistoricTaskInstancesByRemovalTime(Date removalTime, int minuteFrom, int minuteTo, int batchSize) { Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("removalTime", removalTime); if (minuteTo - minuteFrom + 1 < 60) { parameters.put("minuteFrom", minuteFrom); parameters.put("minuteTo", minuteTo); } parameters.put("batchSize", batchSize); return getDbEntityManager() .deletePreserveOrder(HistoricTaskInstanceEntity.class, "deleteHistoricTaskInstancesByRemovalTime", new ListQueryParameterObject(parameters, 0, batchSize)); }
public HistoricTaskInstanceEntity findHistoricTaskInstanceById(final String taskId) { ensureNotNull("Invalid historic task id", "taskId", taskId); if (isHistoryEnabled()) { return (HistoricTaskInstanceEntity) getDbEntityManager().selectOne("selectHistoricTaskInstance", taskId); } return null; }
public long findHistoricTaskInstanceCountByQueryCriteria(final HistoricTaskInstanceQueryImpl historicTaskInstanceQuery) { if (isHistoryEnabled()) { configureQuery(historicTaskInstanceQuery); return (Long) getDbEntityManager().selectOne("selectHistoricTaskInstanceCountByQueryCriteria",historicTaskInstanceQuery); } return 0; }
public long findHistoricTaskInstanceCountByQueryCriteria(final HistoricTaskInstanceQueryImpl historicTaskInstanceQuery) { if (isHistoryEnabled()) { configureQuery(historicTaskInstanceQuery); return (Long) getDbEntityManager().selectOne("selectHistoricTaskInstanceCountByQueryCriteria",historicTaskInstanceQuery); } return 0; }
@SuppressWarnings("unchecked") public List<HistoricTaskInstance> findHistoricTaskInstancesByQueryCriteria(final HistoricTaskInstanceQueryImpl historicTaskInstanceQuery, final Page page) { if (isHistoryEnabled()) { configureQuery(historicTaskInstanceQuery); return getDbEntityManager().selectList("selectHistoricTaskInstancesByQueryCriteria", historicTaskInstanceQuery, page); } return Collections.EMPTY_LIST; }
@SuppressWarnings("unchecked") public List<HistoricTaskInstance> findHistoricTaskInstancesByQueryCriteria(final HistoricTaskInstanceQueryImpl historicTaskInstanceQuery, final Page page) { if (isHistoryEnabled()) { configureQuery(historicTaskInstanceQuery); return getDbEntityManager().selectList("selectHistoricTaskInstancesByQueryCriteria", historicTaskInstanceQuery, page); } return Collections.EMPTY_LIST; }
public HistoricTaskInstanceEntity findHistoricTaskInstanceById(final String taskId) { ensureNotNull("Invalid historic task id", "taskId", taskId); if (isHistoryEnabled()) { return (HistoricTaskInstanceEntity) getDbEntityManager().selectOne("selectHistoricTaskInstance", taskId); } return null; }
public void deleteHistoricTaskInstancesByCaseInstanceIds(List<String> caseInstanceIds) { CommandContext commandContext = Context.getCommandContext(); getHistoricDetailManager() .deleteHistoricDetailsByTaskCaseInstanceIds(caseInstanceIds); commandContext .getCommentManager() .deleteCommentsByTaskCaseInstanceIds(caseInstanceIds); getAttachmentManager() .deleteAttachmentsByTaskCaseInstanceIds(caseInstanceIds); getHistoricIdentityLinkManager() .deleteHistoricIdentityLinksLogByTaskCaseInstanceIds(caseInstanceIds); getDbEntityManager().deletePreserveOrder(HistoricTaskInstanceEntity.class, "deleteHistoricTaskInstanceByCaseInstanceIds", caseInstanceIds); }
public void deleteHistoricTaskInstancesByCaseInstanceIds(List<String> caseInstanceIds) { CommandContext commandContext = Context.getCommandContext(); getHistoricDetailManager() .deleteHistoricDetailsByTaskCaseInstanceIds(caseInstanceIds); commandContext .getCommentManager() .deleteCommentsByTaskCaseInstanceIds(caseInstanceIds); getAttachmentManager() .deleteAttachmentsByTaskCaseInstanceIds(caseInstanceIds); getHistoricIdentityLinkManager() .deleteHistoricIdentityLinksLogByTaskCaseInstanceIds(caseInstanceIds); getDbEntityManager().deletePreserveOrder(HistoricTaskInstanceEntity.class, "deleteHistoricTaskInstanceByCaseInstanceIds", caseInstanceIds); }
/** * Deletes all data related with tasks, which belongs to specified process instance ids. * @param processInstanceIds * @param deleteVariableInstances when true, will also delete variable instances. Can be false when variable instances were deleted separately. */ public void deleteHistoricTaskInstancesByProcessInstanceIds(List<String> processInstanceIds, boolean deleteVariableInstances) { CommandContext commandContext = Context.getCommandContext(); if (deleteVariableInstances) { getHistoricVariableInstanceManager().deleteHistoricVariableInstancesByTaskProcessInstanceIds(processInstanceIds); } getHistoricDetailManager() .deleteHistoricDetailsByTaskProcessInstanceIds(processInstanceIds); commandContext .getCommentManager() .deleteCommentsByTaskProcessInstanceIds(processInstanceIds); getAttachmentManager() .deleteAttachmentsByTaskProcessInstanceIds(processInstanceIds); getHistoricIdentityLinkManager() .deleteHistoricIdentityLinksLogByTaskProcessInstanceIds(processInstanceIds); getDbEntityManager().deletePreserveOrder(HistoricTaskInstanceEntity.class, "deleteHistoricTaskInstanceByProcessInstanceIds", processInstanceIds); }
/** * Deletes all data related with tasks, which belongs to specified process instance ids. * @param processInstanceIds * @param deleteVariableInstances when true, will also delete variable instances. Can be false when variable instances were deleted separately. */ public void deleteHistoricTaskInstancesByProcessInstanceIds(List<String> processInstanceIds, boolean deleteVariableInstances) { CommandContext commandContext = Context.getCommandContext(); if (deleteVariableInstances) { getHistoricVariableInstanceManager().deleteHistoricVariableInstancesByTaskProcessInstanceIds(processInstanceIds); } getHistoricDetailManager() .deleteHistoricDetailsByTaskProcessInstanceIds(processInstanceIds); commandContext .getCommentManager() .deleteCommentsByTaskProcessInstanceIds(processInstanceIds); getAttachmentManager() .deleteAttachmentsByTaskProcessInstanceIds(processInstanceIds); getHistoricIdentityLinkManager() .deleteHistoricIdentityLinksLogByTaskProcessInstanceIds(processInstanceIds); getDbEntityManager().deletePreserveOrder(HistoricTaskInstanceEntity.class, "deleteHistoricTaskInstanceByProcessInstanceIds", processInstanceIds); }
public void deleteHistoricTaskInstanceById(final String taskId) { if (isHistoryEnabled()) { HistoricTaskInstanceEntity historicTaskInstance = findHistoricTaskInstanceById(taskId); if (historicTaskInstance != null) { CommandContext commandContext = Context.getCommandContext(); commandContext .getHistoricDetailManager() .deleteHistoricDetailsByTaskId(taskId); commandContext .getHistoricVariableInstanceManager() .deleteHistoricVariableInstancesByTaskId(taskId); commandContext .getCommentManager() .deleteCommentsByTaskId(taskId); commandContext .getAttachmentManager() .deleteAttachmentsByTaskId(taskId); commandContext .getHistoricIdentityLinkManager() .deleteHistoricIdentityLinksLogByTaskId(taskId); getDbEntityManager().delete(historicTaskInstance); } } }
public void deleteHistoricTaskInstanceById(final String taskId) { if (isHistoryEnabled()) { HistoricTaskInstanceEntity historicTaskInstance = findHistoricTaskInstanceById(taskId); if (historicTaskInstance != null) { CommandContext commandContext = Context.getCommandContext(); commandContext .getHistoricDetailManager() .deleteHistoricDetailsByTaskId(taskId); commandContext .getHistoricVariableInstanceManager() .deleteHistoricVariableInstancesByTaskId(taskId); commandContext .getCommentManager() .deleteCommentsByTaskId(taskId); commandContext .getAttachmentManager() .deleteAttachmentsByTaskId(taskId); commandContext .getHistoricIdentityLinkManager() .deleteHistoricIdentityLinksLogByTaskId(taskId); getDbEntityManager().delete(historicTaskInstance); } } }