Android ORM 框架 GreenDao 使用详解,一线互联网移动架构师Android框架体系架构

文章详细介绍了如何在Android应用中使用greenDAO进行数据库操作,包括实体类的序列化与反序列化、在Application中初始化DaoSession、以及如何执行增删改查等基本操作。此外,还提到了作者关于Android开发者自学资源的分享和建议。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

public static final Creator CREATOR = new Creator() {

@Override

public GoodsModel createFromParcel(Parcel in) {

return new GoodsModel(in);

}

@Override

public GoodsModel[] newArray(int size) {

return new GoodsModel[size];

}

};

@Override

public int describeContents() {

return 0;

}

@Override

public void writeToParcel(Parcel dest, int flags) {

if (id == null) {

dest.writeByte((byte) 0);

} else {

dest.writeByte((byte) 1);

dest.writeLong(id);

}

if (goodsId == null) {

dest.writeByte((byte) 0);

} else {

dest.writeByte((byte) 1);

dest.writeInt(goodsId);

}

dest.writeString(name);

dest.writeString(icon);

dest.writeString(info);

dest.writeString(type);

}

public Long getId() {

return this.id;

}

public void setId(Long id) {

this.id = id;

}

public Integer getGoodsId() {

return this.goodsId;

}

public void setGoodsId(Integer goodsId) {

this.goodsId = goodsId;

}

public String getName() {

return this.name;

}

public void setName(String name) {

this.name = name;

}

public String getIcon() {

return this.icon;

}

public void setIcon(String icon) {

this.icon = icon;

}

public String getInfo() {

return th

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值