//MetaPhrase/com.github.diegoberaldin.metaphrase.domain.project.repository/ProjectRepository
ProjectRepository
[jvm]
interface ProjectRepository
Contract for the project repository.
Functions
Name | Summary |
---|---|
create | [jvm] abstract suspend fun create(model: ProjectModel): Int Create a project in the DB. |
delete | [jvm] abstract suspend fun delete(model: ProjectModel) Delete a project. |
deleteAll | [jvm] abstract suspend fun deleteAll() Delete all projects. |
getAll | [jvm] abstract suspend fun getAll(): List<ProjectModel> Get all projects. |
getById | [jvm] abstract suspend fun getById(id: Int): ProjectModel? Get a project by id. |
isNeedsSaving | [jvm] abstract fun isNeedsSaving(): Boolean Scalar value of the flag indicating there are unsaved changes. |
observeById | [jvm] abstract fun observeById(id: Int): Flow<ProjectModel> Observe a project given its ID. |
observeNeedsSaving | [jvm] abstract fun observeNeedsSaving(): Flow<Boolean> Observe the value of the flag indicating there are unsaved changes. |
setNeedsSaving | [jvm] abstract fun setNeedsSaving(value: Boolean) Set the flag indicating there are unsaved changes. |
update | [jvm] abstract suspend fun update(model: ProjectModel) Update an existing project. |