Interface DeckDao
-
public interface DeckDao
Provides an interface with methods that perform actions on theDeck
table of the database.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Single<Integer>
delete(Deck deck)
Deletes a single deck from the database.Single<Integer>
delete(Deck... decks)
Deletes multiple decks from the database.Single<Integer>
delete(Collection<Deck> decks)
Deletes multiple deck from the database.LiveData<Deck>
findByDeckId(long id)
Queries the database for a specific deck, based on id.Single<Long>
insert(Deck deck)
Inserts a single deck into the database.Single<List<Long>>
insert(Deck... decks)
Inserts multiple decks into the database.Single<List<Long>>
insert(Collection<Deck> decks)
Inserts multiple decks into the database.Single<Integer>
update(Deck deck)
Updates a single deck in the database.Single<Integer>
update(Deck... decks)
Updates multiple decks in the database.Single<Integer>
update(Collection<Deck> decks)
Updates multiple decks in 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
holdingList
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
holdingList
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.
-
-