NIMSDK-AOS  9.19.0
QueryMySessionOption.java
浏览该文件的文档.
1 package com.netease.nimlib.sdk.msg.model;
2 
3 import java.io.Serializable;
4 
5 public class QueryMySessionOption implements Serializable {
6  /**
7  * 最小时间戳,作为请求参数时表示增量获取Session列表
8  * 默认0,0表示客户端一点数据都没有,其他表示返回[大于等于]这个时间戳的session列表
9  */
10  private long minTimestamp;
11  /**
12  * 最大时间戳,翻页时使用
13  * 默认0,0表示请求的是最近的N条,翻页时选上一次列表中Session的updateTime的最小值,会返回[小于等于]这个时间戳的session列表,所以翻页时可能会重复返回上一页的session
14  */
15  private long maxTimestamp;
16  /**
17  * 是否需要lastMsg
18  * 默认true
19  */
20  private boolean needLastMsg;
21  /**
22  * 结果集limit
23  * 默认100,最大100
24  */
25  private int limit;
26 
28  this.minTimestamp = 0L;
29  this.maxTimestamp = 0L;
30  this.needLastMsg = true;
31  this.limit = 100;
32  }
33 
34  public QueryMySessionOption(long minTimestamp, long maxTimestamp, boolean needLastMsg, int limit) {
35  this.minTimestamp = minTimestamp;
36  this.maxTimestamp = maxTimestamp;
37  this.needLastMsg = needLastMsg;
38  this.limit = limit;
39  }
40 
41  public long getMinTimestamp() {
42  return minTimestamp;
43  }
44 
45  public void setMinTimestamp(long minTimestamp) {
46  this.minTimestamp = minTimestamp;
47  }
48 
49  public long getMaxTimestamp() {
50  return maxTimestamp;
51  }
52 
53  public void setMaxTimestamp(long maxTimestamp) {
54  this.maxTimestamp = maxTimestamp;
55  }
56 
57  public boolean isNeedLastMsg() {
58  return needLastMsg;
59  }
60 
61  public void setNeedLastMsg(boolean needLastMsg) {
62  this.needLastMsg = needLastMsg;
63  }
64 
65  public int getLimit() {
66  return limit;
67  }
68 
69  public void setLimit(int limit) {
70  this.limit = limit;
71  }
72 
73  @Override
74  public String toString() {
75  return "QueryMySessionOption{" +
76  "minTimestamp=" + minTimestamp +
77  ", maxTimestamp=" + maxTimestamp +
78  ", needLastMsg=" + needLastMsg +
79  ", limit=" + limit +
80  '}';
81  }
82 }
QueryMySessionOption(long minTimestamp, long maxTimestamp, boolean needLastMsg, int limit)