//MetaPhrase/com.github.diegoberaldin.metaphrase.domain.glossary.repository/GlossaryTermRepository
GlossaryTermRepository
[jvm]
interface GlossaryTermRepository
Contract for the glossary term repository.
Functions
Name | Summary |
---|---|
areAssociated | [jvm] abstract suspend fun areAssociated(sourceId: Int, targetId: Int): Boolean Determine whether two glossary terms are associated. |
associate | [jvm] abstract suspend fun associate(sourceId: Int, targetId: Int) Create an association between two terms. |
create | [jvm] abstract suspend fun create(model: GlossaryTermModel): Int Create a new glossary term. |
delete | [jvm] abstract suspend fun delete(model: GlossaryTermModel) Delete a glossary term. |
deleteAll | [jvm] abstract suspend fun deleteAll() Delete all glossary terms. |
disassociate | [jvm] abstract suspend fun disassociate(sourceId: Int, targetId: Int) Remove the association between two terms. |
get | [jvm] abstract suspend fun get(lemma: String, lang: String): GlossaryTermModel? Get a term by its lemma and language |
getAll | [jvm] abstract suspend fun getAll(): List<GlossaryTermModel> Get all glossary terms. |
getAllAssociated | [jvm] abstract suspend fun getAllAssociated(model: GlossaryTermModel): List<GlossaryTermModel> Get all the terms associated with the given one, regardless of the language. |
getAssociated | [jvm] abstract suspend fun getAssociated(model: GlossaryTermModel, otherLang: String): List<GlossaryTermModel> Get all the terms associated with the given one. |
getById | [jvm] abstract suspend fun getById(id: Int): GlossaryTermModel? Get a term by ID. |
isStillReferenced | [jvm] abstract suspend fun isStillReferenced(id: Int): Boolean Determine whether a term still referenced by at least another term in the glossary. |
update | [jvm] abstract suspend fun update(model: GlossaryTermModel) Update a glossary term. |