mxtca2 2015-04-03 05:46 采纳率: 0%
浏览 3771

基于Bmob开发的Android程序,关于建表的问题

手上有一个基于Bmob开发的Android程序,云端没有数据,想自行建表,当建立product表时程序崩溃,以下是javabean:

Category表

 public class Category extends BmobObject
{
    private static final long serialVersionUID = -6660631624266818846L;
    private BmobRelation  product;
    public BmobRelation getProduct() {
        return product;
    }

    public void setProduct(BmobRelation product) {
        this.product = product;
    }

    private String categoryName;

    public String getCategoryName() {
        return categoryName;
    }

    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName;
    }

}

Merchant表

public class Merchant extends BmobObject{
    private String account;
    private String password;
    private String phoneNum;
    private String nickName;
    public String getAccount() {
        return account;
    }
    public void setAccount(String account) {
        this.account = account;
    }
    public String getPassword() {
        return password;
    }
    public void setPassword(String password) {
        this.password = password;
    }
    public String getPhoneNum() {
        return phoneNum;
    }
    public void setPhoneNum(String phoneNum) {
        this.phoneNum = phoneNum;
    }
    public String getNickName() {
        return nickName;
    }
    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

} 

Order表

 public class Order extends BmobObject{
    private int state;
    public int getState() {
        return state;
    }
    public void setState(int state) {
        this.state = state;
    }
    public Shop getShop() {
        return shop;
    }
    public void setShop(Shop shop) {
        this.shop = shop;
    }
    public MyUser getUser() {
        return user;
    }
    public void setUser(MyUser user) {
        this.user = user;
    }
    public String getTotalPrice() {
        return totalPrice;
    }
    public void setTotalPrice(String totalPrice) {
        this.totalPrice = totalPrice;
    }
    private Shop shop;
    private MyUser user;
    private String totalPrice;

}

OrderDetail表

 public class OrderDetail extends BmobObject {
    public String getPrice() {
        return price;
    }
    public void setPrice(String price) {
        this.price = price;
    }
    public int getQuantity() {
        return quantity;
    }
    public void setQuantity(int quantity) {
        this.quantity = quantity;
    }
    public Product getProduct() {
        return product;
    }
    public void setProduct(Product product) {
        this.product = product;
    }
    public Order getOrder() {
        return order;
    }
    public void setOrder(Order order) {
        this.order = order;
    }
    private String price;
    private int quantity;
    private Product product;
    private Order order;

}

Product表

 public class Product extends BmobObject 
{
    /**
     * 
     */
    private static final long serialVersionUID = -4965032577440212747L;
    private String productName;
    private String  price;
    private String  detail;
    private int quantity;
    private Shop shop;
    private Category category;
    private Bitmap  bm;
    public int getQuantity() {
        return quantity;
    }
    public void setQuantity(int quantity) {
        this.quantity = quantity;
    }
    public Category getCategory() {
        return category;
    }
    public void setCategory(Category category) {
        this.category = category;
    }
    private  int level;



    private BmobFile  img;
    public String getProductName() {
        return productName;
    }
    public void setProductName(String productName) {
        this.productName = productName;
    }
    public String getPrice() {
        return price;
    }
    public void setPrice(String price) {
        this.price = price;
    }
    public String getDetail() {
        return detail;
    }
    public void setDetail(String detail) {
        this.detail = detail;
    }

    public int getLevel() {
        return level;
    }
    public void setLevel(int level) {
        this.level = level;
    }
    public BmobFile getImg() {
        return img;
    }
    public void setImg(BmobFile img) {
        this.img = img;
    }
    public Shop getShop() {
        return shop;
    }
    public void setShop(Shop shop) {
        this.shop = shop;
    }
    public Bitmap getBm() {
        return bm;
    }
    public void setBm(Bitmap bm) {
        this.bm = bm;
    }


}

Shop表

 public class Shop extends BmobObject  {
    /**
     * 
     */
    private static final long serialVersionUID = -6660631624266818846L;
    private  String  shopName;

    private  String shopAddresss;
    private  Merchant  merchant;
    public String getShopName() {
        return shopName;
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
    }

    public String getShopAddresss() {
        return shopAddresss;
    }

    public void setShopAddress(String shopAddresss) {
        this.shopAddresss = shopAddresss;
    }

    public Merchant getMerchant() {
        return merchant;
    }

    public void setMerchant(Merchant merchant) {
        this.merchant = merchant;
    }
}

关于怎样建这些表才能正常运行程序并且获得数据

  • 写回答

1条回答 默认 最新

  • devmiao 2015-04-03 08:42
    关注
    评论

报告相同问题?

悬赏问题

  • ¥15 这个电路是如何实现路灯控制器的,原理是什么,怎么求解灯亮起后熄灭的时间如图?
  • ¥15 matlab数字图像处理频率域滤波
  • ¥15 在abaqus做了二维正交切削模型,给刀具添加了超声振动条件后输出切削力为什么比普通切削增大这么多
  • ¥15 ELGamal和paillier计算效率谁快?
  • ¥15 file converter 转换格式失败 报错 Error marking filters as finished,如何解决?
  • ¥15 Arcgis相交分析无法绘制一个或多个图形
  • ¥15 关于#r语言#的问题:差异分析前数据准备,报错Error in data[, sampleName1] : subscript out of bounds请问怎么解决呀以下是全部代码:
  • ¥15 seatunnel-web使用SQL组件时候后台报错,无法找到表格
  • ¥15 fpga自动售货机数码管(相关搜索:数字时钟)
  • ¥15 用前端向数据库插入数据,通过debug发现数据能走到后端,但是放行之后就会提示错误