delete

abstract suspend fun delete(id: Long): Either<StoreError, BusinessObject>

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

Return

The deleted BusinessObject if it was successfully deleted

A RecordNotFoundError if the BusinessObject does not exist in this EventStore

A StoreError if the BusinessObject could not be deleted

Parameters

id

The id of the BusinessObject to delete.