T
- the target type of the inspectorAggregateMetaModelFactory
implementations@Deprecated public class ModelInspector<T> extends Object implements AggregateModel<T>
T
that creates command and event handlers that delegate to a target entity and
its child entities.Modifier and Type | Method and Description |
---|---|
MessageHandlingMember<? super T> |
commandHandler(String commandName)
Deprecated.
Get the
MessageHandlingMember capable of handling commands with given commandName (see CommandMessage.getCommandName() ). |
List<MessageHandlingMember<? super T>> |
commandHandlerInterceptors()
Deprecated.
Gets a list of command handler interceptors for this entity.
|
Map<String,MessageHandlingMember<? super T>> |
commandHandlers()
Deprecated.
Get a mapping of
MessageHandlingMember to command name (obtained via CommandMessage.getCommandName() ). |
Class<? extends T> |
entityClass()
Deprecated.
Returns the class this model describes
|
Object |
getIdentifier(T target)
Deprecated.
Get the identifier of the given
target entity. |
Long |
getVersion(T target)
Deprecated.
Get the current version number of the given
aggregate . |
static <AT> AggregateModel<AT> |
inspectAggregate(Class<AT> aggregateType)
Deprecated.
Create an inspector for given
aggregateType that uses a ClasspathParameterResolverFactory to
resolve method parameters. |
static <T> AggregateModel<T> |
inspectAggregate(Class<T> aggregateType,
ParameterResolverFactory parameterResolverFactory)
Deprecated.
Create an inspector for given
aggregateType that uses given parameterResolverFactory to resolve
method parameters. |
<C> EntityModel<C> |
modelOf(Class<? extends C> childEntityType)
Deprecated.
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)
Deprecated.
Publish given event
message on the given target entity. |
String |
routingKey()
Deprecated.
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.
|
String |
type()
Deprecated.
Get the String representation of the modeled aggregate's type.
|
public static <AT> AggregateModel<AT> inspectAggregate(Class<AT> aggregateType)
aggregateType
that uses a ClasspathParameterResolverFactory
to
resolve method parameters.AT
- the aggregate's typeaggregateType
- the target aggregate typepublic static <T> AggregateModel<T> inspectAggregate(Class<T> aggregateType, ParameterResolverFactory parameterResolverFactory)
aggregateType
that uses given parameterResolverFactory
to resolve
method parameters.T
- the aggregate's typeaggregateType
- the target aggregate typeparameterResolverFactory
- the resolver factory to use during detectionpublic String type()
AggregateModel
type
in interface AggregateModel<T>
public Long getVersion(T target)
AggregateModel
aggregate
. For event sourced aggregates this is identical to
the sequence number of the last applied event.getVersion
in interface AggregateModel<T>
target
- The target aggregate root instancepublic List<MessageHandlingMember<? super T>> commandHandlerInterceptors()
EntityModel
commandHandlerInterceptors
in interface EntityModel<T>
public Object getIdentifier(T target)
EntityModel
target
entity.getIdentifier
in interface EntityModel<T>
target
- The entity instancepublic String routingKey()
EntityModel
routingKey
in interface EntityModel<T>
public void publish(EventMessage<?> message, T target)
EntityModel
message
on the given target
entity.publish
in interface EntityModel<T>
message
- The event message to publishtarget
- The target entity for the eventpublic Map<String,MessageHandlingMember<? super T>> commandHandlers()
EntityModel
MessageHandlingMember
to command name (obtained via CommandMessage.getCommandName()
).commandHandlers
in interface EntityModel<T>
public MessageHandlingMember<? super T> commandHandler(String commandName)
EntityModel
MessageHandlingMember
capable of handling commands with given commandName
(see CommandMessage.getCommandName()
). If the entity is not capable of handling
such commands an exception is raised.commandHandler
in interface EntityModel<T>
commandName
- The name of the commandpublic <C> EntityModel<C> modelOf(Class<? extends C> childEntityType)
EntityModel
childEntityType
in case it is the child of the modeled entity.modelOf
in interface EntityModel<T>
C
- the type of the child entitychildEntityType
- The class instance of the child entity typepublic Class<? extends T> entityClass()
EntityModel
entityClass
in interface EntityModel<T>
Copyright © 2010–2018. All rights reserved.