本文整理汇总了Java中com.parse.ParseQuery.getInBackground方法的典型用法代码示例。如果您正苦于以下问题:Java ParseQuery.getInBackground方法的具体用法?Java ParseQuery.getInBackground怎么用?Java ParseQuery.getInBackground使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.parse.ParseQuery
的用法示例。
在下文中一共展示了ParseQuery.getInBackground方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getEventData
import com.parse.ParseQuery; //导入方法依赖的package包/类
public void getEventData(final ICardCallback<ILobbyEventCard> callback) {
ParseQuery<LobbyEventCard> query = ParseQuery.getQuery(LobbyEventCard.class);
query.getInBackground(Constans.PARSE_EVENT_OBJECT_ID, new GetCallback<LobbyEventCard>() {
@Override
public void done(LobbyEventCard object, ParseException e) {
if (e == null) {
callback.onSuccess(false, object);
} else {
callback.onError(e);
}
}
});
}
示例2: fetch
import com.parse.ParseQuery; //导入方法依赖的package包/类
public void fetch(Context context, final ModelUpdater<RestaurantModel> modelUpdater) {
ParseQuery<RestaurantModel> restaurantQuery = ParseQuery.getQuery(RestaurantModel.class);
restaurantQuery.fromLocalDatastore();
Log.v("Parse info:", "Started restaurant query");
restaurantQuery.getInBackground(restaurantId, new GetCallback<RestaurantModel>() {
public void done(RestaurantModel res, ParseException e) {
Log.v("Parse info:", "Restaurant query returned");
List<RestaurantModel> result = new ArrayList<RestaurantModel>();
result.add(res);
modelUpdater.onDataModelUpdate(result, e);
}
});
}
示例3: fetch
import com.parse.ParseQuery; //导入方法依赖的package包/类
public void fetch(Context context, final ModelUpdater<DealModel> modelUpdater) {
ParseQuery<DealModel> restaurantQuery = ParseQuery.getQuery(DealModel.class);
restaurantQuery.fromLocalDatastore();
Log.v("Parse info:", "Started deal query");
restaurantQuery.getInBackground(dealId, new GetCallback<DealModel>() {
public void done(DealModel res, ParseException e) {
Log.v("Parse info:", "Dealquery returned");
List<DealModel> result = new ArrayList<DealModel>();
result.add(res);
modelUpdater.onDataModelUpdate(result, e);
}
});
}
示例4: UpdateChannelsToParse
import com.parse.ParseQuery; //导入方法依赖的package包/类
public void UpdateChannelsToParse(final String HashMapStrings) {
ParseQuery<ParseUser> query = ParseUser.getQuery();
// Retrieve the object by id
query.getInBackground(getMyChannelObjectId(), new GetCallback<ParseUser>() {
public void done(ParseUser ParseChannels, ParseException e) {
if (e == null) {
MyChannels list = MyChannels.getInstance();
//we are just gonna update the string
ParseChannels.put("channels", HashMapStrings);
ParseChannels.saveInBackground();
}
}
});
}
示例5: delete
import com.parse.ParseQuery; //导入方法依赖的package包/类
public void delete(String id) {
ParseQuery<ParseObject> query = ParseQuery.getQuery("Point");
// Retrieve the object by id
query.getInBackground(id, new GetCallback<ParseObject>() {
public void done(ParseObject parseSlice, ParseException e) {
if (e == null) {
parseSlice.deleteInBackground();
Log.i("Point", "Delete: point deleted");
}
}
});
}
示例6: deleted
import com.parse.ParseQuery; //导入方法依赖的package包/类
public void deleted(Line line) {
ParseQuery<ParseObject> query = ParseQuery.getQuery(LINE);
query.getInBackground(line.getId(), new GetCallback<ParseObject>() {
@Override
public void done(ParseObject oLine, ParseException e) {
if (e == null) {
oLine.deleteInBackground();
} else {
e.printStackTrace();
}
}
});
}
示例7: getRoomById
import com.parse.ParseQuery; //导入方法依赖的package包/类
public static void getRoomById(String roomId, GetCallback<Room> callback) {
ParseQuery<Room> query = new ParseQuery<>(Constants.ROOM_TABLE);
query.getInBackground(roomId, callback);
}
示例8: getUserById
import com.parse.ParseQuery; //导入方法依赖的package包/类
public static void getUserById(String userId, GetCallback<User> callback) {
ParseQuery<User> query = new ParseQuery<>(Constants.USER_TABLE);
query.getInBackground(userId, callback);
}
示例9: getView
import com.parse.ParseQuery; //导入方法依赖的package包/类
@Override
public View getView(final int position, View convertView, ViewGroup parent){
if(convertView == null){
convertView = LayoutInflater.from(mContext).inflate(R.layout.fragment_profile_list,null);
holder = new ViewHolder();
holder.eventNameProfile= (TextView) convertView.findViewById(R.id.eventName);
holder.eventContextProfile = (TextView) convertView.findViewById(R.id.eventContext);
holder.imageEventProfile = (ImageView) convertView.findViewById(R.id.eventImage);
convertView.setTag(holder);
}
else{
holder= (ViewHolder) convertView.getTag();
}
String eventPartID = mParticipatedEvents.get(position).getObjectId();
ParseQuery qryEvent = new ParseQuery("EventData");
qryEvent.getInBackground(eventPartID, new GetCallback() {
@Override
public void done(ParseObject object, ParseException e) {
String eventName = object.getString("eventName");
holder.eventNameProfile.setText(eventName);
String eventCon = object.getString("eventContext");
holder.eventContextProfile.setText(eventCon);
Picasso.with(getContext().
getApplicationContext()).
load(object.getParseFile("eventPhoto").
getUrl()).transform(new TransformationCircular()).
into(holder.imageEventProfile);
eventid=object.getObjectId();
Toast.makeText(getContext(), eventid, Toast.LENGTH_SHORT).show();
}
public void done(Object a , Throwable r) {
}
});
return convertView;
}