当前位置: 首页>>代码示例>>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;未经允许,请勿转载。