感谢 Android 中的 SugarORM,我在 SQLite 数据库中创建了表。
public class ProjectPhotoData extends SugarRecord<ProjectPhotoData> {
public boolean isSent;
public int pictureType;
public ProjectPhotoData() {
}
public ProjectPhotoData( boolean isSent, int pictureType) {
this.isSent = isSent;
this.pictureType = pictureType;
}
但我不知道如何从这个表中检索对象?
例如,我将对象保存在此表中:
ProjectPhotoData photoData = new ProjectPhotoData(false,5);
photoData.save();
ProjectPhotoData photoDataSecond = new ProjectPhotoData(true,3);
photoDataSecond.save();
以及如何检索pictureType为5的对象?
有任何想法吗?