A named collection of JSON documents (JsonDocument rows) owned by an organisation and optionally scoped to a website. A JsonDatabase is exposed to app developers both as a WebDAV/browsable folder tree (see the kongodb resources) and, when allowRest is set, as a REST api for reading and writing its documents. It can also be reached from server side js controllers via findDoc. The template field records which app or feature created the database and is used as a document type marker rather than a schema. Setting readonly prevents further modification of the database or its documents.

Group: Database Entities

Implements: Serializable


Properties

PropertyReturnsDescription
allowAccessBooleanWhether any website in the organisation may access this database, rather than only the website it is connected to. May be null if not explicitly set.
allowRestbooleanWhether this database's documents can be accessed through the REST api.
createdByProfileThe profile which created this database.
createdDateDateThe date and time this database was created. Never null for a persisted database.
deletedByProfileThe profile which deleted this database, if it has been deleted. Null otherwise.
deletedDateDateThe date and time this database was deleted, if it has been. Null if the database has not been deleted.
idlongThe primary key of this database row.
modifiedByProfileThe profile which last modified this database.
modifiedDateDateThe date and time this database was last modified. Never null for a persisted database.
nameStringThe path-safe, unique name that identifies this database within its owning organisation, used to locate it in the WebDAV tree and as its lookup key. Never null.
notesStringFree text notes describing this database. May be null or empty.
ownerOrganisationThe organisation that directly owns this database. Never null.
readonlybooleanWhether this database and its documents are read only, preventing further modification.
templateStringThe template or app type this database was created for, used as a document type marker rather than a schema. May be null for a database created without a template.
titleStringThe user friendly display title for this database. May be null or empty.
websiteWebsiteThe website this database is connected to. May be null if the database is not scoped to a specific website.

Methods

getId() · getName() · getTemplate() · getTitle() · getNotes() · getCreatedDate() · getCreatedBy() · getDeletedDate() · getDeletedBy() · getModifiedDate() · getModifiedBy() · getOwner() · getWebsite() · isAllowAccess() · isAllowRest() · isReadonly() · findDoc(String childName)

getId()

Returns: long

The primary key of this database row.

getName()

Returns: String

The path-safe, unique name that identifies this database within its owning organisation, used to locate it in the WebDAV tree and as its lookup key. Never null.

getTemplate()

Returns: String

The template or app type this database was created for, used as a document type marker rather than a schema. May be null for a database created without a template.

getTitle()

Returns: String

The user friendly display title for this database. May be null or empty.

getNotes()

Returns: String

Free text notes describing this database. May be null or empty.

getCreatedDate()

Returns: Date

The date and time this database was created. Never null for a persisted database.

getCreatedBy()

Returns: Profile

The profile which created this database.

getDeletedDate()

Returns: Date

The date and time this database was deleted, if it has been. Null if the database has not been deleted.

getDeletedBy()

Returns: Profile

The profile which deleted this database, if it has been deleted. Null otherwise.

getModifiedDate()

Returns: Date

The date and time this database was last modified. Never null for a persisted database.

getModifiedBy()

Returns: Profile

The profile which last modified this database.

getOwner()

Returns: Organisation

The organisation that directly owns this database. Never null.

getWebsite()

Returns: Website

The website this database is connected to. May be null if the database is not scoped to a specific website.

isAllowAccess()

Returns: Boolean

Whether any website in the organisation may access this database, rather than only the website it is connected to. May be null if not explicitly set.

isAllowRest()

Returns: boolean

Whether this database's documents can be accessed through the REST api.

isReadonly()

Returns: boolean

Whether this database and its documents are read only, preventing further modification.

findDoc(String childName)

Returns: JsonDocument

Looks up a document in this database by its child name, using the current session.

ParameterDescription
childNamethe name of the document to look up
To get full access to the Kademi Hub existing customers can login here, or new customers can register here.