public class SqliteDatabaseImpl.Maintainer extends java.lang.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. |
java.util.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. |
public java.util.Iterator<FileDownloadModel> iterator()
iterator in interface java.lang.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.