我已经创建了关于朋友请求的自定义对象类,现在我想通过提供两个字段值来检索单行值,例如选择朋友请求状态,其中userid =“xxxxxxx”AND recieverID =“aaaaaaa”。我应该以哪种方式实现这个???
答案 0 :(得分:0)
试试这个:
QBRequestGetBuilder requestBuilder = new QBRequestGetBuilder();
requestBuilder.eq("userid", "xxxxxxx");
requestBuilder.eq("recieverID", "aaaaaaa");
QBCustomObjects.getObjects(YOUR_CLASS_NAME, requestBuilder, new QBEntityCallbackImpl<ArrayList<QBCustomObject>>() {
@Override
public void onSuccess(ArrayList<QBCustomObject> customObjects, Bundle params) {
Log.i(TAG, ">>> custom objects: " + customObjects);
}
@Override
public void onError(List<String> errors) {
handleErrors(errors);
}
});