添加获取扩展字段的方法

This commit is contained in:
AriaLyy
2017-06-13 17:50:14 +08:00
parent cd9497aadf
commit 8f9e15e505
3 changed files with 10 additions and 73 deletions

View File

@ -48,6 +48,14 @@ public abstract class AbsTarget<ENTITY extends AbsEntity, TASK_ENTITY extends Ab
return this;
}
/**
* 获取存放的扩展字段
* 设置扩展字段{@link #setExtendField(String)}
*/
public String getExtendField() {
return entity.getStr();
}
/**
* 获取任务状态
*
@ -87,11 +95,7 @@ public abstract class AbsTarget<ENTITY extends AbsEntity, TASK_ENTITY extends Ab
* 删除记录
*/
public void removeRecord() {
if (entity instanceof DownloadEntity) {
((DownloadEntity) entity).deleteData();
} else if (entity instanceof UploadEntity) {
((UploadEntity) entity).deleteData();
}
entity.deleteData();
}
/**