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); }
@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); } }
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); }
@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); } }