NIMSDK-AOS  9.19.0
QChatGetChannelMuteMemberByPageParam.java
浏览该文件的文档.
1 package com.netease.nimlib.sdk.qchat.param;
2 
3 import com.netease.nimlib.log.NimLog;
4 
5 /**
6  * 分页获取频道禁言成员参数
7  */
9 
10  private static final String TAG = "QChatGetChannelMuteMemberByPageParam";
11 
12  /**
13  * 服务器id
14  */
15  private final long serverId;
16 
17  /**
18  * 频道id
19  */
20  private final long channelId;
21 
22  /**
23  * 分页标记。第一页不传,翻下一页传接口返回的cursor
24  */
25  private String cursor;
26 
27  /**
28  * 查询数量限制
29  */
30  private Integer limit;
31 
33  this.serverId = 0;
34  this.channelId = 0;
35  }
36  /**
37  *
38  * @param serverId 服务器id
39  * @param channelId 频道id
40  */
41  public QChatGetChannelMuteMemberByPageParam(long serverId, long channelId) {
42  this.serverId = serverId;
43  this.channelId = channelId;
44  }
45 
46  /**
47  *
48  * @param serverId 服务器id
49  * @param channelId 频道id
50  * @param cursor 分页标记,第一页不传,翻下一页传接口返回的cursor
51  * @param limit 查询数量限制
52  */
53  public QChatGetChannelMuteMemberByPageParam(long serverId, long channelId, String cursor, Integer limit) {
54  this.serverId = serverId;
55  this.channelId = channelId;
56  this.cursor = cursor;
57  this.limit = limit;
58 
59  }
60 
61  /**
62  * 获取服务器id
63  *
64  * @return 服务器id
65  */
66  public long getServerId() {
67  return serverId;
68  }
69 
70  /**
71  * 获取频道id
72  *
73  * @return 频道id
74  */
75  public long getChannelId() {
76  return channelId;
77  }
78 
79  /**
80  * 获取分页标记
81  *
82  * @return 分页标记
83  */
84  public String getCursor() {
85  return cursor;
86  }
87 
88  /**
89  * 设置分页标记
90  *
91  * @param cursor 分页标记
92  */
93  public void setCursor(String cursor) {
94  this.cursor = cursor;
95  }
96 
97  /**
98  * 获取查询数量限制
99  *
100  * @return 查询数量限制
101  */
102  public Integer getLimit() {
103  return limit;
104  }
105 
106  /**
107  * 设置查询数量限制
108  *
109  * @param limit 查询数量限制
110  */
111  public void setLimit(Integer limit) {
112  this.limit = limit;
113  }
114 
115  /**
116  * 参数是否有效
117  * @return
118  */
119  public boolean isValid() {
120  if(serverId <= 0) {
121  NimLog.e(TAG, "serverId is invalid");
122  return false;
123  }
124  if(channelId <= 0) {
125  NimLog.e(TAG, "channelId is invalid");
126  return false;
127  }
128  return true;
129  }
130 }
QChatGetChannelMuteMemberByPageParam(long serverId, long channelId, String cursor, Integer limit)