NIMSDK-AOS  9.16.0
QChatGetInviteApplyRecordOfServerParam.java
浏览该文件的文档.
1 package com.netease.nimlib.sdk.qchat.param;
2 
10  private final long serverId;
14  private Long fromTime;
18  private Long toTime;
22  private Boolean reverse;
26  private Integer limit;
30  private Long excludeRecordId;
31 
37  this.serverId = serverId;
38  }
39 
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 
62  public long getServerId() {
63  return serverId;
64  }
65 
70  public Long getFromTime() {
71  return fromTime;
72  }
73 
78  public void setFromTime(Long fromTime) {
79  this.fromTime = fromTime;
80  }
81 
86  public Long getToTime() {
87  return toTime;
88  }
89 
94  public void setToTime(Long toTime) {
95  this.toTime = toTime;
96  }
97 
102  public Boolean getReverse() {
103  return reverse;
104  }
105 
110  public void setReverse(Boolean reverse) {
111  this.reverse = reverse;
112  }
113 
118  public Integer getLimit() {
119  return limit;
120  }
121 
126  public void setLimit(Integer limit) {
127  this.limit = limit;
128  }
129 
134  public Long getExcludeRecordId() {
135  return excludeRecordId;
136  }
137 
142  public void setExcludeRecordId(Long excludeRecordId) {
143  this.excludeRecordId = excludeRecordId;
144  }
145 
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 setReverse(Boolean reverse)
设置是否逆序,同历史消息查询,默认从现在查到过去
void setLimit(Integer limit)
设置最大数量限制,默认100,最大100
void setExcludeRecordId(Long excludeRecordId)
设置排除RecordId,用于分页去重
QChatGetInviteApplyRecordOfServerParam(long serverId, Long fromTime, Long toTime, Boolean reverse, Integer limit, Long excludeRecordId)