NIMSDK-AOS  9.16.0
QChatSearchMsgByPageParam.java
浏览该文件的文档.
1 package com.netease.nimlib.sdk.qchat.param;
2 
3 import androidx.annotation.NonNull;
6 import java.util.List;
7 
12 
16  private String keyword;
20  private final long serverId;
21 
25  private Long channelId;
26 
30  private String fromAccount;
31 
35  private Long fromTime;
36 
40  private Long toTime;
41 
45  @NonNull
46  private final List<MsgTypeEnum> msgTypes;
50  private List<Integer> subTypes;
54  private Boolean isIncludeSelf;
55 
59  private Boolean order;
63  private Integer limit;
67  private QChatMessageSearchSortEnum sort;
68 
72  private String cursor;
73 
74 
80  public QChatSearchMsgByPageParam(long serverId, @NonNull List<MsgTypeEnum> msgTypes) {
81  this.serverId = serverId;
82  this.msgTypes = msgTypes;
83  }
84 
101  public QChatSearchMsgByPageParam(String keyword, long serverId, Long channelId, String fromAccount, Long fromTime, Long toTime,
102  @NonNull List<MsgTypeEnum> msgTypes, List<Integer> subTypes, Boolean isIncludeSelf, Boolean order, Integer limit,
103  QChatMessageSearchSortEnum sort, String cursor) {
104  this.keyword = keyword;
105  this.serverId = serverId;
106  this.channelId = channelId;
107  this.fromAccount = fromAccount;
108  this.fromTime = fromTime;
109  this.toTime = toTime;
110  this.msgTypes = msgTypes;
111  this.subTypes = subTypes;
112  this.isIncludeSelf = isIncludeSelf;
113  this.order = order;
114  this.limit = limit;
115  this.sort = sort;
116  this.cursor = cursor;
117  }
118 
123  public String getKeyword() {
124  return keyword;
125  }
126 
131  public void setKeyword(String keyword) {
132  this.keyword = keyword;
133  }
134 
139  public long getServerId() {
140  return serverId;
141  }
142 
147  public Long getChannelId() {
148  return channelId;
149  }
150 
155  public void setChannelId(Long channelId) {
156  this.channelId = channelId;
157  }
158 
163  public String getFromAccount() {
164  return fromAccount;
165  }
166 
171  public void setFromAccount(String fromAccount) {
172  this.fromAccount = fromAccount;
173  }
174 
179  public Long getFromTime() {
180  return fromTime;
181  }
182 
187  public void setFromTime(Long fromTime) {
188  this.fromTime = fromTime;
189  }
190 
195  public Long getToTime() {
196  return toTime;
197  }
198 
203  public void setToTime(Long toTime) {
204  this.toTime = toTime;
205  }
206 
212  @NonNull
213  public List<MsgTypeEnum> getMsgTypes() {
214  return msgTypes;
215  }
216 
221  public List<Integer> getSubTypes() {
222  return subTypes;
223  }
224 
229  public void setSubTypes(List<Integer> subTypes) {
230  this.subTypes = subTypes;
231  }
232 
237  public Boolean isIncludeSelf() {
238  return isIncludeSelf;
239  }
240 
245  public void setIncludeSelf(Boolean includeSelf) {
246  isIncludeSelf = includeSelf;
247  }
248 
253  public Boolean getOrder() {
254  return order;
255  }
256 
261  public void setOrder(Boolean order) {
262  this.order = order;
263  }
264 
269  public Integer getLimit() {
270  return limit;
271  }
272 
277  public void setLimit(Integer limit) {
278  this.limit = limit;
279  }
280 
286  return sort;
287  }
288 
294  this.sort = sort;
295  }
296 
301  public String getCursor() {
302  return cursor;
303  }
304 
309  public void setCursor(String cursor) {
310  this.cursor = cursor;
311  }
312 }
void setLimit(Integer limit)
设置检索返回的最大记录数,最大和默认都是100
QChatSearchMsgByPageParam(long serverId, @NonNull List< MsgTypeEnum > msgTypes)
String getCursor()
获取查询游标,下次查询的起始位置,第一页设置为null,查询下一页是传入上一页返回的cursor ...
void setSubTypes(List< Integer > subTypes)
设置搜索的消息子类型列表
Boolean isIncludeSelf()
获取是否包含自己发送的消息
void setIncludeSelf(Boolean includeSelf)
设置是否包含自己发送的消息
List< MsgTypeEnum > getMsgTypes()
获取搜索的消息类型列表
void setFromAccount(String fromAccount)
设置消息发送者accid
void setSort(QChatMessageSearchSortEnum sort)
设置排序条件
Boolean getOrder()
获取排序规则 true:正序;false:倒序(默认)
Integer getLimit()
获取检索返回的最大记录数,最大和默认都是100
void setCursor(String cursor)
设置查询游标,下次查询的起始位置,第一页设置为null,查询下一页是传入上一页返回的cursor ...
void setOrder(Boolean order)
设置排序规则 true:正序;false:倒序(默认)
List< Integer > getSubTypes()
获取搜索的消息子类型列表
QChatSearchMsgByPageParam(String keyword, long serverId, Long channelId, String fromAccount, Long fromTime, Long toTime, @NonNull List< MsgTypeEnum > msgTypes, List< Integer > subTypes, Boolean isIncludeSelf, Boolean order, Integer limit, QChatMessageSearchSortEnum sort, String cursor)