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


Java ParseQuery类代码示例

本文整理汇总了Java中com.parse.ParseQuery的典型用法代码示例。如果您正苦于以下问题:Java ParseQuery类的具体用法?Java ParseQuery怎么用?Java ParseQuery使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ParseQuery类属于com.parse包,在下文中一共展示了ParseQuery类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: localQuery

import com.parse.ParseQuery; //导入依赖的package包/类
private void localQuery(){
    ParseQuery<Kid> lQuery = ParseQuery.getQuery(Kid.class).fromLocalDatastore();
    lQuery.orderByAscending("createdAt");
    lQuery.findInBackground(new FindCallback<Kid>() {
        @Override
        public void done(List<Kid> list, ParseException e) {
            if (e == null) {

                kidArrayList.clear();
                kidArrayList.addAll(list);
                fillHashMap();
                adapter = new AddAttendanceAdapter(AddAttendance.this,kidArrayList,activityMap);
                listView.setAdapter(adapter);
                listView.invalidate();
            }

        }
    });
}
 
开发者ID:amir511,项目名称:My-Sheep,代码行数:20,代码来源:AddAttendance.java

示例2: localQuery

import com.parse.ParseQuery; //导入依赖的package包/类
private void localQuery(){
    ParseQuery<Kid> query = ParseQuery.getQuery(Kid.class).fromLocalDatastore();
    query.orderByAscending("createdAt");
    query.findInBackground(new FindCallback<Kid>() {
        @Override
        public void done(List<Kid> list, @Nullable ParseException e) {
            if (e == null && list.size()!=0) {
                kidArrayList.clear();
                kidArrayList.addAll(list);
                applyAttendanceToKids();
                adapter.notifyDataSetChanged();
                listView.invalidate();
                   }
                    }
                });
}
 
开发者ID:amir511,项目名称:My-Sheep,代码行数:17,代码来源:MainActivity.java

示例3: serverQuery

import com.parse.ParseQuery; //导入依赖的package包/类
private void serverQuery() {
ParseQuery<Kid> query = ParseQuery.getQuery(Kid.class);
query.orderByAscending("createdAt");
query.findInBackground(new FindCallback<Kid>() {
    @Override
    public void done(List<Kid> list, @Nullable ParseException e) {
        if (e == null){
            kidArrayList.clear();
            kidArrayList.addAll(list);
            Kid.pinAllInBackground(kidArrayList);
            applyAttendanceToKids();
            adapter.notifyDataSetChanged();
            listView.invalidate();
        }else if(checkConnection()){
            toaster("Error getting data from Server\nWorking offline!","l");
        }
    }
});
        }
 
开发者ID:amir511,项目名称:My-Sheep,代码行数:20,代码来源:MainActivity.java

示例4: getAnimeListByUrl

import com.parse.ParseQuery; //导入依赖的package包/类
@Override
public List<Anime> getAnimeListByUrl(String url) {
    ArrayList<Anime> animeList = new ArrayList<>();
    ParseQuery<AnimeRecord> query = AnimeRecord.getQuery();
    try {
        List<AnimeRecord> animeRecords = query.whereContains("url", url).find();
        for (AnimeRecord record : animeRecords) {
            Anime anime = AnimeRecord.toAnime(record);
            if (anime != null)
                animeList.add(anime);
        }
    } catch (ParseException e) {
        WriteLog.appendLogException(TAG, "getAnimeListByUrl(" + url + ") failed", e);
    }
    return animeList;
}
 
开发者ID:SalmanTKhan,项目名称:MyAnimeViewer,代码行数:17,代码来源:ParseManager.java

示例5: getAnimeListByTitle

import com.parse.ParseQuery; //导入依赖的package包/类
@Override
public List<Anime> getAnimeListByTitle(String title) {
    ArrayList<Anime> animeList = new ArrayList<>();
    ParseQuery<AnimeRecord> query = AnimeRecord.getQuery();
    try {
        List<AnimeRecord> animeRecords = query.whereContains("title", title).find();
        for (AnimeRecord record : animeRecords) {
            Anime anime = AnimeRecord.toAnime(record);
            if (anime != null)
                animeList.add(anime);
        }
    } catch (ParseException e) {
        WriteLog.appendLogException(TAG, "getAnimeListByTitle(" + title + ") failed", e);
    }
    return animeList;
}
 
