androd使用Realm实现数据存储到手机数据库

xiaoxiao2021-02-28  107

详情链接:

http://www.cnblogs.com/RaphetS/p/5996265.html

androd使用Realm实现数据存储到手机数据库:

主要特色可以直接保存某种个对象:

但是这个对象类要是继承RealmObject ; publicclassDogextendsRealmObject{ private String name; privateint age; @PrimaryKey private String id; public String getName(){ return name; } publicvoidsetName(String name){ this.name = name; } publicintgetAge(){ return age; } publicvoidsetAge(int age){ this.age = age; } public String getId() { return id; } publicvoidsetId(String id){ this.id = id; }}

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

转载请注明原文地址: https://www.6miu.com/read-94924.html

最新回复(0)