當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。