当前位置: 首页>>代码示例>>Java>>正文


Java BmobQuery.order方法代码示例

本文整理汇总了Java中cn.bmob.v3.BmobQuery.order方法的典型用法代码示例。如果您正苦于以下问题:Java BmobQuery.order方法的具体用法?Java BmobQuery.order怎么用?Java BmobQuery.order使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在cn.bmob.v3.BmobQuery的用法示例。


在下文中一共展示了BmobQuery.order方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: findWeibos

import cn.bmob.v3.BmobQuery; //导入方法依赖的package包/类
private void findWeibos()
  {
//MyUser user = BmobUser.getCurrentUser(LoginF.this, MyUser.class);
BmobQuery<Login> query = new BmobQuery<Login>();
//query.addWhereEqualTo("author", user);	// 查询当前用户的所有微博
query.order("-updatedAt");
query.include("author");// 希望在查询微博信息的同时也把发布人的信息查询出来,可以使用include方法
query.findObjects(LoginF.this, new FindListener<Login>() {
		@Override
		public void onSuccess(List<Login> object)
		{
			// TODO Auto-generated method stub
			weibos = object;
			adapter.notifyDataSetChanged();
			//  mProgressDialog.dismiss();
		}

		@Override
		public void onError(int code, String msg)
		{
			// TODO Auto-generated method stub
			//   toast("查询失败:" + msg);
		}
	});
//mProgressDialog = ProgressDialog.show(getActivity(), null, getResources().getString(R.string.del_));
  }
 
开发者ID:stytooldex,项目名称:stynico,代码行数:27,代码来源:LoginF.java

示例2: findWeibos_

import cn.bmob.v3.BmobQuery; //导入方法依赖的package包/类
private void findWeibos_()
{
	nico.styTool.MyUser user = BmobUser.getCurrentUser(this, nico.styTool.MyUser.class);
	BmobQuery<Post_> query = new BmobQuery<Post_>();
	query.addWhereEqualTo("author", user);	// 查询当前用户的所有微博
	query.order("-updatedAt");
	query.include("author");// 希望在查询微博信息的同时也把发布人的信息查询出来,可以使用include方法
	query.findObjects(this, new FindListener<Post_>() {
			@Override
			public void onSuccess(List<Post_> object)
			{
				// TODO Auto-generated method stub
				weibos = object;
				adapter.notifyDataSetChanged();
				//et_content.setText("");
			}

			@Override
			public void onError(int code, String msg)
			{
				// TODO Auto-generated method stub
				//toast("查询失败:"+msg);
			}
		});
}
 
开发者ID:stytooldex,项目名称:stynico,代码行数:26,代码来源:WeiboListActivity.java

示例3: queryBlackList

import cn.bmob.v3.BmobQuery; //导入方法依赖的package包/类
/**
 * 查询黑名单用户
 *
 * @param callback 回调
 */
private void queryBlackList(final FindListener<User> callback) {
        BmobQuery<User> query = new BmobQuery<>();
        query.order("updateAt");
        query.addWhereRelatedTo(COLUMN_NAME_BLACKLIST, new BmobPointer(getCurrentUser()));
        query.findObjects(CustomApplication.getInstance(), new FindListener<User>() {
                        @Override
                        public void onSuccess(List<User> list) {
                                callback.onSuccess(list);
                        }

                        @Override
                        public void onError(int i, String s) {
                                callback.onError(i, s);
                        }
                }
        );
}
 
开发者ID:HelloChenJinJun,项目名称:TestChat,代码行数:23,代码来源:UserManager.java

示例4: findNew

import cn.bmob.v3.BmobQuery; //导入方法依赖的package包/类
private void findNew() {
    mDialog.show();
    BmobQuery<VersionInfo> query = new BmobQuery<>("VersionInfo");
    query.order("-updatedAt");
    query.setLimit(1);//最新1条
    query.findObjects(new FindListener<VersionInfo>() {
        @Override
        public void done(List<VersionInfo> list, BmobException e) {
            if (e == null && !list.isEmpty()) {
                dismissDialog();
                chackVersion(list.get(0));
            } else {
                ToastUtils.show(SettingsActivity.this, "检查新版本失败");
                Logger.d(e);
            }
            dismissDialog();
        }
    });
}
 
