示例#1
0
 public void switchAdapter(
     final SQLiteDatabase db, final IDBAdapter oldAdapter, final IDBAdapter newAdapter) {
   final Map<String, BookSettings> bookSettings = oldAdapter.getAllBooks();
   oldAdapter.deleteAll();
   oldAdapter.onDestroy(db);
   newAdapter.onCreate(db);
   newAdapter.restoreBookSettings(bookSettings.values());
 }
示例#2
0
 @Override
 public Map<String, BookSettings> getAllBooks() {
   return adapter.getAllBooks();
 }