NIMSDK-AOS  10.10.13
V2NIMTeamMemberQueryOption.java
浏览该文件的文档.
1 package com.netease.nimlib.sdk.v2.team.option;
2 
5 
6 /**
7  * 群组成员查询参数
8  */
10 
11  /**
12  * 群组成员角色查询类型
13  */
14  private V2NIMTeamMemberRoleQueryType roleQueryType;
15  /**
16  * 是否只返回聊天禁言成员列表
17  * true: 只返回聊天禁言成员列表
18  * false:全部成员列表
19  */
20  private Boolean onlyChatBanned = false;
21  /**
22  * 消息查询方向
23  */
25  /**
26  * 分页偏移,首次传"",后续拉取采用上一次返回的nextToken
27  */
28  private String nextToken = "";
29  /**
30  * 分页拉取数量
31  */
32  private Integer limit;
33 
35  }
36 
37  /**
38  *
39  * @param roleQueryType 群组成员角色查询类型
40  * @param onlyChatBanned 是否只返回聊天禁言成员列表
41  * @param nextToken 分页偏移,首次传"",后续拉取采用上一次返回的nextToken
42  * @param limit 分页拉取数量
43  */
44  public V2NIMTeamMemberQueryOption(V2NIMTeamMemberRoleQueryType roleQueryType, boolean onlyChatBanned,V2NIMQueryDirection direction, String nextToken, int limit) {
45  this.roleQueryType = roleQueryType;
46  this.onlyChatBanned = onlyChatBanned;
47  this.direction = direction;
48  this.nextToken = nextToken;
49  this.limit = limit;
50  }
51 
52  /**
53  * 获取群组成员角色查询类型
54  * @return 群组成员角色查询类型
55  */
57  return roleQueryType;
58  }
59 
60  /**
61  * 设置群组成员角色查询类型
62  * @param roleQueryType 群组成员角色查询类型
63  */
64  public void setRoleQueryType(V2NIMTeamMemberRoleQueryType roleQueryType) {
65  this.roleQueryType = roleQueryType;
66  }
67 
68  /**
69  * 是否只返回聊天禁言成员列表
70  * @return 是否只返回聊天禁言成员列表
71  */
72  public Boolean isOnlyChatBanned() {
73  return onlyChatBanned;
74  }
75 
76  /**
77  * 设置是否只返回聊天禁言成员列表,true: 只返回聊天禁言成员列表,false:全部成员列表
78  * @param onlyChatBanned 是否只返回聊天禁言成员列表
79  */
80  public void setOnlyChatBanned(boolean onlyChatBanned) {
81  this.onlyChatBanned = onlyChatBanned;
82  }
83 
85  return direction;
86  }
87 
88  public void setDirection(V2NIMQueryDirection direction) {
89  this.direction = direction;
90  }
91 
92  /**
93  * 获取分页偏移
94  * @return 分页偏移
95  */
96  public String getNextToken() {
97  return nextToken;
98  }
99 
100  /**
101  * 设置分页偏移,首次传"",后续拉取采用上一次返回的nextToken
102  * @param nextToken 分页偏移
103  */
104  public void setNextToken(String nextToken) {
105  this.nextToken = nextToken;
106  }
107 
108  /**
109  * 获取分页拉取数量
110  * @return 分页拉取数量
111  */
112  public Integer getLimit() {
113  return limit;
114  }
115 
116  /**
117  * 设置分页拉取数量
118  * @param limit 分页拉取数量
119  */
120  public void setLimit(int limit) {
121  this.limit = limit;
122  }
123 
124  public boolean isValid(){
125  if(roleQueryType == null){
126  return false;
127  }
128  if(limit != null && limit <= 0){
129  return false;
130  }
131  return true;
132  }
133 
134  @Override
135  public String toString() {
136  final StringBuilder sb = new StringBuilder("V2NIMTeamMemberQueryOption{");
137  sb.append("roleQueryType=").append(roleQueryType);
138  sb.append(", onlyChatBanned=").append(onlyChatBanned);
139  sb.append(", direction=").append(direction);
140  sb.append(", nextToken='").append(nextToken).append('\'');
141  sb.append(", limit=").append(limit);
142  sb.append('}');
143  return sb.toString();
144  }
145 }
V2NIMTeamMemberQueryOption(V2NIMTeamMemberRoleQueryType roleQueryType, boolean onlyChatBanned, V2NIMQueryDirection direction, String nextToken, int limit)
void setOnlyChatBanned(boolean onlyChatBanned)
设置是否只返回聊天禁言成员列表,true: 只返回聊天禁言成员列表,false:全部成员列表 ...
void setNextToken(String nextToken)
设置分页偏移,首次传"",后续拉取采用上一次返回的nextToken
void setRoleQueryType(V2NIMTeamMemberRoleQueryType roleQueryType)
设置群组成员角色查询类型
V2NIMTeamMemberRoleQueryType getRoleQueryType()
获取群组成员角色查询类型
Boolean isOnlyChatBanned()
是否只返回聊天禁言成员列表