开发者ID:yiwent,项目名称:Mobike,代码行数:20,代码来源:SettingsActivity.java

示例5: queryPersonActivity

import cn.bmob.v3.BmobQuery; //导入方法依赖的package包/类
/**
 * 查询我参与的活动
 */
private void queryPersonActivity() {
    BmobQuery<MActivity> query = new BmobQuery<>();
    query.addWhereEqualTo("currentUser",currentUser);
    query.include("currentUser");
    query.order("-createdAt");

    query.findObjects(new FindListener<MActivity>() {
        @Override
        public void done(List<MActivity> list, BmobException e) {
            if (e == null) {
                if (list.size() > 0) {
                    activities.clear();
                    activities.addAll(list);
                    activityAdapter.notifyDataSetChanged();
                } else {
                    showToast("服务器没有数据");
                }
                swipeRefreshLayout.setRefreshing(false);
            } else {
                showToast("请求服务器失败,请稍后重试" + e.getMessage() + e.getErrorCode());
                swipeRefreshLayout.setRefreshing(false);
            }
        }
    });
}
 
开发者ID:HowieTianDev,项目名称:ChenYan,代码行数:29,代码来源:PersonActivityFragment.java

示例6: queryRankList

import cn.bmob.v3.BmobQuery; //导入方法依赖的package包/类
private void queryRankList() {
    BmobQuery<Rank> rankQuery = new BmobQuery<>();
    rankQuery.include("no1,no2,no3,no4,no5,no6,no7,no8,no9,no10");
    rankQuery.order("order");
    rankQuery.findObjects(new FindListener<Rank>() {
        @Override
        public void done(List<Rank> list, BmobException e) {
            if (e == null) {
                if (rankList != null) {
                    rankList.clear();
                }
                rankList.addAll(list);
                adapter.notifyDataSetChanged();
                showToast("查询成功!");
                swipeRefreshLayout.setRefreshing(false);
            } else {
                showToast("查询失败!" + e.getErrorCode() + e.getMessage());
                swipeRefreshLayout.setRefreshing(false);
            }
        }
    });
}
 
开发者ID:HowieTianDev,项目名称:ChenYan,代码行数:23,代码来源:RankFragment.java

示例7: getPostComment

import cn.bmob.v3.BmobQuery; //导入方法依赖的package包/类
/**
 * 获取文章的评论
 */
public void getPostComment(String postId, final RequestListener<List<Comment>> listener) {
    if (!checkNet(listener)) return;
    BmobQuery<Comment> query = new BmobQuery<>();
    Post post = new Post();
    post.setObjectId(postId);
    query.addWhereEqualTo("post", new BmobPointer(post));
    query.include("user");
    query.order("-createdAt");
    query.findObjects(new FindListener<Comment>() {
        @Override
        public void done(List<Comment> list, BmobException e) {
            if (e == null) {
                listener.success(list);
            }
        }
    });
}
 
开发者ID:weimin96,项目名称:shareNote,代码行数:21,代码来源:NetRequest.java

示例8: pullReleasePost

import cn.bmob.v3.BmobQuery; //导入方法依赖的package包/类
/**
 * 获取该用户发布的帖子
 *
 * @param currentIndex
 * @param size
 * @param listener
 */
public void pullReleasePost(String userId, int currentIndex, int size, final RequestListener<List<Post>> listener) {
    if (!checkNet(listener)) return;
    BmobQuery<Post> query = new BmobQuery<>();

    query.addWhereEqualTo("author", userId);    // 查询当前用户的所有帖子
    query.setSkip(currentIndex);
    query.setLimit(size);
    query.order("-updatedAt");
    query.include("author");// 希望在查询帖子信息的同时也把发布人的信息查询出来
    query.findObjects(new FindListener<Post>() {
        @Override
        public void done(List<Post> list, BmobException e) {
            if (e == null) {
                listener.success(list);
            } else {
                listener.error(ErrMsgFactory.errMSG(e.getErrorCode()));
            }
        }

    });
}
 
