View Javadoc
1   package com.foxinmy.weixin4j.mp.model;
2   
3   import java.io.Serializable;
4   import java.util.List;
5   
6   import com.alibaba.fastjson.annotation.JSONField;
7   
8   /**
9    * 关注信息
10   * 
11   * @author jinyu(foxinmy@gmail.com)
12   * @date 2014年4月4日
13   * @since JDK 1.6
14   */
15  public class Following implements Serializable {
16  
17  	private static final long serialVersionUID = 1917454368271027134L;
18  
19  	/**
20  	 * 关注总数
21  	 */
22  	private int total;
23  	/**
24  	 * 拉取的OPENID个数,最大值为10000
25  	 */
26  	private int count;
27  	/**
28  	 * 列表数据,OPENID的列表
29  	 */
30  	@JSONField(deserialize = false)
31  	private List<String> openIds;
32  	/**
33  	 * 拉取列表的后一个用户的OPENID
34  	 */
35  	@JSONField(name = "next_openid")
36  	private String nextOpenId;
37  	/**
38  	 * 用户详情列表
39  	 * 
40  	 * @see com.foxinmy.weixin4j.mp.model.User
41  	 */
42  	@JSONField(deserialize = false)
43  	private List<User> userList;
44  
45  	public int getTotal() {
46  		return total;
47  	}
48  
49  	public void setTotal(int total) {
50  		this.total = total;
51  	}
52  
53  	public int getCount() {
54  		return count;
55  	}
56  
57  	public void setCount(int count) {
58  		this.count = count;
59  	}
60  
61  	public List<User> getUserList() {
62  		return userList;
63  	}
64  
65  	public void setUserList(List<User> userList) {
66  		this.userList = userList;
67  	}
68  
69  	public List<String> getOpenIds() {
70  		return openIds;
71  	}
72  
73  	public void setOpenIds(List<String> openIds) {
74  		this.openIds = openIds;
75  	}
76  
77  	public String getNextOpenId() {
78  		return nextOpenId;
79  	}
80  
81  	public void setNextOpenId(String nextOpenId) {
82  		this.nextOpenId = nextOpenId;
83  	}
84  
85  	public boolean hasContent() {
86  		return userList != null && !userList.isEmpty();
87  	}
88  
89  	@Override
90  	public String toString() {
91  		return "Following [total=" + total + ", count=" + count + ", openIds=" + openIds + ", nextOpenId=" + nextOpenId
92  				+ ", userList=" + userList + "]";
93  	}
94  }