Class RoutingKeyUtils
java.lang.Object
org.axonframework.modelling.entity.annotation.RoutingKeyUtils
Utility class for retrieving routing keys from entity members and child entities.
- Since:
- 5.0.0
- Author:
- Mitchell Herrijgers
-
Method Summary
Modifier and TypeMethodDescriptiongetEntityRoutingKey(Class<?> childEntityClass) Retrieves the routing key property for the given child entity class, which is defined by theRoutingKeyannotation on one of its fields.getMessageRoutingKey(AnnotatedElement member) Retrieves the routing key for the given member, which is defined by theEntityMember.routingKey()annotation.
-
Method Details
-
getMessageRoutingKey
Retrieves the routing key for the given member, which is defined by theEntityMember.routingKey()annotation.- Parameters:
member- The member to retrieve the routing key for.- Returns:
- An
Optionalcontaining the routing key if present, otherwise empty.
-
getEntityRoutingKey
Retrieves the routing key property for the given child entity class, which is defined by theRoutingKeyannotation on one of its fields.- Parameters:
childEntityClass- The class of the child entity to retrieve the routing key property for.- Returns:
- An
Optionalcontaining the name of the routing key property if present, otherwise empty.
-