getDocumentURL ( ) →{ String }
If this is a document record, this function returns the URL to the file pointed to by this record.
getDownloadURL ( ) →{ String }
If this is a document record, this function returns the download URL
getModel ( ) →{ Model }
Returns the record's model
getThumbnailURL ( format: String ) →{ String }
TODO
Parameters
Name | Type | Description |
---|---|---|
format | String | format |
getURL ( ) →{ String }
TODO
load ( ) →{ Promise }
Download the contents of this document
loadRelations ( relations: String , opts: Object ) →{ Promise }
Loads related records
Parameters
Name | Type | Description |
---|---|---|
relations | String | Comma-separated list of relation-paths to load |
opts | Object | options |
remove ( opts: Object )
Removes a record from the database.
Parameters
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
opts | Object | Configuration object Properties
|
sync ( opts: Object ) →{ Promise }
Synchronize this record. The record is transferred to the backend and deleted from the offline-storage.
Parameters
Name | Type | Description |
---|---|---|
opts | Object | options |
_getAttributeValue ( name: String ) →{ Object }
Returns the value of the specified attribute.
Parameters
Name | Type | Description |
---|---|---|
name | String | The name of the attribute. |
Returns
The attribute's value.
_getMetadata ( ) →{ Object }
Returns the records metadata, if available
_hasPrivilege ( privilege: String ) →{ boolean }
Checks whether the user has a certain privilege on this record. If privileges are not loaded this method will return undefined.
Parameters
Name | Type | Description |
---|---|---|
privilege | String | privilege |
_isNew ( ) →{ Boolean }
Returns true if the record is a new record (has no ID yet).