A file attachment held against a payment item list, such as an invoice, quote or purchase order. Records the attachment's file name and content type, together with the content hash used to fetch the actual file data from the blob store. Attachments are created and removed through the owning payment item list rather than directly, and are copied across when a payment item list is duplicated.
Group: Database Entities
Implements: Serializable
Properties
| Property | Returns | Description |
|---|---|---|
| contentType | String | MIME content type of the attached file, for example "application/pdf". Defaults to "application/octet-stream" when the type is unknown at upload time. |
| fileHash | String | Content hash of the attached file, used as the key to fetch its data from the blob store. May be null if the attachment record was created before content was written. |
| fileName | String | Original file name of the attachment, as supplied when it was uploaded. |
| id | long | Unique database identifier for this attachment. |
| paymentItemList | PaymentItemList | The payment item list (invoice, quote or purchase order) this attachment is filed against. Never null for a persisted attachment. |
Methods
getId() · getPaymentItemList() · setPaymentItemList(PaymentItemList paymentItemList) · getFileHash() · setFileHash(String fileHash) · getFileName() · setFileName(String fileName) · getContentType() · setContentType(String contentType)
getId()
Returns: long
Unique database identifier for this attachment.
getPaymentItemList()
Returns: PaymentItemList
The payment item list (invoice, quote or purchase order) this attachment is filed against. Never null for a persisted attachment.
setPaymentItemList(PaymentItemList paymentItemList)
Returns: void
Sets the payment item list this attachment belongs to.
| Parameter | Description |
|---|---|
paymentItemList | the owning payment item list |
getFileHash()
Returns: String
Content hash of the attached file, used as the key to fetch its data from the blob store. May be null if the attachment record was created before content was written.
setFileHash(String fileHash)
Returns: void
Sets the content hash used to look up this attachment's data in the blob store.
| Parameter | Description |
|---|---|
fileHash | the attached file's content hash |
getFileName()
Returns: String
Original file name of the attachment, as supplied when it was uploaded.
setFileName(String fileName)
Returns: void
Sets the original file name of the attachment.
| Parameter | Description |
|---|---|
fileName | the attachment's file name |
getContentType()
Returns: String
MIME content type of the attached file, for example "application/pdf". Defaults to "application/octet-stream" when the type is unknown at upload time.
setContentType(String contentType)
Returns: void
Sets the MIME content type of the attached file.
| Parameter | Description |
|---|---|
contentType | the attachment's content type |