GenerationResultRepositoryImpl

Implements GenerationResultRepository behavior in the SDAI data layer.

Author

Dmitriy Moroz

Constructors

Link copied to clipboard
constructor(preferenceManager: PreferenceManager, mediaStoreGateway: MediaStoreGateway, localDataSource: GenerationResultDataSource.Local)

Properties

Link copied to clipboard

Exposes the localDataSource value used by the SDAI data layer.

Link copied to clipboard

Exposes the mediaStoreGateway value used by the SDAI data layer.

Link copied to clipboard

Exposes the preferenceManager value used by the SDAI data layer.

Functions

Link copied to clipboard
open suspend override fun deleteAll()

Performs the SDAI side effect handled by deleteAll.

Link copied to clipboard
open suspend override fun deleteById(id: Long)

Performs the SDAI side effect handled by deleteById.

Link copied to clipboard
open suspend override fun deleteByIdList(idList: List<Long>)

Performs the SDAI side effect handled by deleteByIdList.

Link copied to clipboard
private fun exportAsync(result: AiGenerationResult)

Executes the exportAsync step in the SDAI data layer.

Link copied to clipboard
protected suspend fun exportToMediaStoreAsync(result: AiGenerationResult)

Executes the exportToMediaStoreAsync step in the SDAI data layer.

Link copied to clipboard
open suspend override fun getAll(): List<AiGenerationResult>

Loads SDAI data through getAll.

Link copied to clipboard
open suspend override fun getById(id: Long): AiGenerationResult

Loads SDAI data through getById.

Link copied to clipboard
open suspend override fun getByIds(idList: List<Long>): List<AiGenerationResult>

Loads SDAI data through getByIds.

Link copied to clipboard
protected suspend fun getInfoAsync(): MediaStoreInfo

Loads SDAI data through getInfoAsync.

Link copied to clipboard
open suspend override fun getPage(limit: Int, offset: Int): List<AiGenerationResult>

Loads SDAI data through getPage.

Link copied to clipboard
open suspend override fun insert(result: AiGenerationResult): Long

Performs the SDAI side effect handled by insert.

Link copied to clipboard
open override fun observeCount(): Flow<Int>

Loads SDAI data through observeCount.

Link copied to clipboard
open override fun observePage(limit: Int, offset: Int): Flow<List<AiGenerationResult>>

Loads SDAI data through observePage.

Link copied to clipboard
open suspend override fun toggleVisibility(id: Long): Boolean

Converts SDAI data with toggleVisibility.