T
- The type of entity described by this modelpublic interface EntityModel<T>
T
. The
entity may be child entity or an aggregate root.Modifier and Type | Method and Description |
---|---|
List<MessageHandlingMember<? super T>> |
commandHandlerInterceptors()
Gets a list of command handler interceptors for this entity.
|
List<MessageHandlingMember<? super T>> |
commandHandlers()
Get a mapping of
MessageHandlingMember to command name (obtained via CommandMessage.getCommandName() ). |
Class<? extends T> |
entityClass()
Returns the class this model describes
|
Object |
getIdentifier(T target)
Get the identifier of the given
target entity. |
<C> EntityModel<C> |
modelOf(Class<? extends C> childEntityType)
Get the EntityModel of an entity of type
childEntityType in case it is the child of the modeled entity. |
void |
publish(EventMessage<?> message,
T target)
Publish given event
message on the given target entity. |
String |
routingKey()
Get the name of the routing key property on commands and events that provides the identifier that should be used
to target entities of this kind.
|
Object getIdentifier(T target)
target
entity.target
- The entity instanceString routingKey()
void publish(EventMessage<?> message, T target)
message
on the given target
entity.message
- The event message to publishtarget
- The target entity for the eventList<MessageHandlingMember<? super T>> commandHandlers()
MessageHandlingMember
to command name (obtained via CommandMessage.getCommandName()
).List<MessageHandlingMember<? super T>> commandHandlerInterceptors()
<C> EntityModel<C> modelOf(Class<? extends C> childEntityType)
childEntityType
in case it is the child of the modeled entity.C
- the type of the child entitychildEntityType
- The class instance of the child entity typeCopyright © 2010–2018. All rights reserved.