开发者ID:weimin96,项目名称:shareNote,代码行数:29,代码来源:NetRequest.java

示例9: pullCollectPost

import cn.bmob.v3.BmobQuery; //导入方法依赖的package包/类
/**
 * 获取收藏/喜欢的帖子
 *
 * @param currentIndex
 * @param size
 * @param listener
 */
public void pullCollectPost(String userId, int currentIndex, int size, final RequestListener<List<Post>> listener) {
    if (!checkNet(listener)) return;
    BmobQuery<Post> query = new BmobQuery<>();
    BmobQuery<User> innerQuery = new BmobQuery<>();
    innerQuery.addWhereEqualTo("objectId", userId);
    query.addWhereMatchesQuery("likes", "_User", innerQuery);
    query.setSkip(currentIndex);
    query.setLimit(size);
    query.order("-createdAt");
    query.include("author");
    query.findObjects(new FindListener<Post>() {
        @Override
        public void done(List<Post> list, BmobException e) {
            if (e == null) {
                listener.success(list);
            } else {
                listener.error(ErrMsgFactory.errMSG(e.getErrorCode()));
            }
        }
    });
}
 
开发者ID:weimin96,项目名称:shareNote,代码行数:29,代码来源:NetRequest.java

示例10: pullPostList

import cn.bmob.v3.BmobQuery; //导入方法依赖的package包/类
/**
 * 获取帖子数据集合
 *
 * @param size 获取的数据条数
 * @return
 */
public void pullPostList(int currentIndex, int size, final RequestListener<List<Post>> listener) {
    if (!checkNet(listener)) return;
    BmobQuery<Post> query = new BmobQuery<>();
    query.setSkip(currentIndex);
    query.setLimit(size);
    query.order("-createdAt");
    query.include("author");
    query.findObjects(new FindListener<Post>() {
        @Override
        public void done(List<Post> list, BmobException e) {
            if (e == null) {
                listener.success(list);
            } else {
                listener.error(ErrMsgFactory.errMSG(e.getErrorCode()));
            }
        }
    });
}
 
开发者ID:weimin96,项目名称:shareNote,代码行数:25,代码来源:NetRequest.java

示例11: requestData

import cn.bmob.v3.BmobQuery; //导入方法依赖的package包/类
private void requestData() {
    BmobQuery<RechargeHistoryData> query = new BmobQuery<>("RechargeHistoryData");
    query.order("-updatedAt");
    query.addWhereEqualTo("mMyUser", MyApplication.getInstance().getUser().getObjectId());
    //query.setLimit(4);//最新四条活动信息
    if (isFirstin) {
        mDialog.show();
        isFirstin = false;
    }
    query.findObjects(new FindListener<RechargeHistoryData>() {
        @Override
        public void done(List<RechargeHistoryData> list, BmobException e) {
            if (e == null) {
                mDatas = list;
                showHistory();
            } else {
                ToastUtils.show(RechargeHistoryActivity.this, "暂时没有消息");
                Logger.d(e);
            }
            dismissMyDialog();
        }
    });

}
 
开发者ID:yiwent,项目名称:Mobike,代码行数:25,代码来源:RechargeHistoryActivity.java

示例12: pullReleasePost

import cn.bmob.v3.BmobQuery; //导入方法依赖的package包/类
/**
 * 获取该用户发布的帖子
 * @param currentIndex
 * @param size
 * @param listener
 */
