NIMSDK-AOS  9.19.0
MsgFullKeywordSearchConfig.java
浏览该文件的文档.
1 package com.netease.nimlib.sdk.msg.model;
2 
3 import androidx.annotation.Nullable;
4 
6 
7 import java.util.List;
8 
10  /** 关键词 */
11  private final String keyword;
12 
13  /** 起始时间 */
14  private final long fromTime;
15 
16  /** 终止时间 */
17  private final long toTime;
18 
19  /** 会话数量上限 */
20  private int sessionLimit;
21 
22  /** 会话数量下限 */
23  private int msgLimit;
24 
25  /** 消息排序规则,默认false*/
26  private boolean asc = false;
27 
28  /** P2P范围,要查询的会话范围是此参数与{@link MsgFullKeywordSearchConfig#teamList} 的并集 */
29  private List<String> p2pList;
30 
31  /** 群范围,如果只查询指定群中的消息,则输入这些群的ID */
32  private List<String> teamList;
33 
34  /** 发送方列表 */
35  private List<String> senderList;
36 
37  /** 消息类型列表 */
38  private List<MsgTypeEnum> msgTypeList;
39 
40  /** 消息子类型列表 */
41  private List<Integer> msgSubtypeList;
42 
43 
44 
45  public MsgFullKeywordSearchConfig(String keyword, long fromTime, long toTime) {
46  this.keyword = keyword;
47  this.fromTime = fromTime;
48  this.toTime = toTime;
49  }
50 
51  @Nullable
52  public String getKeyword() {
53  return keyword;
54  }
55 
56  public long getFromTime() {
57  return fromTime;
58  }
59 
60  public long getToTime() {
61  return toTime;
62  }
63 
64  public int getSessionLimit() {
65  return sessionLimit;
66  }
67 
68  public void setSessionLimit(int sessionLimit) {
69  this.sessionLimit = sessionLimit;
70  }
71 
72  public int getMsgLimit() {
73  return msgLimit;
74  }
75 
76  public void setMsgLimit(int msgLimit) {
77  this.msgLimit = msgLimit;
78  }
79 
80  public boolean isAsc() {
81  return asc;
82  }
83 
84  public void setAsc(boolean asc) {
85  this.asc = asc;
86  }
87 
88  @Nullable
89  public List<String> getP2pList() {
90  return p2pList;
91  }
92 
93  public void setP2pList(@Nullable List<String> p2pList) {
94  this.p2pList = p2pList;
95  }
96 
97  @Nullable
98  public List<String> getTeamList() {
99  return teamList;
100  }
101 
102  public void setTeamList(@Nullable List<String> teamList) {
103  this.teamList = teamList;
104  }
105 
106  @Nullable
107  public List<String> getSenderList() {
108  return senderList;
109  }
110 
111  public void setSenderList(@Nullable List<String> senderList) {
112  this.senderList = senderList;
113  }
114 
115  @Nullable
116  public List<MsgTypeEnum> getMsgTypeList() {
117  return msgTypeList;
118  }
119 
120  public void setMsgTypeList(@Nullable List<MsgTypeEnum> msgTypeList) {
121  this.msgTypeList = msgTypeList;
122  }
123 
124  @Nullable
125  public List<Integer> getMsgSubtypeList() {
126  return msgSubtypeList;
127  }
128 
129  public void setMsgSubtypeList(@Nullable List<Integer> msgSubtypeList) {
130  this.msgSubtypeList = msgSubtypeList;
131  }
132 
133  @Override
134  public String toString() {
135  return "MsgFullKeywordSearchConfig{" +
136  "keyword='" + keyword + '\'' +
137  ", fromTime=" + fromTime +
138  ", toTime=" + toTime +
139  ", sessionLimit=" + sessionLimit +
140  ", msgLimit=" + msgLimit +
141  ", asc=" + asc +
142  ", p2pList=" + p2pList +
143  ", teamList=" + teamList +
144  ", senderList=" + senderList +
145  ", msgTypeList=" + msgTypeList +
146  ", msgSubtypeList=" + msgSubtypeList +
147  '}';
148  }
149 }
void setMsgSubtypeList(@Nullable List< Integer > msgSubtypeList)
MsgFullKeywordSearchConfig(String keyword, long fromTime, long toTime)
void setMsgTypeList(@Nullable List< MsgTypeEnum > msgTypeList)