AccessValues

An aggregate's access attributes as every record stores them (a stream, a snapshot, a published state event): by name, a single attribute's value or null, a multiple one's values as a list, sorted and distinct; each value a String (an enum by its JSON name), a Long or a Boolean. A record has this one form whatever wrote or read it, so two records hold the same attributes exactly when their maps are equal.

A stream's attributes, and a published state event's, also hold the built-in ones, OWNER and SPACE, from the scope after the commit: they follow a transfer as the declared ones follow the state. A snapshot's hold the declared ones only; its owner and space are fields of their own.

Properties

Link copied to clipboard
const val OWNER: String

The built-in attribute of the aggregate's owner.

Link copied to clipboard
const val SPACE: String

The built-in attribute of the aggregate's space.

Functions

Link copied to clipboard
fun declared(access: Map<String, Any?>): Map<String, Any?>

access without the built-in attributes: what a snapshot keeps.

Link copied to clipboard
fun json(access: Map<String, Any?>): ObjectNode

access as a JSON object.

Link copied to clipboard
fun normalized(values: Map<String, *>): Map<String, Any?>

values, attributes a store's driver decoded (a number of any integral class, a collection of values), in this form.

Link copied to clipboard
fun of(node: JsonNode?): Map<String, Any?>?

The attributes node, a JSON object of them, holds, in this form: an integral number as a Long, an array as its distinct values in order; null when node is absent or JSON null.

Link copied to clipboard
fun ofStream(declared: Map<String, Any?>, scope: Scope): Map<String, Any?>

The attributes of a stream: the built-in ones of scope, then declared, the declared ones in this form; what a commit records, and what a stamp writes over the earlier streams.

Link copied to clipboard
fun parse(text: String?): Map<String, Any?>?

The attributes text, the JSON text of an object of them, holds; null for null text.

Link copied to clipboard
fun text(access: Map<String, Any?>): String

access as JSON text.