public static interface FileDownloadDatabase.Maintainer extends Iterable<FileDownloadModel>
| Modifier and Type | Method and Description |
|---|---|
void |
changeFileDownloadModelId(int oldId,
FileDownloadModel modelWithNewId)
invoke this method when the
FileDownloadModel.id is changed because of the
different FileDownloadHelper.IdGenerator,
which generate the new id for the task. |
void |
onFinishMaintain()
invoke this method when the operation for maintain is finished.
|
void |
onRefreshedValidData(FileDownloadModel model)
invoke this method when the
model is valid to save and has been refreshed. |
void |
onRemovedInvalidData(FileDownloadModel model)
invoke this method when the
model is invalid and has been removed. |
forEach, iterator, spliteratorvoid onFinishMaintain()
void onRemovedInvalidData(FileDownloadModel model)
model is invalid and has been removed.model - the removed invalid model.void onRefreshedValidData(FileDownloadModel model)
model is valid to save and has been refreshed.model - the refreshed valid model.void changeFileDownloadModelId(int oldId,
FileDownloadModel modelWithNewId)
FileDownloadModel.id is changed because of the
different FileDownloadHelper.IdGenerator,
which generate the new id for the task.
tips: you need to update the filedownloader-table and the connection-table.
oldId - the old id for the modelWithNewIdmodelWithNewId - the model with the new id.