當前位置: 首頁>>代碼示例>>Java>>正文


Java BmobObject類代碼示例

本文整理匯總了Java中cn.bmob.v3.BmobObject的典型用法代碼示例。如果您正苦於以下問題:Java BmobObject類的具體用法?Java BmobObject怎麽用?Java BmobObject使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


BmobObject類屬於cn.bmob.v3包,在下文中一共展示了BmobObject類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: uploadChatTableMessage

import cn.bmob.v3.BmobObject; //導入依賴的package包/類
private void uploadChatTableMessage(final GroupTableMessage groupTableMessage, SaveListener listener) {
        List<String> groupNumber = groupTableMessage.getGroupNumber();
        GroupTableMessage message;
        List<String> copy = new ArrayList<>(groupNumber);
        if (copy.contains(UserManager.getInstance().getCurrentUserObjectId())) {
                copy.remove(UserManager.getInstance().getCurrentUserObjectId());
        }
        List<BmobObject> groupTableMessageList = new ArrayList<>();
        for (int i = 0; i < copy.size(); i++) {
                message = new GroupTableMessage();
                message.setSendStatus(Constant.SEND_STATUS_SUCCESS);
                message.setReadStatus(Constant.READ_STATUS_UNREAD);
                message.setGroupDescription(groupTableMessage.getGroupDescription());
                message.setGroupId(groupTableMessage.getGroupId());
                message.setCreatedTime(groupTableMessage.getCreatedTime());
                message.setToId(copy.get(i));
                message.setGroupNumber(groupNumber);
                message.setGroupAvatar(groupTableMessage.getGroupAvatar());
                message.setGroupName(groupTableMessage.getGroupName());
                message.setGroupNick(groupTableMessage.getGroupNick());
                message.setNotification(groupTableMessage.getNotification());
                message.setCreatorId(groupTableMessage.getCreatorId());
                groupTableMessageList.add(message);
        }
        new BmobObject().insertBatch(CustomApplication.getInstance(), groupTableMessageList, listener);
}
 
開發者ID:HelloChenJinJun,項目名稱:TestChat,代碼行數:27,代碼來源:MsgManager.java

示例2: insertObject

import cn.bmob.v3.BmobObject; //導入依賴的package包/類
private void insertObject(final BmobObject obj){
    obj.save(AddBook.this, new SaveListener() {

        @Override
        public void onSuccess() {
            // TODO Auto-generated method stub
        	findThisBook();
			
        	Toast.makeText(AddBook.this, "添加書籍成功", Toast.LENGTH_SHORT).show();
			Intent intent = new Intent(AddBook.this, MainActivity.class);
			AddBook.this.startActivity(intent);
			AddBook.this.finish();
        }

        @Override
        public void onFailure(int arg0, String arg1) {
            // TODO Auto-generated method stub
            //ShowToast("-->創建數據失敗:" + arg0+",msg = "+arg1);
        	Toast.makeText(AddBook.this, "添加書籍失敗,請重新上傳", Toast.LENGTH_SHORT).show();
        }
    });
}
 
開發者ID:letourfrance,項目名稱:RadarLibrary,代碼行數:23,代碼來源:AddBook.java

示例3: BaseDataAdapter

import cn.bmob.v3.BmobObject; //導入依賴的package包/類
public BaseDataAdapter(Context context, List<? extends BmobObject> mDatas) {
    this.context = context;
    this.mDatas = mDatas;
    options = new DisplayImageOptions.Builder()
                    .showImageOnLoading(R.mipmap.icon_live_item_default)
            .showImageForEmptyUri(R.mipmap.icon_live_item_default)
            .showImageOnFail(R.mipmap.icon_live_item_default)
            .cacheInMemory(false)
            .cacheOnDisk(true)
            .considerExifParams(true)
            .bitmapConfig(Bitmap.Config.RGB_565)
            .displayer(new SimpleBitmapDisplayer())
            .imageScaleType(ImageScaleType.EXACTLY_STRETCHED)
            .build();
    if (this.context == null) {
        System.out.println("this.context is null");
    } else {
        mlayoutInflate = LayoutInflater.from(this.context);
    }
}
 
開發者ID:wanliyang1990,項目名稱:WliveTV,代碼行數:21,代碼來源:BaseDataAdapter.java

示例4: saveTimetableCourses

import cn.bmob.v3.BmobObject; //導入依賴的package包/類
@Override
public void saveTimetableCourses(List<Course> courses) {
    if (!courses.isEmpty() && mContext != null) {
        new BmobObject().insertBatch(mContext, new ArrayList<BmobObject>(courses), new SaveListener() {
            @Override
            public void onSuccess() {
                Log.d(tag,"bmob batch timetable courses saved successful.");
            }

            @Override
            public void onFailure(int i, String s) {
                Log.e(tag,"bmob batch timetable courses failure.");
            }
        });
    } else {
        Log.e(tag,"bmob batch insert cannot null");
    }
}
 
開發者ID:hjw541988478,項目名稱:ZfsoftCampusAssit,代碼行數:19,代碼來源:BmobCourseDataSource.java


注:本文中的cn.bmob.v3.BmobObject類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。