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


Java BmobQuery.addWhereEqualTo方法代码示例

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


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

示例1: refreshData

import cn.bmob.v3.BmobQuery; //导入方法依赖的package包/类
public void refreshData() {
	BmobQuery<ChannelSigner> channelQuery = new BmobQuery<ChannelSigner>();
	channelQuery.addWhereEqualTo(ChannelSigner.CHANNEL_KEY, mChannel.getObjectId());
	channelQuery.addWhereGreaterThanOrEqualTo(ChannelSigner.SIGN_DATE_KEY, mChannel.getStartSignDate());
	channelQuery.include(String.format("%1$s,%2$s", 
			ChannelSigner.SIGNER_KEY,
			ChannelSigner.CHANNEL_KEY));
	channelQuery.setLimit(Constants.QUERY_MAX_NUMBER);
	channelQuery.order(ChannelSigner.SIGNER_KEY);
	channelQuery.findObjects(mContext, new FindListener<ChannelSigner>() {
		@Override
		public void onSuccess(List<ChannelSigner> channelSigners) {
			mChannelSignerAdapter.clear();
			mChannelSignerAdapter.addAll(channelSigners);
			mPullToRefreshLayout.refreshFinish(PullToRefreshLayout.SUCCEED);
		}
		
		@Override
		public void onError(int arg0, String msg) {
			mPullToRefreshLayout.refreshFinish(PullToRefreshLayout.FAIL);
		}
	});
}
 
开发者ID:vell001,项目名称:VSigner,代码行数:24,代码来源:ShowSignerActivity.java

示例2: findComments

