//MetaPhrase/com.github.diegoberaldin.metaphrase.domain.language.repository/LanguageRepository
LanguageRepository
[jvm]
interface LanguageRepository
Contract for the language repository.
Functions
Name | Summary |
---|---|
create | [jvm] abstract suspend fun create(model: LanguageModel, projectId: Int): Int Create a new language within a given project. |
delete | [jvm] abstract suspend fun delete(model: LanguageModel) Delete a language. |
getAll | [jvm] abstract suspend fun getAll(projectId: Int): List<LanguageModel> Get all the languages within a given project. |
getBase | [jvm] abstract suspend fun getBase(projectId: Int): LanguageModel? Get the source (base) language of a project. |
getByCode | [jvm] abstract suspend fun getByCode(code: String, projectId: Int): LanguageModel? Get a language by its code. |
getById | [jvm] abstract suspend fun getById(id: Int): LanguageModel? Get a language by its id. |
getDefaultLanguages | [jvm] abstract fun getDefaultLanguages(): List<LanguageModel> Get the default languages for project creation. |
observeAll | [jvm] abstract fun observeAll(projectId: Int): Flow<List<LanguageModel>> Observe all the languages within a project. |
update | [jvm] abstract suspend fun update(model: LanguageModel) Update a language. |