public class SqliteDatabaseImpl.Maintainer extends Object implements FileDownloadDatabase.Maintainer
| 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. |
Iterator<FileDownloadModel> |
iterator() |
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. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic Iterator<FileDownloadModel> iterator()
iterator in interface Iterable<FileDownloadModel>public void onFinishMaintain()
FileDownloadDatabase.MaintaineronFinishMaintain in interface FileDownloadDatabase.Maintainerpublic void onRemovedInvalidData(FileDownloadModel model)
FileDownloadDatabase.Maintainermodel is invalid and has been removed.onRemovedInvalidData in interface FileDownloadDatabase.Maintainermodel - the removed invalid model.public void onRefreshedValidData(FileDownloadModel model)
FileDownloadDatabase.Maintainermodel is valid to save and has been refreshed.onRefreshedValidData in interface FileDownloadDatabase.Maintainermodel - the refreshed valid model.public void changeFileDownloadModelId(int oldId,
FileDownloadModel modelWithNewId)
FileDownloadDatabase.MaintainerFileDownloadModel.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.
changeFileDownloadModelId in interface FileDownloadDatabase.MaintaineroldId - the old id for the modelWithNewIdmodelWithNewId - the model with the new id.