FlashcardDao

interface FlashcardDao: Any

Methods

getAll

open fun getAll(): List<Flashcard>

Gets all Flashcards with their respective type.

ReturnValue

Name Description
List<Flashcard>

All Flashcards.

getAllAbstract

abstract fun getAllAbstract(): List<Flashcard>

Gets all Flashcards without their respective type.

ReturnValue

Name Description
List<Flashcard>

All Flashcards.

getOne

open fun getOne(cardId: Long): Flashcard?

Gets one Flashcard by its cardId.

Parameters

Name Description
cardId: Long

The cardId of the Flashcard.

ReturnValue

Name Description
Flashcard?

The Flashcard with the cardId or null if not found.

insert

open fun insert(vararg flashcard: Flashcard): List<Long>

Inserts one or more Flashcard according to their type.

Parameters

Name Description
vararg flashcard: Flashcard

The Flashcards to insert.

ReturnValue

Name Description
List<Long>

The IDs of the new cards

update

open fun update(vararg flashcard: Flashcard)

Updates one or more Flashcard according to their type.

Parameters

Name Description
vararg flashcard: Flashcard

The Flashcards to insert.

ReturnValue

Name Description
Unit

updateAbstract

abstract fun updateAbstract(vararg flashcard: Flashcard)

Updates one or more Flashcard

Parameters

Name Description
vararg flashcard: Flashcard

The Flashcards to insert.

ReturnValue

Name Description
Unit

insertAbstract

abstract fun insertAbstract(vararg flashcard: Flashcard): Array<Long>

Inserts one or more Flashcard.

Parameters

Name Description
vararg flashcard: Flashcard

The Flashcards to insert.

ReturnValue

Name Description
Array<Long>

The IDs of the new Cards

getType

abstract fun getType(cardId: Long): Long?

Gets the Flashcard.type of a Flashcard.

Parameters

Name Description
cardId: Long

The Flashcard.cardId of the Flashcard.

ReturnValue

Name Description
Long?

The Flashcard.type of a Flashcard with the cardId or null if not found.

delete

abstract fun delete(vararg flashcard: Flashcard)

Deletes one or more Flashcard.

Parameters

Name Description
vararg flashcard: Flashcard

The Flashcards to delete.

ReturnValue

Name Description
Unit

getFlashcardNormal

abstract fun getFlashcardNormal(cardId: Long): FlashcardNormal?

Gets one FlashcardNormal by its Flashcard.cardId.

Parameters

Name Description
cardId: Long

The Flashcard.cardId of the FlashcardNormal.

ReturnValue

Name Description
FlashcardNormal?

The FlashcardNormal with the cardId or null if not found.

getAllNormalByIds

abstract fun getAllNormalByIds(vararg cardId: Long): List<FlashcardNormal>

Gets all FlashcardNormals by their respective Flashcard.cardIds.

Parameters

Name Description
vararg cardId: Long

One or more Flashcard.cardId.

ReturnValue

Name Description
List<FlashcardNormal>

The FlashcardNormals who have the asked Flashcard.cardIds.

insertNormal

abstract fun insertNormal(vararg flashcard: FlashcardNormal): Array<Long>

Inserts one or more FlashcardNormal.

Parameters

Name Description
vararg flashcard: FlashcardNormal

The FlashcardNormals to insert.

ReturnValue

Name Description
Array<Long>

The IDs of the new cards

updateNormal

abstract fun updateNormal(vararg flashcard: FlashcardNormal)

Updates one or more FlashcardNormal

Parameters

Name Description
vararg flashcard: FlashcardNormal

The FlashcardNormals to insert.

ReturnValue

Name Description
Unit