use of org.qii.weiciyuan.bean.GroupListBean in project weiciyuan by qii.
the class FriendGroupDao method getGroup.
public GroupListBean getGroup() throws WeiboException {
String url = URLHelper.FRIENDSGROUP_INFO;
Map<String, String> map = new HashMap<String, String>();
map.put("access_token", access_token);
String jsonData = HttpUtility.getInstance().executeNormalTask(HttpMethod.Get, url, map);
Gson gson = new Gson();
GroupListBean value = null;
try {
value = gson.fromJson(jsonData, GroupListBean.class);
} catch (JsonSyntaxException e) {
AppLogger.e(e.getMessage());
}
return value;
}
use of org.qii.weiciyuan.bean.GroupListBean in project weiciyuan by qii.
the class FriendsTimeLineDBTask method getOtherGroupData.
public static List<MessageTimeLineData> getOtherGroupData(String accountId, String exceptGroupId) {
List<MessageTimeLineData> data = new ArrayList<MessageTimeLineData>();
if (!"0".equals(exceptGroupId)) {
TimeLinePosition position = getPosition(accountId);
MessageListBean msgList = getHomeLineMsgList(accountId, position.position + AppConfig.DB_CACHE_COUNT_OFFSET);
MessageTimeLineData home = new MessageTimeLineData("0", msgList, position);
data.add(home);
}
MessageTimeLineData biGroup = HomeOtherGroupTimeLineDBTask.getTimeLineData(accountId, "1");
data.add(biGroup);
GroupListBean groupListBean = GroupDBTask.get(accountId);
if (groupListBean != null) {
List<GroupBean> lists = groupListBean.getLists();
for (GroupBean groupBean : lists) {
MessageTimeLineData dbMsg = HomeOtherGroupTimeLineDBTask.getTimeLineData(accountId, groupBean.getId());
data.add(dbMsg);
}
}
Iterator<MessageTimeLineData> iterator = data.iterator();
while (iterator.hasNext()) {
MessageTimeLineData single = iterator.next();
if (single.groupId.equals(exceptGroupId)) {
iterator.remove();
break;
}
}
return data;
}
use of org.qii.weiciyuan.bean.GroupListBean in project weiciyuan by qii.
the class GroupDBTask method get.
public static GroupListBean get(String accountId) {
String sql = "select * from " + GroupTable.TABLE_NAME + " where " + GroupTable.ACCOUNTID + " = " + accountId;
Cursor c = getRsd().rawQuery(sql, null);
if (c.moveToNext()) {
String json = c.getString(c.getColumnIndex(GroupTable.JSONDATA));
if (!TextUtils.isEmpty(json)) {
GroupListBean bean = new Gson().fromJson(json, GroupListBean.class);
if (bean != null) {
return bean;
}
}
}
return null;
}
use of org.qii.weiciyuan.bean.GroupListBean in project weiciyuan by qii.
the class ManageGroupDialog method onResume.
/**
* alertdialog use string arry to store data, so you cant add or delete data
*/
@Override
public void onResume() {
super.onResume();
GroupListBean current = GlobalContext.getInstance().getGroup();
if (current != this.group) {
dismissAllowingStateLoss();
ManageGroupDialog dialog = new ManageGroupDialog(current, uid);
dialog.show(getFragmentManager(), "");
}
}
Aggregations