Package com.avoka.fc.core.dao
Class AttachmentDao
- java.lang.Object
-
- com.avoka.core.dao.BaseDao
-
- com.avoka.fc.core.dao.AbstractDao
-
- com.avoka.fc.core.dao.AttachmentDao
-
public class AttachmentDao extends AbstractDao
Provides a DAO for the Attachment entity.- See Also:
Attachment
-
-
Field Summary
-
Fields inherited from class com.avoka.core.dao.BaseDao
FETCH_LIMIT, STATEMENT_MAX_NO_PARAMETERS
-
-
Constructor Summary
Constructors Constructor Description AttachmentDao()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Attachment
getAttachmentForAttachmentKey(String attachmentKey)
Return the attachment for a specific attachment surrogate keyAttachment
getAttachmentForAttachmentKey(String clientKey, String attachmentKey)
Return the attachment for a specific attachment surrogate key and clientAttachment
getAttachmentForIdAndSubmission(Long id)
Return the attachment for the given attachment id.Attachment
getAttachmentForIdAndSubmission(Long id, Submission submission)
Return the attachment for the given submission and attachment id.List
getAttachmentsForSubmissionKey(String submissionId, boolean deliverSubmittedPDF)
Return attachment information for a given submissionList<Map<String,Object>>
getSubmissionElectronicAttachments(Long submissionId)
Return the data of all the electronic attachments associated with the given submission.List<Map<String,Object>>
getSubmissionElectronicAttachmentsSummary(Long submissionId)
Return summary of all the electronic attachments associated with the given submission.List<Attachment>
getSubmissionFileAttachments(Submission submission)
Return all attachments for a submission, also pre-fetching the associated file upload objects-
Methods inherited from class com.avoka.fc.core.dao.AbstractDao
andFilterClientExcludeNull, andFilterClientIncludeNull, andFilterClientOnly, isClientAccessAllowed, performQueryConfigCached
-
Methods inherited from class com.avoka.core.dao.BaseDao
addOrdering, addOrderingCaseInsensitive, addOrderingCaseSensitive, andQueryBetween, andQueryInExp, andQueryInExp, andQueryLikeIgnoreCaseExp, andQueryMatchDbExp, andQueryMatchExp, andQueryMatchIsNotNull, andQueryMatchIsNull, andQueryNoMatchExp, andQueryNotTrue, deleteObject, deleteObjects, findObject, getDataContext, getFetchLimit, getLogger, getObjectForPK, newObject, orQueryLikeIgnoreCaseExp, orQueryMatchExp, performNamedQuery, performNamedQuery, performNamedQuery, performNamedQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performNonSelectingQuery, performQuery, performQuery, performQuery, registerNewObject, setCacheStrategy, setFetchLimit, setLocalCacheStrategy, setLocalCacheStrategy, setSharedCacheStrategy, toMap, toMap
-
-
-
-
Method Detail
-
getAttachmentForIdAndSubmission
public Attachment getAttachmentForIdAndSubmission(Long id)
Return the attachment for the given attachment id.- Parameters:
id
- the attachment id (required)- Returns:
- the attachment for the given attachment id
- Since:
- 5.0
-
getAttachmentForIdAndSubmission
public Attachment getAttachmentForIdAndSubmission(Long id, Submission submission)
Return the attachment for the given submission and attachment id.- Parameters:
id
- the attachment idsubmission
- the attachment submission- Returns:
- the attachment for the given submission and attachment id
- Since:
- 5.0
-
getAttachmentsForSubmissionKey
public List getAttachmentsForSubmissionKey(String submissionId, boolean deliverSubmittedPDF)
Return attachment information for a given submission- Parameters:
submissionId
- a valid submission OIDdeliverSubmittedPDF
- whether the submitted PDF form shall be delivered- Returns:
- a list of
DataRow
objects containing attachment information
-
getAttachmentForAttachmentKey
public Attachment getAttachmentForAttachmentKey(String clientKey, String attachmentKey)
Return the attachment for a specific attachment surrogate key and client- Parameters:
clientKey
- the surrogate key of the client associated with the submissionattachmentKey
- the surrogate key of the attachment- Returns:
- the attachment for the given client and attachment surrogate keys
-
getAttachmentForAttachmentKey
public Attachment getAttachmentForAttachmentKey(String attachmentKey)
Return the attachment for a specific attachment surrogate key- Parameters:
attachmentKey
- the surrogate key of the attachment- Returns:
- the attachment for the given surrogate key
-
getSubmissionFileAttachments
public List<Attachment> getSubmissionFileAttachments(Submission submission)
Return all attachments for a submission, also pre-fetching the associated file upload objects- Parameters:
submission
- the submission- Returns:
- the list of attachments for the submission
-
getSubmissionElectronicAttachments
public List<Map<String,Object>> getSubmissionElectronicAttachments(Long submissionId)
Return the data of all the electronic attachments associated with the given submission.- Parameters:
submissionId
- a valid submission OID- Returns:
- a list of
DataRow
objects containing attachment information
-
getSubmissionElectronicAttachmentsSummary
public List<Map<String,Object>> getSubmissionElectronicAttachmentsSummary(Long submissionId)
Return summary of all the electronic attachments associated with the given submission.- Parameters:
submissionId
- a valid submission OID- Returns:
- a row of data containing attachment information summary
-
-