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
    关注
    评论

报告相同问题?

悬赏问题

  • ¥30 dspbuilder中使用signalcompiler时报错Error during compilation: Fitter failed,求解决办法
  • ¥15 gwas 分析-数据质控之过滤稀有突变中出现的问题
  • ¥15 没有注册类 (异常来自 HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
  • ¥15 知识蒸馏实战博客问题
  • ¥15 用PLC设计纸袋糊底机送料系统
  • ¥15 simulink仿真中dtc控制永磁同步电机如何控制开关频率
  • ¥15 用C语言输入方程怎么
  • ¥15 网站显示不安全连接问题
  • ¥15 51单片机显示器问题
  • ¥20 关于#qt#的问题:Qt代码的移植问题