BusinessObjectStore

A BusinessObjectStore is responsible for storing and retrieving BusinessObjects.

Inheritors

Functions

Link copied to clipboard
abstract suspend fun addNew(obj: BusinessObject): Either<StoreError, BusinessObject>

Creates a new copy of the BusinessObject with a new id and stores it in this BusinessObjectStore.

Link copied to clipboard
abstract suspend fun delete(id: Long): Either<StoreError, BusinessObject>

Deletes the BusinessObject with the given id from this BusinessObjectStore if it exists.

Link copied to clipboard
abstract suspend fun exists(id: Long): Either<StoreError, Boolean>
Link copied to clipboard
abstract suspend fun get(id: Long): Either<StoreError, BusinessObject>
Link copied to clipboard
abstract suspend fun getAll(): Either<StoreError, List<BusinessObject>>
abstract suspend fun getAll(typeName: String): Either<StoreError, List<BusinessObject>>
Link copied to clipboard
abstract suspend fun size(): Either<StoreError, Long>
Link copied to clipboard
abstract suspend fun update(obj: BusinessObject): Either<StoreError, BusinessObject>

Updates the BusinessObject with the given id and replaces it in this BusinessObjectStore if it exists.

open suspend fun update(obj: Collection<BusinessObject>): EitherNel<StoreError, List<BusinessObject>>