public class AVIMConversationsQuery extends Object
| 限定符 | 构造器和说明 |
|---|---|
protected |
AVIMConversationsQuery(AVIMClient client) |
| 限定符和类型 | 方法和说明 |
|---|---|
AVIMConversationsQuery |
addAscendingOrder(String key)
设置返回集合按照指定key进行升序排列,此 key 的优先级小于先前设置的 key
|
AVIMConversationsQuery |
addDescendingOrder(String key)
设置返回集合按照指定key进行降序排列,此 key 的优先级小于先前设置的 key
|
AVIMConversationsQuery |
containsMembers(List<String> peerIds)
增加查询条件,指定聊天室的组员包含某些成员即可返回
|
void |
findInBackground(AVIMConversationQueryCallback callback) |
long |
getCacheMaxAge() |
boolean |
isWithLastMessagesRefreshed()
是否携带最后一条消息
|
AVIMConversationsQuery |
limit(int limit)
设置返回集合的大小上限
|
static AVIMConversationsQuery |
or(List<AVIMConversationsQuery> queries)
Constructs a AVIMConversationsQuery that is the or of the given queries.
|
AVIMConversationsQuery |
orderByAscending(String key)
设置返回集合按照指定key进行增序排列
|
AVIMConversationsQuery |
orderByDescending(String key)
设置返回集合按照指定key进行降序排列
|
void |
setCacheMaxAge(long maxAgeInSecond)
设置查询缓存的有效时间
|
AVIMConversationsQuery |
setLimit(int limit)
设置返回集合的大小上限
|
void |
setQueryPolicy(cn.leancloud.AVQuery.CachePolicy policy)
设置 AVIMConversationsQuery 的查询策略
|
AVIMConversationsQuery |
setSkip(int skip)
设置返回集合的起始位置,一般用于分页
|
AVIMConversationsQuery |
setWithLastMessagesRefreshed(boolean isWithLastMessageRefreshed)
设置是否携带最后一条消息
|
AVIMConversationsQuery |
skip(int skip)
设置返回集合的起始位置,一般用于分页
|
AVIMConversationsQuery |
whereContains(String key,
String subString)
增加查询条件,当conversation的属性中对应的字段对应的值包含此字符串即可返回
|
AVIMConversationsQuery |
whereContainsAll(String key,
Collection<?> values)
增加查询条件,当conversation的属性中对应的字段中的元素包含所有的值才可返回
|
AVIMConversationsQuery |
whereContainsIn(String key,
Collection<?> value)
增加查询条件,当conversation的属性中对应的字段对应的值包含在指定值中时即可返回
|
AVIMConversationsQuery |
whereDoesNotExist(String key)
增加查询条件,当 conversation 的属性中对应的字段没有值时即可返回
|
AVIMConversationsQuery |
whereEndsWith(String key,
String suffix)
增加查询条件,当conversation的属性中对应的字段对应的值以此字符串结束即可返回
|
AVIMConversationsQuery |
whereEqualTo(String key,
Object value)
增加查询条件,当conversation的属性中对应的字段满足等于条件时即可返回
|
AVIMConversationsQuery |
whereExists(String key)
增加查询条件,当 conversation 的属性中对应的字段有值时即可返回
|
AVIMConversationsQuery |
whereGreaterThan(String key,
Object value)
增加查询条件,当conversation的属性中对应的字段满足大于条件时即可返回
|
AVIMConversationsQuery |
whereGreaterThanOrEqualsTo(String key,
Object value)
增加查询条件,当conversation的属性中对应的字段满足大于等于条件时即可返回
|
AVIMConversationsQuery |
whereLessThan(String key,
Object value)
增加查询条件,当conversation的属性中对应的字段满足小于条件时即可返回
|
AVIMConversationsQuery |
whereLessThanOrEqualsTo(String key,
Object value)
增加查询条件,当conversation的属性中对应的字段满足小于等于条件时即可返回
|
AVIMConversationsQuery |
whereMatches(String key,
String regex)
增加查询条件,当conversation的属性中对应的字段对应的值满足提供的正则表达式即可返回
|
AVIMConversationsQuery |
whereMatches(String key,
String regex,
String modifiers)
增加查询条件,当conversation的属性中对应的字段对应的值满足提供的正则表达式即可返回
|
AVIMConversationsQuery |
whereNear(String key,
cn.leancloud.types.AVGeoPoint point)
增加一个基于地理位置的近似查询,当conversation的属性中对应字段对应的地理位置在pointer附近时即可返回
|
AVIMConversationsQuery |
whereNotContainsIn(String key,
Collection<?> value)
增加查询条件,当conversation的属性中对应的字段对应的值不包含在指定值中时即可返回
|
AVIMConversationsQuery |
whereNotEqualsTo(String key,
Object value)
增加查询条件,当conversation的属性中对应的字段满足不等于条件时即可返回
|
AVIMConversationsQuery |
whereSizeEqual(String key,
int size)
添加查询约束条件,查找key类型是数组,该数组的长度匹配提供的数值
|
AVIMConversationsQuery |
whereStartsWith(String key,
String prefix)
增加查询条件,当conversation的属性中对应的字段对应的值以此字符串起始即可返回
|
AVIMConversationsQuery |
whereWithinGeoBox(String key,
cn.leancloud.types.AVGeoPoint southwest,
cn.leancloud.types.AVGeoPoint northeast)
增加一个基于地理位置的查询,当conversation的属性中有对应字段对应的地址位置在指定的矩形区域内时即可返回
|
AVIMConversationsQuery |
whereWithinKilometers(String key,
cn.leancloud.types.AVGeoPoint point,
double maxDistance)
增加一个基于地理位置的近似查询,当conversation的属性中有对应的地址位置与指定的地理位置间距不超过指定距离时返回
地球半径为6371.0 千米
|
AVIMConversationsQuery |
whereWithinMiles(String key,
cn.leancloud.types.AVGeoPoint point,
double maxDistance)
增加一个基于地理位置的近似查询,当conversation的属性中有对应的地址位置与指定的地理位置间距不超过指定距离时返回
|
AVIMConversationsQuery |
whereWithinRadians(String key,
cn.leancloud.types.AVGeoPoint point,
double maxDistance)
增加一个基于地理位置的近似查询,当conversation的属性中有对应的地址位置与指定的地理位置间距不超过指定距离时返回
|
AVIMConversationsQuery |
withMembers(List<String> peerIds)
增加查询条件,指定聊天室的组员条件满足条件的才返回
|
AVIMConversationsQuery |
withMembers(List<String> peerIds,
boolean includeSelf)
增加查询条件,指定聊天室的组员条件满足条件的才返回
|
protected AVIMConversationsQuery(AVIMClient client)
public AVIMConversationsQuery withMembers(List<String> peerIds)
peerIds - public AVIMConversationsQuery withMembers(List<String> peerIds, boolean includeSelf)
peerIds - includeSelf - 是否包含自己public AVIMConversationsQuery containsMembers(List<String> peerIds)
peerIds - public AVIMConversationsQuery whereEqualTo(String key, Object value)
key - value - public AVIMConversationsQuery whereLessThan(String key, Object value)
key - value - public AVIMConversationsQuery whereLessThanOrEqualsTo(String key, Object value)
key - value - public AVIMConversationsQuery whereGreaterThan(String key, Object value)
key - value - public AVIMConversationsQuery whereGreaterThanOrEqualsTo(String key, Object value)
key - value - public AVIMConversationsQuery whereNotEqualsTo(String key, Object value)
key - value - public AVIMConversationsQuery whereContainsIn(String key, Collection<?> value)
key - value - public AVIMConversationsQuery whereExists(String key)
key - The key that should exist.public AVIMConversationsQuery whereDoesNotExist(String key)
key - public AVIMConversationsQuery whereNotContainsIn(String key, Collection<?> value)
key - value - public AVIMConversationsQuery whereContainsAll(String key, Collection<?> values)
key - values - public AVIMConversationsQuery whereContains(String key, String subString)
key - subString - public AVIMConversationsQuery whereStartsWith(String key, String prefix)
key - prefix - public AVIMConversationsQuery whereEndsWith(String key, String suffix)
key - suffix - public AVIMConversationsQuery whereMatches(String key, String regex)
key - regex - public AVIMConversationsQuery whereMatches(String key, String regex, String modifiers)
key - regex - modifiers - 正则表达式的匹配模式,比如"-i"表示忽视大小写区分等public AVIMConversationsQuery whereNear(String key, cn.leancloud.types.AVGeoPoint point)
key - point - public AVIMConversationsQuery whereWithinGeoBox(String key, cn.leancloud.types.AVGeoPoint southwest, cn.leancloud.types.AVGeoPoint northeast)
key - 查询字段southwest - 矩形区域的左下角坐标northeast - 去兴趣鱼的右上角坐标public AVIMConversationsQuery whereWithinKilometers(String key, cn.leancloud.types.AVGeoPoint point, double maxDistance)
key - point - 指定的地理位置maxDistance - 距离,以千米计算public AVIMConversationsQuery whereWithinMiles(String key, cn.leancloud.types.AVGeoPoint point, double maxDistance)
key - point - 指定的地理位置maxDistance - 距离,以英里计算public AVIMConversationsQuery whereWithinRadians(String key, cn.leancloud.types.AVGeoPoint point, double maxDistance)
key - point - 指定的地理位置maxDistance - 距离,以角度计算public AVIMConversationsQuery setLimit(int limit)
limit - 上限public AVIMConversationsQuery limit(int limit)
limit - 上限public AVIMConversationsQuery setSkip(int skip)
skip - 起始位置跳过几个对象public AVIMConversationsQuery skip(int skip)
skip - 起始位置跳过几个对象public AVIMConversationsQuery orderByAscending(String key)
key - public AVIMConversationsQuery orderByDescending(String key)
key - public AVIMConversationsQuery addAscendingOrder(String key)
key - public AVIMConversationsQuery addDescendingOrder(String key)
key - public AVIMConversationsQuery whereSizeEqual(String key, int size)
key - size - public boolean isWithLastMessagesRefreshed()
public AVIMConversationsQuery setWithLastMessagesRefreshed(boolean isWithLastMessageRefreshed)
isWithLastMessageRefreshed - public void setQueryPolicy(cn.leancloud.AVQuery.CachePolicy policy)
policy - public static AVIMConversationsQuery or(List<AVIMConversationsQuery> queries)
queries - public void setCacheMaxAge(long maxAgeInSecond)
maxAgeInSecond - public long getCacheMaxAge()
public void findInBackground(AVIMConversationQueryCallback callback)
Copyright © 2018. All rights reserved.