updateDownloadRequestStatusByDownloadId

open fun updateDownloadRequestStatusByDownloadId(downloadId: Long, statusCode: Int, reasonCode: Int, bytesDownloaded: Long, actualSize: Long, updateParentRecord: Boolean): DownloadRequest

Updates the status of download request.

Return

reference to the updated entity if it was found and updated, otherwise null.

Parameters

downloadId

the unique identifier of the download request that caused the status change.

statusCode

the new status of the download.

reasonCode

the reason code for the new status, if any.

bytesDownloaded

the number of bytes downloaded so far.

actualSize

the total size of the download.

updateParentRecord

true to update the DownloadRequestSet parent record.