I create table in SQLite Database thanks to SugarORM in Android.
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;
}
But I don't know how to retrieve object from this table?
For example I save objects in this table:
ProjectPhotoData photoData = new ProjectPhotoData(false,5);
photoData.save();
ProjectPhotoData photoDataSecond = new ProjectPhotoData(true,3);
photoDataSecond.save();
And how to retrive object where pictureType is 5?
Any ideas?
Aucun commentaire:
Enregistrer un commentaire