开发者ID:SalmanTKhan,项目名称:MyAnimeViewer,代码行数:17,代码来源:ParseManager.java

示例6: getContactInfos

import com.parse.ParseQuery; //导入依赖的package包/类
public void getContactInfos(List<String> usernames, final EMValueCallBack<List<EaseUser>> callback) {
	ParseQuery<ParseObject> pQuery = ParseQuery.getQuery(CONFIG_TABLE_NAME);
	pQuery.whereContainedIn(CONFIG_USERNAME, usernames);
	pQuery.findInBackground(new FindCallback<ParseObject>() {

		@Override
		public void done(List<ParseObject> arg0, ParseException arg1) {
			if (arg0 != null) {
				List<EaseUser> mList = new ArrayList<EaseUser>();
				for (ParseObject pObject : arg0) {
				    EaseUser user = new EaseUser(pObject.getString(CONFIG_USERNAME));
					ParseFile parseFile = pObject.getParseFile(CONFIG_AVATAR);
					if (parseFile != null) {
						user.setAvatar(parseFile.getUrl());
					}
					user.setNick(pObject.getString(CONFIG_NICK));
					EaseCommonUtils.setUserInitialLetter(user);
					mList.add(user);
				}
				callback.onSuccess(mList);
			} else {
				callback.onError(arg1.getCode(), arg1.getMessage());
			}
		}
	});
}
 
开发者ID:mangestudio,项目名称:GCSApp,代码行数:27,代码来源:ParseManager.java

示例7: 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

示例8: retreiveprofile

import com.parse.ParseQuery; //导入依赖的package包/类
public static void retreiveprofile(String username , final Context context) {
    ParseQuery<ParseObject> query= ParseQuery.getQuery("Profile");
    query.whereEqualTo("user",username);
    query.getFirstInBackground(new GetCallback<ParseObject>() {
        @Override
        public void done(ParseObject parseObject, ParseException e) {

            if(parseObject!=null && e==null) {

                ParseFile file = (ParseFile) parseObject.get("image");
                String url = "http://wwww.webianks.com";

                if (file != null) {
                    url = file.getUrl().toString();
                }

                MainActivity.retriveProfileCallback(context, url);

            }else{
                //canntretrivee file
            }
        }
    });

}
 
开发者ID:salRoid,项目名称:Clasick,代码行数:26,代码来源:DisplayImage.java

示例9: retreivetimelineprofile

import com.parse.ParseQuery; //导入依赖的package包/类
public static void retreivetimelineprofile(String username , final Context context) {
    ParseQuery<ParseObject> query= ParseQuery.getQuery("Profile");
    query.whereEqualTo("user",username);
    query.getFirstInBackground(new GetCallback<ParseObject>() {
        @Override
        public void done(ParseObject parseObject, ParseException e) {

            if(parseObject!=null && e==null) {

                ParseFile file = (ParseFile) parseObject.get("image");
                String url = "http://wwww.webianks.com";
                if (file != null) {

                    url = file.getUrl().toString();
                }

                Profile.retriveTimelineProfileCallback(context, url);

            }else{
                //canntretrivee file
            }
        }
    });

}
 
开发者ID:salRoid,项目名称:Clasick,代码行数:26,代码来源:DisplayImage.java

示例10: categorySpinnerSetup

import com.parse.ParseQuery; //导入依赖的package包/类
public void categorySpinnerSetup() {
    ParseQueryAdapter.QueryFactory<ParseObject> factory = new ParseQueryAdapter.QueryFactory<ParseObject>() {
        public ParseQuery create() {
            ParseQuery query = new ParseQuery("Category");
            return query;
        }
    };

    categoryAdapter = new ParseQueryAdapter<ParseObject>(this,
            factory);
    categoryAdapter.setTextKey("name");
    categorySpinner.setAdapter(categoryAdapter);
    categorySpinner.setSelection(1);
    categorySpinner
            .setOnItemSelectedListener(new CategorySpinnerListener());
}
 
开发者ID:BehrouzRiahu,项目名称:Marketplace,代码行数:17,代码来源:PostActivity.java

示例11: loadParseData

