Interface AttackCardDao
-
public interface AttackCardDao
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Single<Integer>
delete(AttackCard attackCard)
Deletes a single attack card from the database.Single<Integer>
delete(AttackCard... attackCards)
Deletes multiple attack card from the database.Single<Integer>
delete(Collection<AttackCard> attackCards)
Deletes multiple attack card from the database.LiveData<AttackCard>
findByAttackCardId(long id)
Queries the database for a specific attack card, based on id.LiveData<List<AttackCard>>
findByUnitCardId(long id)
Queries the database for all attack cards.Single<Long>
insert(AttackCard attackCard)
Inserts a single attack card into the database.Single<List<Long>>
insert(AttackCard... attackCards)
Inserts multiple attack cards into the database.Single<List<Long>>
insert(Collection<AttackCard> attackCards)
Inserts multiple attack cards into the database.Single<Integer>
update(AttackCard attackCard)
Updates a single attack card in the database.Single<Integer>
update(AttackCard... attackCards)
Updates multiple attack cards in the database.Single<Integer>
update(Collection<AttackCard> attackCards)
Updates multiple attack cards in the database.
-
-
-
Method Detail
-
insert
Single<Long> insert(AttackCard attackCard)
Inserts a single attack card into the database.- Parameters:
attackCard
- the attack card to be used.- Returns:
Single
holding the id of the attack card.
-
insert
Single<List<Long>> insert(AttackCard... attackCards)
Inserts multiple attack cards into the database.- Parameters:
attackCards
- the attack cards to be used.- Returns:
- A
Single
holding aList
of ids of the attack cards.
-
insert
Single<List<Long>> insert(Collection<AttackCard> attackCards)
Inserts multiple attack cards into the database.- Parameters:
attackCards
- the attack cards to be used.- Returns:
- A
Single
holding aList
of ids of the attack cards.
-
update
Single<Integer> update(AttackCard attackCard)
Updates a single attack card in the database.- Parameters:
attackCard
- the attack card to be updated.- Returns:
- A
Single
holding the number of updates performed.
-
update
Single<Integer> update(AttackCard... attackCards)
Updates multiple attack cards in the database.- Parameters:
attackCards
- the attack cards to be updated.- Returns:
- A
Single
holding the number of updates performed.
-
update
Single<Integer> update(Collection<AttackCard> attackCards)
Updates multiple attack cards in the database.- Parameters:
attackCards
- the attack cards to be updated.- Returns:
- A
Single
holding the number of updates performed.
-
delete
Single<Integer> delete(AttackCard attackCard)
Deletes a single attack card from the database.- Parameters:
attackCard
- The attack card to be deleted.- Returns:
- A
Single
holding the number of deletions performed.
-
delete
Single<Integer> delete(AttackCard... attackCards)
Deletes multiple attack card from the database.- Parameters:
attackCards
- The attack cards to be deleted.- Returns:
- A
Single
holding the number of deletions performed.
-
delete
Single<Integer> delete(Collection<AttackCard> attackCards)
Deletes multiple attack card from the database.- Parameters:
attackCards
- The attack cards to be deleted.- Returns:
- A
Single
holding the number of deletions performed.
-
findByAttackCardId
LiveData<AttackCard> findByAttackCardId(long id)
Queries the database for a specific attack card, based on id.- Parameters:
id
- The attack card's id.- Returns:
LiveData
of the selected attack card.
-
findByUnitCardId
LiveData<List<AttackCard>> findByUnitCardId(long id)
Queries the database for all attack cards.- Parameters:
id
- The attack card's id.- Returns:
LiveData
of aList
of attack card.
-
-