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


Java ParseQuery.getInBackground方法代码示例

本文整理汇总了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);
            }
        }
    });
}
 
开发者ID:bvblogic,项目名称:Mediator_Android,代码行数:14,代码来源:NetWrapper.java

示例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);
        }
    });
}
 
开发者ID:TheBurrd,项目名称:androidClient,代码行数:14,代码来源:RestaurantQuery.java

示例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);
        }
    });
}
 
开发者ID:TheBurrd,项目名称:androidClient,代码行数:14,代码来源:DealQuery.java

示例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();
            }
        }
    });
}
 
开发者ID:cfudge,项目名称:ClassDiscuss,代码行数:15,代码来源:ParseDatabase.java

示例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");
				
			}
		}
	});
}
 
开发者ID:maxml,项目名称:AutoTimeHelper,代码行数:15,代码来源:PointCRUD.java

示例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();
			}
		}
	});
}
 
开发者ID:maxml,项目名称:AutoTimeHelper,代码行数:15,代码来源:LineCRUD.java

示例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);
}
 
开发者ID:tl-nguyen,项目名称:RadarApp,代码行数:6,代码来源:QueryHelper.java

示例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);
}
 
开发者ID:tl-nguyen,项目名称:RadarApp,代码行数:6,代码来源:QueryHelper.java

示例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;
}
 
开发者ID:gokcan,项目名称:Volo,代码行数:59,代码来源:ProfileListAdapter.java


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