import com.parse.ParseQuery; //导入依赖的package包/类
private void loadParseData(String Id){
    ParseQuery<ParseObject> query = ParseQuery.getQuery(EventTable);
    query.whereEqualTo("PhotoAlbumId", Id);
    query.findInBackground(new FindCallback<ParseObject>() {
        @Override
        public void done(List<ParseObject> productParseList, com.parse.ParseException e) {
            if (e == null) {
                if(productParseList.size() > 0){
                    eventList.addAll(productParseList);
                    eventAdapter = new PhotosAdapter(mContext, eventList);
                    gridView.setAdapter(eventAdapter);
                }else{
                    Toast.makeText(mContext,"Danh sách trống", Toast.LENGTH_SHORT).show();
                }
            } else {
                e.printStackTrace();
                LoggerFactory.e("loadParseData", "Error: " + e.getMessage());
            }
        }
    });

}
 
开发者ID:SEA2015-GROUP7,项目名称:projectTetViet,代码行数:23,代码来源:PhotoActivity.java

示例12: loadParseData

import com.parse.ParseQuery; //导入依赖的package包/类
private void loadParseData(){
    ParseQuery<ParseObject> query = ParseQuery.getQuery(tableName);
    query.findInBackground(new FindCallback<ParseObject>() {
        @Override
        public void done(List<ParseObject> productParseList, com.parse.ParseException e) {
            if (e == null) {
                if(productParseList.size() > 0){
                    eventList.addAll(productParseList);
                    eventAdapter = new VideoAdapter(mContext, eventList);
                    gridView.setAdapter(eventAdapter);
                }else{
                    Toast.makeText(mContext,"Danh sách trống", Toast.LENGTH_SHORT).show();
                }
            } else {
                e.printStackTrace();
                LoggerFactory.e("loadParseData", "Error: " + e.getMessage());
            }
        }
    });

}
 
开发者ID:SEA2015-GROUP7,项目名称:projectTetViet,代码行数:22,代码来源:VideosActivity.java

示例13: verifyOrganization

import com.parse.ParseQuery; //导入依赖的package包/类
private void verifyOrganization(){
    final String enteredText = orgName.getText().toString().trim();

    final RefreshingDialog rd = new RefreshingDialog(this);
    rd.createRefreshingDialog();
    ParseQuery<Organization> query = ParseQuery.getQuery(Organization.class);
    query.whereEqualTo("name", enteredText);
    query.findInBackground(new FindCallback<Organization>() {
        @Override
        public void done(List<Organization> objects, ParseException e) {
           if(objects.isEmpty()){//new group
               createGroupAlert(enteredText);
               rd.stop();
           }else{
               joinGroupAlert(objects.get(0));
               rd.stop();
           }
        }
    });

}
 
开发者ID:donniepropst,项目名称:note.cntxt,代码行数:22,代码来源:CreateOrganization.java

示例14: loadData

import com.parse.ParseQuery; //导入依赖的package包/类
private void loadData() {
    ParseQuery<UserInfo> query = ParseQuery.getQuery(UserInfo.class);
    query.orderByDescending("score").setLimit(10);
    query.findInBackground(new FindCallback<UserInfo>() {
        @Override
        public void done(List<UserInfo> objects, ParseException e) {
            list.addAll(objects);
            runOnUiThread(new Runnable() {
                @Override
                public void run() {
                    adapter.notifyDataSetChanged();
                }
            });
        }
    });

}
 
开发者ID:whu-iss-jack,项目名称:langren,代码行数:18,代码来源:GameTopActivity.java

示例15: updateMessage

import com.parse.ParseQuery; //导入依赖的package包/类
/**
 * Request a single message in a conversation to be updated.
 */
private void updateMessage(@NonNull String conversationId, @NonNull String messageId) {
    ParseQuery<ParseObject> query = new ParseQuery<>(MessagesTable.NAME);
    query.setCachePolicy(ParseQuery.CachePolicy.NETWORK_ONLY);
    query.include(MessagesTable.Fields.IMAGE);
    Log.d(TAG, "Updating message: " + messageId);

    mParseHelper.get(query, messageId)
        .map(in -> ParseUtils.from(in, mParseHelper))
        .toList()
        .subscribe(messages -> {
            for (ExampleMessage message : messages) {
                mUpdatePublisher.onNext(new Update<>(conversationId, Update.Action.UPDATED, null, message));
            }
        });
}
 
开发者ID:badoo,项目名称:Chateau,代码行数:19,代码来源:ParseMessageDataSource.java


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