A single named JSON record stored inside a JsonDatabase, the platform's schemaless store for app data. Each document holds an arbitrary JSON string in its jsonData column, and is identified within its database by a name that must be unique there. The optional docType groups documents of the same shape so they can be queried as a set. Documents are read and written from apps through the JsonDatabase API rather than being constructed directly, and both hard delete and soft delete (a deletedDate stamp) are supported.

Group: Database Entities

Implements: Serializable, Auditable


Properties

PropertyReturnsDescription
auditOrgOrganisationThe account this document's audit entries are written against, which is the owner of its database.
createdByProfileThe profile that created the document.
createdDateDateWhen the document was first created. Not updated by later edits; see getModifiedDate for that.
databaseJsonDatabaseThe JsonDatabase this document belongs to. A document's name only has to be unique within its own database, and the database's owning organisation is what scopes the document to an account.
deletedByProfileThe profile that soft deleted the document.
deletedDateDateWhen the document was soft deleted. A soft deleted document is still stored and is still returned by the finders on this class, so callers that care must check this themselves.
docTypeStringOptional type name grouping documents of the same shape, so a query can select just those. Free text chosen by the app that writes the document.
idlongDatabase identifier for this document.
jsonDataStringThe document's payload, held as a JSON string. This is the whole point of the record; everything else on it is metadata. The column is very large, but note that the maximum length supported on AWS RDS is 10485760 bytes. Nothing here parses or validates the value, so a caller is responsible for writing well formed JSON.
modifiedByProfileThe profile that last wrote the document's data.
modifiedDateDateWhen the document's data was last written. Set on every create and update.
nameStringPath-safe identifier for the document, unique within its database and used as the WebDAV resource name and the lookup key. This is not a display label; there is no separate title.

Methods

getId() · getDatabase() · getName() · getDocType() · getCreatedDate() · getCreatedBy() · getDeletedDate() · getDeletedBy() · getModifiedDate() · getModifiedBy() · getJsonData() · getAuditOrg()

getId()

Returns: long

Database identifier for this document.

getDatabase()

Returns: JsonDatabase

The JsonDatabase this document belongs to. A document's name only has to be unique within its own database, and the database's owning organisation is what scopes the document to an account.

getName()

Returns: String

Path-safe identifier for the document, unique within its database and used as the WebDAV resource name and the lookup key. This is not a display label; there is no separate title.

getDocType()

Returns: String

Optional type name grouping documents of the same shape, so a query can select just those. Free text chosen by the app that writes the document.

getCreatedDate()

Returns: Date

When the document was first created. Not updated by later edits; see getModifiedDate for that.

getCreatedBy()

Returns: Profile

The profile that created the document.

getDeletedDate()

Returns: Date

When the document was soft deleted. A soft deleted document is still stored and is still returned by the finders on this class, so callers that care must check this themselves.

getDeletedBy()

Returns: Profile

The profile that soft deleted the document.

getModifiedDate()

Returns: Date

When the document's data was last written. Set on every create and update.

getModifiedBy()

Returns: Profile

The profile that last wrote the document's data.

getJsonData()

Returns: String

The document's payload, held as a JSON string. This is the whole point of the record; everything else on it is metadata. The column is very large, but note that the maximum length supported on AWS RDS is 10485760 bytes. Nothing here parses or validates the value, so a caller is responsible for writing well formed JSON.

getAuditOrg()

Returns: Organisation

The account this document's audit entries are written against, which is the owner of its database.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.