@Override protected Note doInBackground(Note... note) { Session session = getInfinitumContext().getSession(DataSource.Sqlite); session.open(); session.delete(note[0]); session.close(); return note[0]; }
@Override protected List<Note> doInBackground(Void... args) { Session session = getInfinitumContext().getSession(DataSource.Sqlite); session.open(); List<Note> notes = session.createCriteria(Note.class).list(); session.close(); return notes; }