public abstract class RefreshRequest<T>
extends java.lang.Object
| 构造器和说明 |
|---|
RefreshRequest() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected int |
compareTo(T item0,
T item1)
reorder the list,returns:
-1 large to small
1 small to large
0 same
eg: long Long.compareTo(), item0:item1,default result is 1;
if no use, don't override if.
|
protected boolean |
handleAllFailureSituation(Call call,
int resultCode)
返回错误判断的时候会调用此方法,如果返回结果是true则不执行InitRefresher的handleError()方法
|
protected boolean |
handleError(Call call,
JSONObject json)
返回错误判断的时候会调用此方法,如果返回结果是true则不执行InitRefresher的handleError()方法
|
protected boolean |
ignoreSameItem(T newItem,
T listItem)
ignore the same item in the list,use return newItem.getId().equals(listItem.getId());
if not, don't override it;
|
java.util.List<T> |
setListData(JSONObject json)
handle the JSON and get the List from the json, then return it.
|
java.lang.String |
setRequestParamsReturnUrl(Param params)
return the url you need to post, and set the params in the method;
|
protected boolean ignoreSameItem(T newItem, T listItem)
newItem - listItem - protected int compareTo(T item0, T item1)
item0 - item1 - protected boolean handleError(Call call,
JSONObject json)
call - json - protected boolean handleAllFailureSituation(Call call,
int resultCode)
call - resultCode - public java.lang.String setRequestParamsReturnUrl(Param params)
params - public java.util.List<T> setListData(JSONObject json)
json -