MemoryBusinessObjectStore

Simple, In-Memory implementation of BusinessObjectStore. It should only be used for testing or development purposes.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open suspend override 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
open suspend override fun delete(id: Long): Either<StoreError, BusinessObject>

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

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

open suspend override fun update(obj: BusinessObject): Either<StoreError, BusinessObject>

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