Annotation Interface Alias
Annotation used on properties of an entity value that provide an alternative identifier to find the entity.
Finding an entity by alias is used both when looking for a child entity via Entity.getEntity(java.lang.Object)
, and when
loading an entity (or aggregate) by entity id, e.g. using FluxCapacitor.loadAggregateFor(java.lang.Object, java.lang.Class<?>)
.
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.
-
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:
""
-