StateView

@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class StateView(val aggregate: String)

Marks a view of an aggregate's state: a class the state decodes into, which another context reads that state as. An api module's generated <State>View carries it, naming the aggregate whose state it views by its qualified name, context.aggregate; so Queries.snapshots of the view finds the aggregate type, in process and over HTTP alike. A view is of one aggregate.

A view holds the state's fields, those the producer requires as non-null and the others nullable, and reads a state with fields it does not know: a field the producer adds later breaks no reader.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard