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