public void pullReleasePost(int currentIndex, int size, final RequestListener<List<Post>> listener) {
    if (!checkNet(listener)) return;
    BmobQuery<Post> query = new BmobQuery<>();
    query.addWhereEqualTo("author", BmobUser.getCurrentUser());    // 查询当前用户的所有帖子
    query.setSkip(currentIndex);
    query.setLimit(size);
    query.order("-updatedAt");
    query.include("author");// 希望在查询帖子信息的同时也把发布人的信息查询出来
    query.findObjects(new FindListener<Post>() {

        @Override
        public void done(List<Post> list,BmobException e) {
            if (e == null) {
                listener.success(list);
            } else {
                listener.error(ErrMsgFactory.errMSG(e.getErrorCode()));
            }
        }

    });
}
 
开发者ID:xujiaji,项目名称:HaiNaBaiChuan,代码行数:28,代码来源:NetRequest.java

示例13: queryOrderFormBmob

import cn.bmob.v3.BmobQuery; //导入方法依赖的package包/类
public void queryOrderFormBmob(String objectId, int status) {
  userObjectId = objectId;
  this.status = status;

  BmobQuery<Order> bmobQuery = new BmobQuery<>();
  bmobQuery.addWhereEqualTo("userObjectId", objectId);
  if (status != Order.NONE) {
    bmobQuery.addWhereEqualTo("status", status);
  }
  bmobQuery.order("-createdAt");
  bmobQuery.setLimit(countLimit);
  bmobQuery.findObjects(new FindListener<Order>() {
    @Override public void done(List<Order> list, BmobException e) {
      if (e != null) {
        activity.showMessage("您还没有买过东西!");
        return;
      }
      activity.initCloudOrder(list);
    }
  });
}
 
开发者ID:bitkylin,项目名称:BitkyShop,代码行数:22,代码来源:OrderManagerPresenter.java

示例14: getFriendRunData

import cn.bmob.v3.BmobQuery; //导入方法依赖的package包/类
private void getFriendRunData(){
	
	BmobQuery<UserSoicalInfo> query = new BmobQuery<UserSoicalInfo>();
	query.addWhereEqualTo("runner", mCurrentRunner);
	query.order("-updateAt");
	query.include("runner");
	query.findObjects(new FindListener<UserSoicalInfo>() {

		@Override
		public void done(List<UserSoicalInfo> soicalList, BmobException e) {
			// TODO Auto-generated method stub
			if(e==null){
				if(soicalList.size()>0){
					Log.i(MainActivity.TAG, "find soicalinfo ok");
					Toast.makeText(getActivity(), "find runner's soicalinfo ok", Toast.LENGTH_SHORT).show();
					UserSoicalInfo userSoicalInfo = soicalList.get(0);
					//查询多对多关系 找此runner的好友
					getSomeOneUserRunData(userSoicalInfo);
				}
			}
		}
	});
}
 
开发者ID:huazifoothole,项目名称:NikiRun,代码行数:24,代码来源:Friends_RangeList.java

示例15: queryNearby

import cn.bmob.v3.BmobQuery; //导入方法依赖的package包/类
private void queryNearby() {
        showEmptyView(false);
        mSwipeRefreshLayout.setRefreshing(true);
        BmobQuery<Nearby> query = new BmobQuery<>();
        query.order("-createAt");/*按照时间降序*/
        query.findObjects(new FindListener<Nearby>() {
            @Override
            public void done(List<Nearby> list, BmobException e) {
                if (null == e) {
                    mNearbyAdapter.clear();
                    if (null == list || list.size() == 0) {
                        showEmptyView(true);
                        mNearbyAdapter.notifyDataSetChanged();
                        return;
                    }
                    Log.d(TAG, "queryNearby: is called");
                    mNearbyAdapter.addAll(list, mNearbyNameTextView.getText().toString());
//                    mNearbyAdapter.addAll(list);
                    mNearbyRecyclerView.setAdapter(mNearbyAdapter);
                    mSwipeRefreshLayout.setRefreshing(false);
                } else {
                    showEmptyView(true);
                }
            }
        });
    }
 
开发者ID:InnoFang,项目名称:ChangTu,代码行数:27,代码来源:NearbyActivity.java


注:本文中的cn.bmob.v3.BmobQuery.order方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。