AggregateRootFactory

works.iterative.entity.AggregateRootFactory
trait AggregateRootFactory[Id, Command, Event, State, T <: AggregateRoot[Id, Command, Event, State]]()

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Type members

Types

type AlreadyExists = EntityAlreadyExists[Id, Command, Event, State]
type NotFound = EntityNotFound[Id, Command, Event, State]

Value members

Abstract methods

def entityId: String
def load(id: Id): IO[NotFound, T]
def make(id: Id): IO[AlreadyExists, T]

Concrete methods

protected def AlreadyExists(id: Id): AlreadyExists
protected def NotFound(id: Id): NotFound
def loadOrMake(id: Id): UIO[T]
def make()(using idGen: IdGenerator[Id]): UIO[T]