本文整理汇总了Java中com.avos.avoscloud.AVQuery.orderByAscending方法的典型用法代码示例。如果您正苦于以下问题:Java AVQuery.orderByAscending方法的具体用法?Java AVQuery.orderByAscending怎么用?Java AVQuery.orderByAscending使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.avos.avoscloud.AVQuery
的用法示例。
在下文中一共展示了AVQuery.orderByAscending方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: findSendRequests
import com.avos.avoscloud.AVQuery; //导入方法依赖的package包/类
public void findSendRequests(FindCallback findCallback,boolean orderAsc,Map<String,Object> conditions){
AVUser user = HiTalkHelper.getInstance().getCurrentUser();
AVQuery<AddRequest> q = AVObject.getQuery(AddRequest.class);
q.whereEqualTo(AddRequest.FROM_USER, user);
if (conditions != null) {
for (Map.Entry<String,Object> entry : conditions.entrySet()){
q.whereEqualTo(entry.getKey(),entry.getValue());
}
}
if (orderAsc) {
q.orderByAscending(AVObject.CREATED_AT);
} else {
q.orderByDescending(AVObject.CREATED_AT);
}
q.setCachePolicy(AVQuery.CachePolicy.NETWORK_ELSE_CACHE);
q.findInBackground(findCallback);
}
示例2: getNoticeListPre
import com.avos.avoscloud.AVQuery; //导入方法依赖的package包/类
public void getNoticeListPre() {
AVQuery<AVObject> query = new AVQuery<AVObject>(APPCodeConst.TELEPHONE);
query.orderByAscending("ID");// 根据ID字段升序显示数据
query.setLimit(PER_PAGE); // 限制最多10个结果
query.findInBackground(new FindCallback<AVObject>() {
@Override
public void done(List<AVObject> avnoticeList, AVException e) {
// TODO Auto-generated method stub
if (e == null) {
// noticeList.clear();
Log.d("成功", "查询到" + avnoticeList.size() + " 条符合条件的数据");
try {
dataList.clear();
for (int i = 0; i < avnoticeList.size(); i++) {
AVObject avObject = avnoticeList.get(i);
TELEPHONE telephoneItem = new TELEPHONE();
telephoneItem.fromAV(avObject);
dataList.add(telephoneItem);
}
TelephoneModel.this.OnMessageResponse(APPCodeConst.TELEPHONE);
} catch (AVException ave) {
ave.printStackTrace();
} catch (Exception e2) {
e2.printStackTrace();
}
} else {
Log.d("失败", "查询错误: " + e.getMessage());
}
}
});
}
示例3: getNoticeListNext
import com.avos.avoscloud.AVQuery; //导入方法依赖的package包/类
public void getNoticeListNext() {
AVQuery<AVObject> query = new AVQuery<AVObject>(APPCodeConst.TELEPHONE);
query.orderByAscending("ID");// 根据ID字段升序显示数据
query.setLimit(PER_PAGE); // 限制最多10个结果
query.setSkip(dataList.size());
query.findInBackground(new FindCallback<AVObject>() {
@Override
public void done(List<AVObject> avnoticeList, AVException e) {
// TODO Auto-generated method stub
if (e == null) {
// noticeList.clear();
Log.d("成功", "查询到" + avnoticeList.size() + " 条符合条件的数据");
try {
for (int i = 0; i < avnoticeList.size(); i++) {
AVObject avObject = avnoticeList.get(i);
TELEPHONE telephoneItem = new TELEPHONE();
telephoneItem.fromAV(avObject);
dataList.add(telephoneItem);
}
TelephoneModel.this.OnMessageResponse(APPCodeConst.TELEPHONE);
} catch (AVException ave) {
ave.printStackTrace();
} catch (Exception e2) {
e2.printStackTrace();
}
} else {
Log.d("失败", "查询错误: " + e.getMessage());
}
}
});
}
示例4: getNoticeListPre
import com.avos.avoscloud.AVQuery; //导入方法依赖的package包/类
public void getNoticeListPre() {
AVQuery<AVObject> query = new AVQuery<AVObject>(APPCodeConst.NOTICE);
query.orderByAscending("ID");// 根据ID字段升序显示数据
query.setLimit(PER_PAGE); // 限制最多10个结果
query.findInBackground(new FindCallback<AVObject>() {
@Override
public void done(List<AVObject> avnoticeList, AVException e) {
// TODO Auto-generated method stub
if (e == null) {
// noticeList.clear();
Log.d("成功", "查询到" + avnoticeList.size() + " 条符合条件的数据");
try {
dataList.clear();
for (int i = 0; i < avnoticeList.size(); i++) {
AVObject avObject = avnoticeList.get(i);
NOTICE noticeItem = new NOTICE();
noticeItem.fromAV(avObject);
dataList.add(noticeItem);
}
NoticeModel.this.OnMessageResponse(APPCodeConst.NOTICE);
} catch (AVException ave) {
ave.printStackTrace();
} catch (Exception e2) {
e2.printStackTrace();
}
} else {
Log.d("失败", "查询错误: " + e.getMessage());
}
}
});
}
示例5: getNoticeListNext
import com.avos.avoscloud.AVQuery; //导入方法依赖的package包/类
public void getNoticeListNext() {
AVQuery<AVObject> query = new AVQuery<AVObject>(APPCodeConst.NOTICE);
query.orderByAscending("ID");// 根据ID字段升序显示数据
query.setLimit(PER_PAGE); // 限制最多10个结果
query.setSkip(dataList.size());
query.findInBackground(new FindCallback<AVObject>() {
@Override
public void done(List<AVObject> avnoticeList, AVException e) {
// TODO Auto-generated method stub
if (e == null) {
// noticeList.clear();
Log.d("成功", "查询到" + avnoticeList.size() + " 条符合条件的数据");
try {
for (int i = 0; i < avnoticeList.size(); i++) {
AVObject avObject = avnoticeList.get(i);
NOTICE noticeItem = new NOTICE();
noticeItem.fromAV(avObject);
dataList.add(noticeItem);
}
NoticeModel.this.OnMessageResponse(APPCodeConst.NOTICE);
} catch (AVException ave) {
ave.printStackTrace();
} catch (Exception e2) {
e2.printStackTrace();
}
} else {
Log.d("失败", "查询错误: " + e.getMessage());
}
}
});
}
示例6: getNoticeListPre
import com.avos.avoscloud.AVQuery; //导入方法依赖的package包/类
public void getNoticeListPre() {
AVQuery<AVObject> query = new AVQuery<AVObject>("pyp_NOTICE");
query.orderByAscending("ID");// 根据ID字段升序显示数据
query.setLimit(PER_PAGE); // 限制最多10个结果
query.findInBackground(new FindCallback<AVObject>() {
@Override
public void done(List<AVObject> avnoticeList, AVException e) {
// TODO Auto-generated method stub
if (e == null) {
// noticeList.clear();
Log.d("成功", "查询到" + avnoticeList.size() + " 条符合条件的数据");
try {
dataList.clear();
for (int i = 0; i < avnoticeList.size(); i++) {
AVObject avObject = avnoticeList.get(i);
NOTICE noticeItem = new NOTICE();
noticeItem.fromAV(avObject);
dataList.add(noticeItem);
}
NoticeModel.this.OnMessageResponse("NOTICE");
} catch (AVException ave) {
ave.printStackTrace();
} catch (Exception e2) {
e2.printStackTrace();
}
} else {
Log.d("失败", "查询错误: " + e.getMessage());
}
}
});
}
示例7: getNoticeListNext
import com.avos.avoscloud.AVQuery; //导入方法依赖的package包/类
public void getNoticeListNext() {
AVQuery<AVObject> query = new AVQuery<AVObject>("pyp_NOTICE");
query.orderByAscending("ID");// 根据ID字段升序显示数据
query.setLimit(PER_PAGE); // 限制最多10个结果
query.setSkip(dataList.size());
query.findInBackground(new FindCallback<AVObject>() {
@Override
public void done(List<AVObject> avnoticeList, AVException e) {
// TODO Auto-generated method stub
if (e == null) {
// noticeList.clear();
Log.d("成功", "查询到" + avnoticeList.size() + " 条符合条件的数据");
try {
for (int i = 0; i < avnoticeList.size(); i++) {
AVObject avObject = avnoticeList.get(i);
NOTICE noticeItem = new NOTICE();
noticeItem.fromAV(avObject);
dataList.add(noticeItem);
}
NoticeModel.this.OnMessageResponse("NOTICE");
} catch (AVException ave) {
ave.printStackTrace();
} catch (Exception e2) {
e2.printStackTrace();
}
} else {
Log.d("失败", "查询错误: " + e.getMessage());
}
}
});
}
示例8: getNoticeListPre
import com.avos.avoscloud.AVQuery; //导入方法依赖的package包/类
public void getNoticeListPre() {
AVQuery<AVObject> query = new AVQuery<AVObject>("pyp_NOTICE");
query.orderByAscending("ID");// 根据ID字段升序显示数据
query.setLimit(PER_PAGE); // 限制最多10个结果
query.findInBackground(new FindCallback<AVObject>() {
@Override
public void done(List<AVObject> avnoticeList, AVException e) {
// TODO Auto-generated method stub
if (e == null) {
// noticeList.clear();
Log.d("成功", "查询到" + avnoticeList.size() + " 条符合条件的数据");
try {
for (int i = 0; i < avnoticeList.size(); i++) {
AVObject avObject = avnoticeList.get(i);
NOTICE noticeItem = new NOTICE();
noticeItem.fromAV(avObject);
dataList.add(noticeItem);
}
total += PER_PAGE;
NoticeModel.this.OnMessageResponse("NOTICE");
} catch (AVException ave) {
ave.printStackTrace();
} catch (Exception e2) {
e2.printStackTrace();
}
} else {
Log.d("失败", "查询错误: " + e.getMessage());
}
}
});
}
示例9: getUserFolders
import com.avos.avoscloud.AVQuery; //导入方法依赖的package包/类
public static List<AVObject> getUserFolders(String user) throws AVException {
AVQuery<AVObject> query = new AVQuery<>("Folder");
query.whereEqualTo("user_tel", user);
query.orderByAscending("createdAt");
return query.find();
}
示例10: getNoticeListNext
import com.avos.avoscloud.AVQuery; //导入方法依赖的package包/类
public void getNoticeListNext() {
AVQuery<AVObject> query = new AVQuery<AVObject>("pyp_NOTICE");
query.orderByAscending("ID");// 根据ID字段升序显示数据
query.setLimit(PER_PAGE); // 限制最多10个结果
query.setSkip(total);
query.findInBackground(new FindCallback<AVObject>() {
@Override
public void done(List<AVObject> avnoticeList, AVException e) {
// TODO Auto-generated method stub
if (e == null) {
// noticeList.clear();
Log.d("成功", "查询到" + avnoticeList.size() + " 条符合条件的数据");
try {
for (int i = 0; i < avnoticeList.size(); i++) {
AVObject avObject = avnoticeList.get(i);
NOTICE noticeItem = new NOTICE();
noticeItem.fromAV(avObject);
dataList.add(noticeItem);
}
total += PER_PAGE;
NoticeModel.this.OnMessageResponse("NOTICE");
} catch (AVException ave) {
ave.printStackTrace();
} catch (Exception e2) {
e2.printStackTrace();
}
} else {
Log.d("失败", "查询错误: " + e.getMessage());
}
}
});
}