Interface DeckDao


  • public interface DeckDao
    Provides an interface with methods that perform actions on the Deck table of the database.
    • Method Detail

      • insert

        Single<Long> insert​(Deck deck)
        Inserts a single deck into the database.
        Parameters:
        deck - The deck to be inserted.
        Returns:
        A Single holding the id of the deck that was inserted.
      • insert

        Single<List<Long>> insert​(Deck... decks)
        Inserts multiple decks into the database.
        Parameters:
        decks - The decks to be inserted.
        Returns:
        A Single holding List of ids of decks that were inserted.
      • insert

        Single<List<Long>> insert​(Collection<Deck> decks)
        Inserts multiple decks into the database.
        Parameters:
        decks - The deck to be inserted.
        Returns:
        A Single holding List of ids of decks that were inserted.
      • update

        Single<Integer> update​(Deck deck)
        Updates a single deck in the database.
        Parameters:
        deck - The deck to be updated.
        Returns:
        A Single holding the number of updates performed.
      • update

        Single<Integer> update​(Deck... decks)
        Updates multiple decks in the database.
        Parameters:
        decks - The decks to be updated.
        Returns:
        A Single holding the number of updates performed.
      • update

        Single<Integer> update​(Collection<Deck> decks)
        Updates multiple decks in the database.
        Parameters:
        decks - The decks to be updated.
        Returns:
        A Single holding the number of updates performed.
      • delete

        Single<Integer> delete​(Deck deck)
        Deletes a single deck from the database.
        Parameters:
        deck - The deck to be deleted.
        Returns:
        A Single holding the number of deletions performed.
      • delete

        Single<Integer> delete​(Deck... decks)
        Deletes multiple decks from the database.
        Parameters:
        decks - The decks to be deleted.
        Returns:
        A Single holding the number of deletions performed.
      • delete

        Single<Integer> delete​(Collection<Deck> decks)
        Deletes multiple deck from the database.
        Parameters:
        decks - The scales to be deleted.
        Returns:
        A Single holding the number of deletions performed.
      • findByDeckId

        LiveData<Deck> findByDeckId​(long id)
        Queries the database for a specific deck, based on id.
        Parameters:
        id - The deck's id.
        Returns:
        LiveData of the selected deck.