public void addRemovalTimeToAttachmentsByRootProcessInstanceId(String rootProcessInstanceId, Date removalTime) { Map<String, Object> parameters = new HashMap<>(); parameters.put("rootProcessInstanceId", rootProcessInstanceId); parameters.put("removalTime", removalTime); getDbEntityManager() .updatePreserveOrder(AttachmentEntity.class, "updateAttachmentsByRootProcessInstanceId", parameters); }
public void addRemovalTimeToAttachmentsByRootProcessInstanceId(String rootProcessInstanceId, Date removalTime) { Map<String, Object> parameters = new HashMap<>(); parameters.put("rootProcessInstanceId", rootProcessInstanceId); parameters.put("removalTime", removalTime); getDbEntityManager() .updatePreserveOrder(AttachmentEntity.class, "updateAttachmentsByRootProcessInstanceId", parameters); }
protected void deleteAttachments(Map<String, Object> parameters) { getDbEntityManager().deletePreserveOrder(ByteArrayEntity.class, "deleteAttachmentByteArraysByIds", parameters); getDbEntityManager().deletePreserveOrder(AttachmentEntity.class, "deleteAttachmentByIds", parameters); }
protected void deleteAttachments(Map<String, Object> parameters) { getDbEntityManager().deletePreserveOrder(ByteArrayEntity.class, "deleteAttachmentByteArraysByIds", parameters); getDbEntityManager().deletePreserveOrder(AttachmentEntity.class, "deleteAttachmentByIds", parameters); }
public DbOperation deleteAttachmentsByRemovalTime(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(AttachmentEntity.class, "deleteAttachmentsByRemovalTime", new ListQueryParameterObject(parameters, 0, batchSize)); }
public Attachment findAttachmentByTaskIdAndAttachmentId(String taskId, String attachmentId) { checkHistoryEnabled(); Map<String, String> parameters = new HashMap<String, String>(); parameters.put("taskId", taskId); parameters.put("id", attachmentId); return (AttachmentEntity) getDbEntityManager().selectOne("selectAttachmentByTaskIdAndAttachmentId", parameters); }
public Attachment findAttachmentByTaskIdAndAttachmentId(String taskId, String attachmentId) { checkHistoryEnabled(); Map<String, String> parameters = new HashMap<String, String>(); parameters.put("taskId", taskId); parameters.put("id", attachmentId); return (AttachmentEntity) getDbEntityManager().selectOne("selectAttachmentByTaskIdAndAttachmentId", parameters); }
public DbOperation deleteAttachmentsByRemovalTime(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(AttachmentEntity.class, "deleteAttachmentsByRemovalTime", new ListQueryParameterObject(parameters, 0, batchSize)); }
@SuppressWarnings("unchecked") public List<Attachment> findAttachmentsByTaskId(String taskId) { checkHistoryEnabled(); return getDbEntityManager().selectList("selectAttachmentsByTaskId", taskId); }
@SuppressWarnings("unchecked") public List<Attachment> findAttachmentsByProcessInstanceId(String processInstanceId) { checkHistoryEnabled(); return getDbEntityManager().selectList("selectAttachmentsByProcessInstanceId", processInstanceId); }
@SuppressWarnings("unchecked") public List<Attachment> findAttachmentsByProcessInstanceId(String processInstanceId) { checkHistoryEnabled(); return getDbEntityManager().selectList("selectAttachmentsByProcessInstanceId", processInstanceId); }
@SuppressWarnings("unchecked") public List<Attachment> findAttachmentsByTaskId(String taskId) { checkHistoryEnabled(); return getDbEntityManager().selectList("selectAttachmentsByTaskId", taskId); }
@SuppressWarnings("unchecked") public void deleteAttachmentsByTaskId(String taskId) { checkHistoryEnabled(); List<AttachmentEntity> attachments = getDbEntityManager().selectList("selectAttachmentsByTaskId", taskId); for (AttachmentEntity attachment: attachments) { String contentId = attachment.getContentId(); if (contentId!=null) { getByteArrayManager().deleteByteArrayById(contentId); } getDbEntityManager().delete(attachment); } }
@SuppressWarnings("unchecked") public void deleteAttachmentsByTaskId(String taskId) { checkHistoryEnabled(); List<AttachmentEntity> attachments = getDbEntityManager().selectList("selectAttachmentsByTaskId", taskId); for (AttachmentEntity attachment: attachments) { String contentId = attachment.getContentId(); if (contentId!=null) { getByteArrayManager().deleteByteArrayById(contentId); } getDbEntityManager().delete(attachment); } }
protected void deleteAttachments(Map<String, Object> parameters) { getDbEntityManager().deletePreserveOrder(ByteArrayEntity.class, "deleteAttachmentByteArraysByIds", parameters); getDbEntityManager().deletePreserveOrder(AttachmentEntity.class, "deleteAttachmentByIds", parameters); }
public void addRemovalTimeToAttachmentsByRootProcessInstanceId(String rootProcessInstanceId, Date removalTime) { Map<String, Object> parameters = new HashMap<>(); parameters.put("rootProcessInstanceId", rootProcessInstanceId); parameters.put("removalTime", removalTime); getDbEntityManager() .updatePreserveOrder(AttachmentEntity.class, "updateAttachmentsByRootProcessInstanceId", parameters); }
public DbOperation deleteAttachmentsByRemovalTime(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(AttachmentEntity.class, "deleteAttachmentsByRemovalTime", new ListQueryParameterObject(parameters, 0, batchSize)); }
@SuppressWarnings("unchecked") public List<Attachment> findAttachmentsByProcessInstanceId(String processInstanceId) { checkHistoryEnabled(); return getDbEntityManager().selectList("selectAttachmentsByProcessInstanceId", processInstanceId); }
@SuppressWarnings("unchecked") public List<Attachment> findAttachmentsByTaskId(String taskId) { checkHistoryEnabled(); return getDbEntityManager().selectList("selectAttachmentsByTaskId", taskId); }
@SuppressWarnings("unchecked") public void deleteAttachmentsByTaskId(String taskId) { checkHistoryEnabled(); List<AttachmentEntity> attachments = getDbEntityManager().selectList("selectAttachmentsByTaskId", taskId); for (AttachmentEntity attachment: attachments) { String contentId = attachment.getContentId(); if (contentId!=null) { getByteArrayManager().deleteByteArrayById(contentId); } getDbEntityManager().delete(attachment); } }