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

PropertyReturnsDescription
contentTypeStringMIME content type of the attached file, for example "application/pdf". Defaults to "application/octet-stream" when the type is unknown at upload time.
fileHashStringContent 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.
fileNameStringOriginal file name of the attachment, as supplied when it was uploaded.
idlongUnique database identifier for this attachment.
paymentItemListPaymentItemListThe 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.

ParameterDescription
paymentItemListthe 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.

ParameterDescription
fileHashthe 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.

ParameterDescription
fileNamethe 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.

ParameterDescription
contentTypethe attachment's content type
To get full access to the Kademi Hub existing customers can login here, or new customers can register here.