1 package com.netease.nimlib.sdk.qchat.param;
3 import androidx.annotation.NonNull;
4 import androidx.annotation.Nullable;
17 private final String keyword;
22 private final boolean asc;
28 private Long startTime;
40 private Integer limit;
46 private Long serverId;
56 private String cursor;
65 this(keyword, asc, null, null, null, null);
79 @Nullable Integer limit, @Nullable Long serverId) {
80 this.keyword = keyword;
82 this.startTime = startTime;
83 this.endTime = endTime;
85 this.serverId = serverId;
100 @Nullable Integer limit, @Nullable Long serverId,@Nullable String cursor) {
101 this.keyword = keyword;
103 this.startTime = startTime;
104 this.endTime = endTime;
106 this.serverId = serverId;
107 this.cursor = cursor;
123 this.keyword = keyword;
125 this.startTime = startTime;
126 this.endTime = endTime;
128 this.serverId = serverId;
130 this.cursor = cursor;
160 this.startTime = startTime;
176 this.endTime = endTime;
208 this.serverId = serverId;
240 this.cursor = cursor;
247 if (StringUtil.isEmpty(keyword)) {
250 if (startTime != null && startTime < 0) {
253 if (endTime != null && endTime < 0) {
256 if (limit != null && limit < 0) {
259 if (serverId != null && serverId <= 0) {
267 return "QChatSearchChannelByPageParam{" +
268 "keyword='" + keyword +
'\'' +
270 ", startTime=" + startTime +
271 ", endTime=" + endTime +
273 ", serverId=" + serverId +
Long getStartTime()
获取查询时间范围的开始时间
QChatSearchChannelByPageParam(@NonNull String keyword, boolean asc, @Nullable Long startTime, @Nullable Long endTime, @Nullable Integer limit, @Nullable Long serverId, @Nullable String cursor)
构造函数
void setLimit(@Nullable Integer limit)
设置检索返回的最大记录数
Long getEndTime()
获取查询时间范围的结束时间
QChatChannelSearchSortEnum getSort()
获取排序条件
QChatSearchChannelByPageParam(@NonNull String keyword, boolean asc)
构造函数
Integer getLimit()
获取检索返回的最大记录数
void setServerId(@Nullable Long serverId)
设置服务器类型
void setStartTime(@Nullable Long startTime)
设置查询时间范围的开始时间
Long getServerId()
获取服务器类型
String getKeyword()
获取检索关键字
void setSort(QChatChannelSearchSortEnum sort)
设置排序条件
void setEndTime(@Nullable Long endTime)
设置查询时间范围的结束时间
void setCursor(String cursor)
设置查询游标,下次查询的起始位置,第一页设置为null,查询下一页是传入上一页返回的cursor ...
QChatSearchChannelByPageParam(@NonNull String keyword, boolean asc, @Nullable Long startTime, @Nullable Long endTime, @Nullable Integer limit, @Nullable Long serverId, QChatChannelSearchSortEnum sort, @Nullable String cursor)
构造函数
QChatSearchChannelByPageParam(@NonNull String keyword, boolean asc, @Nullable Long startTime, @Nullable Long endTime, @Nullable Integer limit, @Nullable Long serverId)
构造函数