示例#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> getSearchNotFound() {
   return adapter.getSearchNotFound();
 }
示例#3
0
 @Override
 public boolean deleteBookmarks(final String book, final List<Bookmark> bookmarks) {
   return adapter.deleteBookmarks(book, bookmarks);
 }
示例#4
0
 @Override
 public boolean updateBookmarks(final BookSettings bs) {
   return adapter.updateBookmarks(bs);
 }
示例#5
0
 @Override
 public boolean deleteAllBookmarks() {
   return adapter.deleteAllBookmarks();
 }
示例#6
0
 @Override
 public boolean deleteAll() {
   return adapter.deleteAll();
 }
示例#7
0
 @Override
 public Map<String, BookSettings> getAllBooks() {
   return adapter.getAllBooks();
 }
示例#8
0
 @Override
 public void onCreate(final SQLiteDatabase db) {
   adapter.onCreate(db);
 }
示例#9
0
 @Override
 public boolean clearRecent() {
   return adapter.clearRecent();
 }
示例#10
0
 @Override
 public boolean restoreBookSettings(Collection<BookSettings> c) {
   return adapter.restoreBookSettings(c);
 }
示例#11
0
 @Override
 public boolean storeBookSettings(final List<BookSettings> list) {
   return adapter.storeBookSettings(list);
 }
示例#12
0
 @Override
 public boolean storeBookSettings(final BookSettings bs) {
   return bs.persistent && adapter.storeBookSettings(bs);
 }
示例#13
0
 @Override
 public BookSettings getBookSettings(final String fileName) {
   return adapter.getBookSettings(fileName);
 }
示例#14
0
 @Override
 public Map<String, BookSettings> getRecentBooks(final boolean all) {
   return adapter.getRecentBooks(all);
 }
示例#15
0
 @Override
 public boolean storeSearch(final String book, final boolean found) {
   return adapter.storeSearch(book, found);
 }
示例#16
0
 @Override
 public boolean clearSearch() {
   return adapter.clearSearch();
 }
示例#17
0
 @Override
 public boolean removeBookFromRecents(final BookSettings bs) {
   return adapter.removeBookFromRecents(bs);
 }
示例#18
0
 @Override
 public void onDestroy(final SQLiteDatabase db) {
   adapter.onDestroy(db);
 }
示例#19
0
 @Override
 public void delete(final BookSettings current) {
   adapter.delete(current);
 }