import cn.bmob.v3.BmobQuery; //导入方法依赖的package包/类
private void findComments()
{
	BmobQuery<Comment_> query = new BmobQuery<Comment_>();
	// pointer类型
	query.addWhereEqualTo("post", new BmobPointer(weibo));		
	query.include("user,post.author");
	query.findObjects(getActivity(), new FindListener<Comment_>() {

			@Override
			public void onSuccess(List<Comment_> object)
			{
				// TODO Auto-generated method stub
				comments = object;
				adapter.notifyDataSetChanged();
				et_content.setText("");
			}

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

示例3: requestFans

import cn.bmob.v3.BmobQuery; //导入方法依赖的package包/类
/**
     * 请求获取用户粉丝
     */
    public void requestFans(User user, final RequestListener<List<User>> listener) {
        if (!checkNet(listener)) return;
        BmobQuery<User> query = new BmobQuery<User>();
        BmobQuery<User> innerQuery = new BmobQuery<>();
        innerQuery.addWhereEqualTo("objectId", user.getObjectId());
//        query.addQueryKeys("followPerson");
        query.addWhereMatchesQuery("followPerson", "_User", innerQuery);
        query.findObjects(new FindListener<User>() {
            @Override
            public void done(List<User> list, BmobException e) {
                if (e == null) {
                    listener.success(list);
                } else {
                    listener.error(ErrMsgFactory.errMSG(e.getErrorCode()));
                }
            }
        });
    }
 
开发者ID:weimin96,项目名称:shareNote,代码行数:22,代码来源:NetRequest.java

示例4: 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

示例5: queryFanNum

import cn.bmob.v3.BmobQuery; //导入方法依赖的package包/类
/**
 * 查询粉丝数目
 */

private void queryFanNum(User user) {
    BmobQuery<User> query = new BmobQuery<>();
    query.include("focus");
    BmobQuery<BmobUser> innerQuery = new BmobQuery<>();
    innerQuery.addWhereEqualTo("objectId", user.getObjectId());
    query.addWhereMatchesQuery("focus", "_User", innerQuery);
    query.count(User.class, new CountListener() {
        @Override
        public void done(Integer integer, BmobException e) {
            if (e == null) {
                tvFan.setText(integer.toString());
            } else {
                showToast("查询粉丝数目失败" + e.getErrorCode() + e.getMessage());
            }
        }
    });
}
 
开发者ID:HowieTianDev,项目名称:ChenYan,代码行数:22,代码来源:MeFragment.java

示例6: 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

示例7: queryFanNum

import cn.bmob.v3.BmobQuery; //导入方法依赖的package包/类
/**
 * 查询粉丝数目
 */

private void queryFanNum() {
    BmobQuery<User> query = new BmobQuery<>();
    query.include("focus");
    BmobQuery<BmobUser> innerQuery = new BmobQuery<>();
    innerQuery.addWhereEqualTo("objectId", dynamicAuthor.getObjectId());
    query.addWhereMatchesQuery("focus", "_User", innerQuery);
    query.count(User.class, new CountListener() {
        @Override
        public void done(Integer integer, BmobException e) {
            if (e == null) {
                tvFan.setText(integer.toString());
            } else {
                showToast("查询粉丝数目失败" + e.getErrorCode() + e.getMessage());
            }
        }
    });
}
 
开发者ID:HowieTianDev,项目名称:ChenYan,代码行数:22,代码来源:PersonPageActivity.java

示例8: requestCollectNum

import cn.bmob.v3.BmobQuery; //导入方法依赖的package包/类
/**
     * 请求获取用户喜欢的文章数量
     */
    public void requestCollectNum(User user, final RequestListener<String> listener) {
        BmobQuery<Post> query = new BmobQuery<>();
        BmobQuery<User> innerQuery = new BmobQuery<>();
        innerQuery.addWhereEqualTo("objectId", user.getObjectId());
//        query.addQueryKeys("followPerson");
        query.addWhereMatchesQuery("likes", "_User", innerQuery);
        query.count(Post.class, new CountListener() {
            @Override
            public void done(Integer integer, BmobException e) {
                if (e == null) {
                    listener.success(Integer.toString(integer));
                } else {
                    listener.success("0");
                }
            }
        });
    }
 
开发者ID:weimin96,项目名称:shareNote,代码行数:21,代码来源:NetRequest.java

示例9: Check4CloudContacts

import cn.bmob.v3.BmobQuery; //导入方法依赖的package包/类
/**
 * 检查联系人列表中有那些人是云端联系人,如果是则获取云联系人的显示名
 * 因为contactInfo 是可变类型,所以这里没有返回值
 * <p>
 * <p>
 * <p>
 * 我们推荐您使用真实的头像,那样您的联系人就能更快的确定您的身份
 *
 * @param contacts
 */
public static void Check4CloudContacts(List<ContactInfo> contacts, Context context) {
    BmobQuery<BmobBaseUser> query;
    for (final ContactInfo contact : contacts) {
        query = new BmobQuery<>();
        query.addWhereEqualTo("phone_number", contact.getNumber()); // 根据当前联系人列表查询网络端的云联系人
        query.findObjects(context, new FindListener<BmobBaseUser>() {
            @Override
            public void onSuccess(List<BmobBaseUser> list) {
                if (list.size() > 0) { // 云端由此联系人
                    BmobBaseUser cloudContacts = list.get(0);
                    contact.setOnCloud(true);
                    contact.setDisplayName(cloudContacts.getNickName());
                    // TODO: 2016/5/11 获取云端联系人头像

                    cloudContacts.getProfileUrl();
                }
            }

            @Override
            public void onError(int i, String s) {

            }
        });
    }
}
 
开发者ID:roselism,项目名称:CallPP,代码行数:36,代码来源:ContactUtil.java

示例10: showCommentMessage

import cn.bmob.v3.BmobQuery; //导入方法依赖的package包/类
private void showCommentMessage(final PushMessage msg) {
    BmobQuery<Comment> query=new BmobQuery<Comment>();
    query.addWhereEqualTo("objectId", msg.alert);
    query.findObjects(context, new FindListener<Comment>() {
        @Override
        public void onSuccess(List<Comment> list) {
            if(list.size()>0){
                Comment comment=list.get(0);
                Log.d("BB",comment.getContent());
                if(application.isCommentAllowed)
                {
                    showNotification(context, comment,msg.tag);
                }
            }

        }

        @Override
        public void onError(int i, String s) {

        }
    });
}
 
开发者ID:JoeSteven,项目名称:BiBi,代码行数:24,代码来源:MyPushReceiver.java

示例11: searchCommodity

import cn.bmob.v3.BmobQuery; //导入方法依赖的package包/类
private void searchCommodity() {
  ((InputMethodManager) context.getSystemService(
      Context.INPUT_METHOD_SERVICE)).hideSoftInputFromWindow(searchEdittext.getWindowToken(),
      InputMethodManager.HIDE_NOT_ALWAYS);
  String msg = searchEdittext.getText().toString().trim();
  if (msg.equals("")) {
    toastUtil.show("请输入要搜索的商品");
    return;
  }
  BmobQuery<Commodity> bmobQuery = new BmobQuery<>();
  bmobQuery.addWhereEqualTo("categorySub", msg);
  KLog.d(msg);
  bmobQuery.findObjects(new FindListener<Commodity>() {
    @Override public void done(List<Commodity> list, BmobException e) {
      if (e != null) {
        KLog.d(e.getMessage());
      }
      if (list != null) {
        KLog.d(list.size());
      }
    }
  });
}
 
开发者ID:bitkylin,项目名称:BitkyShop,代码行数:24,代码来源:SearchActivity.java

示例12: pushComment

import cn.bmob.v3.BmobQuery; //导入方法依赖的package包/类
private void pushComment() {
    BmobQuery<BBUser> idQuery=new BmobQuery<BBUser>();
    idQuery.addWhereEqualTo("username", mUserName);
    idQuery.findObjects(this, new FindListener<BBUser>() {
        @Override
        public void onSuccess(List<BBUser> list) {
            if (list.size() > 0) {
                setReceiverId(list.get(0).getInstallId());
            }
        }

        @Override
        public void onError(int i, String s) {

        }
    });

}
 
开发者ID:JoeSteven,项目名称:BiBi,代码行数:19,代码来源:CommentActivity.java

示例13: searchUser

import cn.bmob.v3.BmobQuery; //导入方法依赖的package包/类
public static void searchUser(Context context, String key, String value) {
    BmobQuery<BmobUser> query = new BmobQuery<BmobUser>();
    query.addWhereEqualTo(key, value);
    query.findObjects(context, new FindListener<BmobUser>() {
        @Override
        public void onSuccess(List<BmobUser> list) {
            if (list.isEmpty()) {
                mState.getState(MODE_SEARCH_USER, false);
            } else {
                mState.getState(MODE_SEARCH_USER, true);
            }
        }

        @Override
        public void onError(int i, String s) {

        }
    });
}
 
开发者ID:bluedai180,项目名称:XiangZiShen,代码行数:20,代码来源:AccountManager.java

示例14: getWelcomePic

import cn.bmob.v3.BmobQuery; //导入方法依赖的package包/类
public void getWelcomePic(final WelcomeActivity context) {
    BmobQuery<Wel> bmobQuery = new BmobQuery<>();
    bmobQuery.addWhereEqualTo("imgDate", OtherUtils.currDay());
    bmobQuery.findObjects(new FindListener<Wel>() {
        @Override
        public void done(List<Wel> list, BmobException e) {
            if (list == null) {
                return;
            }
            LogUtil.e3("list.size() = " + list.size());
            for (int i = 0; i < list.size(); i++) {
                LogUtil.e3(list.get(i).toString());
                break;
            }
        }
    });
}
 
开发者ID:xujiaji,项目名称:HaiNaBaiChuan,代码行数:18,代码来源:NetRequest.java

示例15: 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


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