NIMSDK-AOS 10.4.0-beta
载入中...
搜索中...
未找到
QChatGetInviteApplyRecordOfServerParam.java
浏览该文件的文档.
1package com.netease.nimlib.sdk.qchat.param;
2
3/**
4 * "查询服务器下的申请邀请记录接口" 入参
5 */
7 /**
8 * 服务器ID
9 */
10 private final long serverId;
11 /**
12 * 开始时间戳
13 */
14 private Long fromTime;
15 /**
16 * 结束时间戳
17 */
18 private Long toTime;
19 /**
20 * 是否逆序,同历史消息查询,默认从现在查到过去
21 */
22 private Boolean reverse;
23 /**
24 * 最大数量限制,默认100,最大100
25 */
26 private Integer limit;
27 /**
28 * 排除id
29 */
30 private Long excludeRecordId;
31
32 /**
33 *
34 * @param serverId 服务器ID
35 */
37 this.serverId = serverId;
38 }
39
40 /**
41 *
42 * @param serverId 服务器ID
43 * @param fromTime 开始时间戳
44 * @param toTime 结束时间戳
45 * @param reverse 是否逆序,同历史消息查询,默认从现在查到过去
46 * @param limit 最大数量限制,默认100,最大100
47 * @param excludeRecordId 排除id
48 */
49 public QChatGetInviteApplyRecordOfServerParam(long serverId, Long fromTime, Long toTime, Boolean reverse, Integer limit, Long excludeRecordId) {
50 this.serverId = serverId;
51 this.fromTime = fromTime;
52 this.toTime = toTime;
53 this.reverse = reverse;
54 this.limit = limit;
55 this.excludeRecordId = excludeRecordId;
56 }
57
58 /**
59 * 获取服务器ID
60 * @return
61 */
62 public long getServerId() {
63 return serverId;
64 }
65
66 /**
67 * 获取开始时间戳
68 * @return
69 */
70 public Long getFromTime() {
71 return fromTime;
72 }
73
74 /**
75 * 设置开始时间戳
76 * @param fromTime
77 */
78 public void setFromTime(Long fromTime) {
79 this.fromTime = fromTime;
80 }
81
82 /**
83 * 获取结束时间戳
84 * @return
85 */
86 public Long getToTime() {
87 return toTime;
88 }
89
90 /**
91 * 设置结束时间戳
92 * @param toTime
93 */
94 public void setToTime(Long toTime) {
95 this.toTime = toTime;
96 }
97
98 /**
99 * 是否逆序
100 * @return
101 */
102 public Boolean getReverse() {
103 return reverse;
104 }
105
106 /**
107 * 设置是否逆序,同历史消息查询,默认从现在查到过去
108 * @param reverse
109 */
110 public void setReverse(Boolean reverse) {
111 this.reverse = reverse;
112 }
113
114 /**
115 * 获取最大数量限制
116 * @return
117 */
118 public Integer getLimit() {
119 return limit;
120 }
121
122 /**
123 * 设置最大数量限制,默认100,最大100
124 * @param limit
125 */
126 public void setLimit(Integer limit) {
127 this.limit = limit;
128 }
129
130 /**
131 * 获取排除RecordId
132 * @return
133 */
134 public Long getExcludeRecordId() {
135 return excludeRecordId;
136 }
137
138 /**
139 * 设置排除RecordId,用于分页去重
140 * @param excludeRecordId
141 */
142 public void setExcludeRecordId(Long excludeRecordId) {
143 this.excludeRecordId = excludeRecordId;
144 }
145
146 /**
147 * 参数是否合法
148 * @return
149 */
150 public boolean isValid() {
151 if (fromTime != null && fromTime < 0) {
152 return false;
153 }
154 if (toTime != null && toTime < 0) {
155 return false;
156 }
157 if (limit != null && limit < 0) {
158 return false;
159 }
160 if (serverId <= 0) {
161 return false;
162 }
163 return true;
164 }
165
166 @Override
167 public String toString() {
168 return "QChatGetInviteApplyRecordOfServerParam{" +
169 "serverId=" + serverId +
170 ", fromTime=" + fromTime +
171 ", toTime=" + toTime +
172 ", reverse=" + reverse +
173 ", limit=" + limit +
174 ", excludeRecordId=" + excludeRecordId +
175 '}';
176 }
177}
void setLimit(Integer limit)
设置最大数量限制,默认100,最大100
void setExcludeRecordId(Long excludeRecordId)
设置排除RecordId,用于分页去重
QChatGetInviteApplyRecordOfServerParam(long serverId, Long fromTime, Long toTime, Boolean reverse, Integer limit, Long excludeRecordId)
void setReverse(Boolean reverse)
设置是否逆序,同历史消息查询,默认从现在查到过去