NIMSDK-AOS 10.4.0-beta
载入中...
搜索中...
未找到
QChatMessageQueryOption.java
浏览该文件的文档.
1package com.netease.nimlib.sdk.qchat.model;
2
3import java.io.Serializable;
4
5/**
6 * 消息查询选项
7 */
8public class QChatMessageQueryOption implements Serializable {
9 /**
10 * 起始时间
11 */
12 private Long fromTime;
13 /**
14 * 结束时间
15 */
16 private Long toTime;
17 /**
18 * excludeMsgId,排除消息id
19 */
20 private Long excludeMessageId;
21 /**
22 * limit,条数限制,默认100
23 */
24 private Integer limit;
25 /**
26 * reverse,是否反向
27 */
28 private Boolean reverse = false;
29
30 /**
31 * 获取起始时间
32 * @return
33 */
34 public Long getFromTime() {
35 return fromTime;
36 }
37
38 /**
39 * 设置起始时间
40 * 如果要查最新的100条,则fromTime=0, toTime=0, limit=0, reverse=0
41 * @param fromTime
42 */
43 public void setFromTime(Long fromTime) {
44 this.fromTime = fromTime;
45 }
46
47 /**
48 * 获取结束时间
49 * @return
50 */
51 public Long getToTime() {
52 return toTime;
53 }
54
55 /**
56 * 设置结束时间
57 * @param toTime
58 */
59 public void setToTime(Long toTime) {
60 this.toTime = toTime;
61 }
62
63 /**
64 * 获取排除消息id
65 * @return
66 */
67 public Long getExcludeMessageId() {
68 return excludeMessageId;
69 }
70
71 /**
72 * 设置排除消息id
73 * @param excludeMsgId
74 */
75 public void setExcludeMessageId(Long excludeMsgId) {
76 this.excludeMessageId = excludeMsgId;
77 }
78
79 /**
80 * 获取条数限制
81 * @return
82 */
83 public Integer getLimit() {
84 return limit;
85 }
86
87 /**
88 * 设置条数限制
89 * @param limit
90 */
91 public void setLimit(Integer limit) {
92 this.limit = limit;
93 }
94
95 /**
96 * 是否反向
97 * @return
98 */
99 public Boolean isReverse() {
100 return reverse;
101 }
102
103 /**
104 * 设置是否反向
105 * @param reverse
106 */
107 public void setReverse(Boolean reverse) {
108 this.reverse = reverse;
109 }
110}
void setExcludeMessageId(Long excludeMsgId)
设置排除消息id
void setFromTime(Long fromTime)
设置起始时间 如果要查最新的100条,则fromTime=0, toTime=0, limit=0, reverse=0