Exemple #1
0
 /**
  * Return the object representing the app global state in the database, or null if the object
  * hasn't been set up yet
  *
  * @param db App's database -- only needs to be readable
  * @return Object representing the single persistent instance of MostRecentBean, which is the
  *     app's global state
  */
 public static MostRecentBean getMostRecent(SQLiteDatabase db) {
   ArrayList<MostRecentBean> recents = new ArrayList<MostRecentBean>(1);
   MostRecentBean.getAll(db, MostRecentBean.GEN_TABLE_NAME, recents, MostRecentBean.GEN_NEW);
   if (recents.size() == 0) return null;
   return recents.get(0);
 }