Annotation Interface Alias
Aliases are used when looking for an embedded entity via Entity.getEntity(Object), when resolving a legacy aggregate
through Fluxzero.loadAggregateFor(Object, Class), and when loading an independent model through
Fluxzero.loadModel(Object).
You can annotate fields and property methods. If a property value is a collection the members of the collection are
all added as aliases of the entity. If the property value is null or an empty collection the alias is
ignored.
On an independently stored Model, the complete current alias set is replaced atomically with each model
transition. A changed or deleted alias therefore stops resolving after that commit. Such aliases identify a model
globally and must be unique across independently stored models. A primary model ID takes precedence over an equal
alias. Aliases which are intentionally local to one aggregate tree should not be exposed as independent-model
aliases.
-
Optional Element Summary
Optional Elements
-
Element Details
-
prefix
String prefixAdds given string as a prefix to the alias (if the property value is non-null). Useful to prevent clashes with other entity ids.- Default:
""
-
postfix
String postfixAdds given string as a postfix to the alias (if the property value is non-null). Useful to prevent clashes with other entity ids.- Default:
""
-