Interface AggregateModel<T>
- Type Parameters:
T- The type of the aggregate root
- All Superinterfaces:
EntityModel<T>
Specialized EntityModel that describes the capabilities and properties of an aggregate root of type
T.-
Method Summary
Modifier and TypeMethodDescriptiondeclaredType(Class<?> type) Gets the declared aggregate type based on given classtype.getVersion(T target) Get the current version number of the givenaggregate.type()Get the String representation of the modeled aggregate's type.Gets the aggregate class based on givendeclaredType.types()Gets all types (concrete aggregate classes) of this aggregate.Methods inherited from interface org.axonframework.modelling.command.inspection.EntityModel
allCommandHandlerInterceptors, allCommandHandlers, allEventHandlers, commandHandlerInterceptors, commandHandlerInterceptors, commandHandlers, commandHandlers, entityClass, getIdentifier, modelOf, publish, routingKey
-
Method Details
-
type
String type()Get the String representation of the modeled aggregate's type. This defaults to the simple name of the aggregate's type.- Returns:
- The type of the aggregate
-
getVersion
Get the current version number of the givenaggregate. For event sourced aggregates this is identical to the sequence number of the last applied event.- Parameters:
target- The target aggregate root instance- Returns:
- The current version of the aggregate
-
type
Gets the aggregate class based on givendeclaredType.- Parameters:
declaredType- the declared type of aggregate represented byString- Returns:
- the concrete aggregate class based on
declaredType, if exists
-
declaredType
Gets the declared aggregate type based on given classtype.- Parameters:
type- the type of the aggregate- Returns:
- the declared aggregate type represented by
String, if exists
-
types
Gets all types (concrete aggregate classes) of this aggregate.- Returns:
- all types (concrete aggregate classes) of this aggregate
-