手上有一个基于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;
}
}
关于怎样建这些表才能正常运行程序并且获得数据