NIMSDK-AOS  9.20.10
QChatGetUncategorizedChannelsByPageParam.java
浏览该文件的文档.
1 package com.netease.nimlib.sdk.qchat.param;
2 
3 import androidx.annotation.NonNull;
4 import com.netease.nimlib.log.NimLog;
5 
6 /**
7  * "分页查询没有频道分组的频道"接口入参
8  */
10 
11  private static final String TAG = "QChatGetUncategorizedChannelsByPageParam";
12  /**
13  * 服务器Id
14  */
15  @NonNull
16  private final long serverId;
17  /**
18  * 分页标记,第一页不传,翻下一页传接口返回的cursor
19  */
20  private String cursor;
21  /**
22  * 查询数量限制
23  */
24  private Integer limit;
25 
27  this(0L);
28  }
29 
30  /**
31  *
32  * @param serverId 服务器Id
33  */
35  this.serverId = serverId;
36  }
37 
38  /**
39  *
40  * @param serverId 服务器Id
41  * @param cursor 分页标记,第一页不传,翻下一页传接口返回的cursor
42  * @param limit 查询数量限制
43  */
44  public QChatGetUncategorizedChannelsByPageParam(long serverId, String cursor, Integer limit) {
45  this.serverId = serverId;
46  this.cursor = cursor;
47  this.limit = limit;
48  }
49 
50  /**
51  * 获取服务器id
52  * @return serverId
53  */
54  @NonNull
55  public Long getServerId() {
56  return serverId;
57  }
58 
59  /**
60  * 获取分页标记
61  * @return cursor
62  */
63  public String getCursor() {
64  return cursor;
65  }
66 
67  /**
68  * 获取查询数量限制
69  * @return limit
70  */
71  public Integer getLimit() {
72  return limit;
73  }
74 
75  /**
76  * 参数是否有效
77  * @return
78  */
79  public boolean isValid() {
80  if (serverId < 0L) {
81  NimLog.e(TAG, "serverId is invalid");
82  return false;
83  }
84  return true;
85  }
86 }