//MetaPhrase/com.github.diegoberaldin.metaphrase.domain.glossary.persistence.dao/GlossaryTermDao
GlossaryTermDao
interface GlossaryTermDao
Contract for the glossary term dao.
Inheritors
| DefaultGlossaryTermDao |
Functions
| Name | Summary |
|---|---|
| areAssociated | [jvm] abstract suspend fun areAssociated(sourceId: Int, targetId: Int): Boolean Determine whether two 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 the terms in the glossary. |
| disassociate | [jvm] abstract suspend fun disassociate(sourceId: Int, targetId: Int) Remove the association between two terms. |
| getAll | [jvm] abstract suspend fun getAll(): List<GlossaryTermModel> Get all the terms in the glossary. |
| getAllAssociated | [jvm] abstract suspend fun getAllAssociated(model: GlossaryTermModel): List<GlossaryTermModel> Get all terms associated with a given term no matter the language. |
| getAssociated | [jvm] abstract suspend fun getAssociated(model: GlossaryTermModel, otherLang: String): List<GlossaryTermModel> Get the terms associated with a given term. |
| getBy | [jvm] abstract suspend fun getBy(lemma: String, lang: String): GlossaryTermModel? Get a term given its lemma and language. |
| getById | [jvm] abstract suspend fun getById(id: Int): GlossaryTermModel? Get a tern given its id. |
| isStillReferenced | [jvm] abstract suspend fun isStillReferenced(id: Int): Boolean Determine whether a term is still referenced by any other term in the glossary. |
| update | [jvm] abstract suspend fun update(model: GlossaryTermModel) Update a glossary term. |