Interface UnitCardDao


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

      • insert

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

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

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

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

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

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

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

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

        Single<Integer> delete​(Collection<UnitCard> unitCards)
        Deletes multiple unit cards from the database.
        Parameters:
        unitCards - The unit cards to be deleted.
        Returns:
        A Single holding the number of deletions performed.
      • findByUnitCardId

        LiveData<UnitCard> findByUnitCardId​(long id)
        Queries the database for a specific unit card, based on id.
        Parameters:
        id - The unit card's id.
        Returns:
        LiveData of the selected scale.
      • findByDeckId

        LiveData<List<UnitCard>> findByDeckId​(long id)
        Queries the database for all unit cards based on deck.
        Parameters:
        id - The deck's id
        Returns:
        LiveData of a List of unit cards.