public static ArrayList<Book> queryFilterBooks(ContentResolver resolver, String tag, String key) {
    ArrayList<Book> bookList = new ArrayList<Book>();
    Book book;

    Cursor cursor =
        resolver.query(
            Uri.parse(DbTags.URI_TABLE_BOOK_INFO), null, tag + "=?", new String[] {key + ""}, null);
    while (cursor.moveToNext()) {
      book = new Book();
      book.setBookId(Integer.parseInt(getFieldContent(cursor, DbTags.FIELD_BOOK_ID)));
      book.setBookName(getFieldContent(cursor, DbTags.FIELD_BOOK_NAME));
      book.setBookAuthor(getFieldContent(cursor, DbTags.FIELD_BOOK_AUTHOR));
      book.setBookPath(getFieldContent(cursor, DbTags.FIELD_BOOK_PATH));
      book.setBookAddTime(getFieldContent(cursor, DbTags.FIELD_BOOK_ADD_TIME));
      book.setBookOpenTime(getFieldContent(cursor, DbTags.FIELD_BOOK_OPEN_TIME));
      book.setBookCategoryId(
          Integer.parseInt(getFieldContent(cursor, DbTags.FIELD_BOOK_CATEGORY_ID)));
      book.setBookCategroyName(getFieldContent(cursor, DbTags.FIELD_BOOK_CATEGORY_NAME));
      book.setBookSize(getFieldContent(cursor, DbTags.FIELD_BOOK_SIZE));
      book.setBookProgress(getFieldContent(cursor, DbTags.FIELD_BOOK_PROGRESS));

      bookList.add(book);
    }
    cursor.close();

    return bookList;
  }
  public static Book queryBookFav(ContentResolver resolver, String tag, String key) {
    Book book = null;
    Cursor cursor =
        resolver.query(
            Uri.parse(DbTags.URI_TABLE_BOOK_FAV), null, tag + "=?", new String[] {key + ""}, null);
    if (cursor.moveToNext()) {
      book = new Book();

      book.setBookName(getFieldContent(cursor, DbTags.FIELD_BOOK_NAME));
      book.setBookPath(getFieldContent(cursor, DbTags.FIELD_BOOK_PATH));
      book.setBookAddTime(getFieldContent(cursor, DbTags.FIELD_BOOK_ADD_TIME));
      book.setBookSize(getFieldContent(cursor, DbTags.FIELD_BOOK_SIZE));
    }
    cursor.close();
    return book;
  }
  public static ArrayList<Book> queryBooksFav(ContentResolver resolver) {
    ArrayList<Book> bookList = new ArrayList<Book>();
    Book book;

    Cursor cursor = resolver.query(Uri.parse(DbTags.URI_TABLE_BOOK_FAV), null, null, null, null);
    while (cursor.moveToNext()) {
      book = new Book();

      book.setBookName(getFieldContent(cursor, DbTags.FIELD_BOOK_NAME));
      book.setBookPath(getFieldContent(cursor, DbTags.FIELD_BOOK_PATH));
      book.setBookAddTime(getFieldContent(cursor, DbTags.FIELD_BOOK_ADD_TIME));
      book.setBookSize(getFieldContent(cursor, DbTags.FIELD_BOOK_SIZE));
      bookList.add(book);
    }
    cursor.close();

    return bookList;
  }