コード例 #1
0
 @Override
 protected Note doInBackground(Note... note) {
   Session session = getInfinitumContext().getSession(DataSource.Sqlite);
   session.open();
   session.delete(note[0]);
   session.close();
   return note[0];
 }
コード例 #2
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;
 }