MetaPhrase

An open source translation editor for native mobile app localization.

View project on GitHub

//MetaPhrase/com.github.diegoberaldin.metaphrase.domain.project.persistence.dao/DefaultSegmentDao

DefaultSegmentDao

[jvm]
class DefaultSegmentDao : SegmentDao

Constructors

   
DefaultSegmentDao [jvm]
constructor()

Functions

Name Summary
create [jvm]
open suspend override fun create(model: SegmentModel, languageId: Int): Int
Create a new segment.
createBatch [jvm]
open suspend override fun createBatch(models: List<SegmentModel>, languageId: Int)
Create multiple segments in a single transaction.
delete [jvm]
open suspend override fun delete(model: SegmentModel)
Delete a segment.
getAll [jvm]
open suspend override fun getAll(languageId: Int): List<SegmentModel>
Get all segments for a language within a project.
getById [jvm]
open suspend override fun getById(id: Int): SegmentModel?
Get a segment by ID.
getByKey [jvm]
open suspend override fun getByKey(key: String, languageId: Int): SegmentModel?
Get a segment by key given its language within a project. There can only be at most one segment with a given key for any given language (compound index).
getUntranslatable [jvm]
open suspend override fun getUntranslatable(languageId: Int): List<SegmentModel>
Get all the untranslatable segments for a language within a project.
search [jvm]
open suspend override fun search(languageId: Int, baseLanguageId: Int, filter: TranslationUnitTypeFilter, search: String?, skip: Int, limit: Int): List<SegmentModel>
Get the list of segments corresponding to some search criteria.
update [jvm]
open suspend override fun update(model: SegmentModel)
Update a segment.