NIMSDK-AOS  9.16.3
GetMessagesByTagsParam.java
浏览该文件的文档.
1 package com.netease.nimlib.sdk.chatroom.model;
2 
3 import com.netease.nimlib.notifier.support26.annotation.NonNull;
5 
6 import java.util.List;
7 
8 public class GetMessagesByTagsParam {
12  private final long roomId;
16  private final List<String> tags;
17 
22  private List<MsgTypeEnum> types;
26  private Long fromTime;
30  private Long toTime;
34  private Integer limit;
38  private Boolean reverse;
39 
46  public GetMessagesByTagsParam(long roomId, @NonNull List<String> tags) {
47  this.roomId = roomId;
48  this.tags = tags;
49  }
50 
54  public long getRoomId() {
55  return roomId;
56  }
57 
61  public List<String> getTags() {
62  return tags;
63  }
64 
69  public List<MsgTypeEnum> getTypes() {
70  return types;
71  }
72 
77  public void setTypes(List<MsgTypeEnum> types) {
78  this.types = types;
79  }
80 
85  public Long getFromTime() {
86  return fromTime;
87  }
88 
93  public void setFromTime(Long fromTime) {
94  this.fromTime = fromTime;
95  }
96 
101  public Long getToTime() {
102  return toTime;
103  }
104 
109  public void setToTime(Long toTime) {
110  this.toTime = toTime;
111  }
112 
117  public Integer getLimit() {
118  return limit;
119  }
120 
125  public void setLimit(Integer limit) {
126  this.limit = limit;
127  }
128 
133  public Boolean getReverse() {
134  return reverse;
135  }
136 
141  public void setReverse(Boolean reverse) {
142  this.reverse = reverse;
143  }
144 
145  @Override
146  public String toString() {
147  return "GetMessagesByTagsParam{" +
148  "roomId=" + roomId +
149  ", tags=" + tags +
150  ", messageTypes=" + types +
151  ", fromTime=" + fromTime +
152  ", toTime=" + toTime +
153  ", limit=" + limit +
154  ", reverse=" + reverse +
155  '}';
156  }
157 }
void setToTime(Long toTime)
设置结束时间限制,只查询≤结束时间的消息
Long getToTime()
结束时间限制,只查询≤结束时间的消息
void setFromTime(Long fromTime)
设置起始时间限制,只查询≥起始时间的消息
Integer getLimit()
数量限制,只结果只包含前面指定条数的消息
GetMessagesByTagsParam(long roomId, @NonNull List< String > tags)
构造函数
void setLimit(Integer limit)
设置数量限制,只结果只包含前面指定条数的消息
List< MsgTypeEnum > getTypes()
只查询指定消息类型的
void setTypes(List< MsgTypeEnum > types)
设置消息类型限制,只查询指定消息类型的消息
Long getFromTime()
起始时间限制,只查询≥起始时间的消息