RepositoryDao

interface RepositoryDao: Any

Methods

getAllRepositoriesWithCards

abstract fun getAllRepositoriesWithCards(): List<RepositoryWithCards>

Gets all Repositorys with their respective Flashcard.

ReturnValue

Name Description
List<RepositoryWithCards>

All Repositorys

getRepositoryWithCards

abstract fun getRepositoryWithCards(repoId: Int): RepositoryWithCards?

Gets one Repository with its Flashcards by its Repository.repoId.

Parameters

Name Description
repoId: Int

The Repository.repoId of the Repository.

ReturnValue

Name Description
RepositoryWithCards?

The RepositoryWithCards with the repoId or null if not found.

getRepository

abstract fun getRepository(repoId: Int): Repository?

Gets one Repository without its Flashcards by its Repository.repoId.

Parameters

Name Description
repoId: Int

The Repository.repoId of the Repository.

ReturnValue

Name Description
Repository?

The Repository with the repoId or null if not found.

addCard

abstract fun addCard(vararg cards: RepositoryCardCrossRef)

Adds one or more Flashcard to a Repository.

Parameters

Name Description
vararg cards: RepositoryCardCrossRef

The RepositoryCardCrossRefs to add.

ReturnValue

Name Description
Unit

removeCard

abstract fun removeCard(vararg cards: RepositoryCardCrossRef)

Removes one or more Flashcard from a Repository.

Parameters

Name Description
vararg cards: RepositoryCardCrossRef

The RepositoryCardCrossRefs to remove.

ReturnValue

Name Description
Unit

insert

abstract fun insert(vararg repo: Repository): Array<Long>

Creates one or more Repository.

Parameters

Name Description
vararg repo: Repository

The Repositorys to add.

ReturnValue

Name Description
Array<Long>

An array of the inserted repoIds.

delete

abstract fun delete(vararg repo: Repository)

Deletes one or more Repository.

Parameters

Name Description
vararg repo: Repository

The Repositorys to delete.

ReturnValue

Name Description
Unit

update

abstract fun update(vararg repo: Repository)

Updates one ore more Repository.

Parameters

Name Description
vararg repo: Repository

The Repositorys to update.

ReturnValue

Name Description
Unit

update

abstract fun update(vararg rwc: RepositoryCardCrossRef)

Updates the cross reference for a RepositoryWithCards.

Parameters

Name Description
vararg rwc: RepositoryCardCrossRef

The RepositoryCardCrossRef to update.

ReturnValue

Name Description
Unit