Tracks one backup taken of an organisation's data, from the moment it is requested through to the file it produces. A record is created with only its created date and creator, and the completed date, file name, content type and file hash are filled in once the backup finishes, so a record with no completed date is still running or failed. File names are unique within an organisation, which is how a backup is looked up for download.
Group: Database Entities
Implements: Serializable
Properties
| Property | Returns | Description |
|---|---|---|
| completedDate | Date | When the backup finished and its file became available. Null while the backup is still running, or if it never completed. |
| contentType | String | The media type of the backup file, used when it is served for download. Null until the backup completes. |
| createdBy | Profile | The administrator who requested the backup. Never null. |
| createdDate | Date | When the backup was requested, as a timestamp. Backups for an organisation are listed newest first by this value. |
| fileHash | String | Content hash of the backup file, which is how the file itself is fetched from the content store. Null until the backup completes. |
| fileName | String | Name of the file the backup was written to, unique within the organisation and used to look the backup up. Null until the backup completes. |
| id | long | The database identifier of this backup record. |
Methods
getId() · setOrganisation(Organisation organisation) · getCreatedDate() · setCreatedDate(Date createdDate) · getCreatedBy() · setCreatedBy(Profile createdBy) · getCompletedDate() · setCompletedDate(Date completedDate) · getFileName() · setFileName(String fileName) · getContentType() · setContentType(String contentType) · getFileHash() · setFileHash(String fileHash)
getId()
Returns: long
The database identifier of this backup record.
setOrganisation(Organisation organisation)
Returns: void
Sets the organisation the backup was taken for.
| Parameter | Description |
|---|---|
organisation | the organisation the backup belongs to |
getCreatedDate()
Returns: Date
When the backup was requested, as a timestamp. Backups for an organisation are listed newest first by this value.
setCreatedDate(Date createdDate)
Returns: void
Sets when the backup was requested.
| Parameter | Description |
|---|---|
createdDate | the date and time the backup was started |
getCreatedBy()
Returns: Profile
The administrator who requested the backup. Never null.
setCreatedBy(Profile createdBy)
Returns: void
Sets the administrator who requested the backup.
| Parameter | Description |
|---|---|
createdBy | the profile that started the backup |
getCompletedDate()
Returns: Date
When the backup finished and its file became available. Null while the backup is still running, or if it never completed.
setCompletedDate(Date completedDate)
Returns: void
Sets when the backup finished.
| Parameter | Description |
|---|---|
completedDate | the date and time the backup completed |
getFileName()
Returns: String
Name of the file the backup was written to, unique within the organisation and used to look the backup up. Null until the backup completes.
setFileName(String fileName)
Returns: void
Sets the name of the file the backup was written to.
| Parameter | Description |
|---|---|
fileName | the backup file name, unique within the organisation |
getContentType()
Returns: String
The media type of the backup file, used when it is served for download. Null until the backup completes.
setContentType(String contentType)
Returns: void
Sets the media type of the backup file.
| Parameter | Description |
|---|---|
contentType | the backup file's content type |
getFileHash()
Returns: String
Content hash of the backup file, which is how the file itself is fetched from the content store. Null until the backup completes.
setFileHash(String fileHash)
Returns: void
Sets the content hash of the backup file.
| Parameter | Description |
|---|---|
fileHash | the backup file's content hash |