T
- The type of the aggregate rootpublic interface AggregateModel<T> extends EntityModel<T>
T
.Modifier and Type | Method and Description |
---|---|
default Optional<String> |
declaredType(Class<?> type)
Gets the declared aggregate type based on given class
type . |
Long |
getVersion(T target)
Get the current version number of the given
aggregate . |
String |
type()
Get the String representation of the modeled aggregate's type.
|
default Optional<Class<?>> |
type(String declaredType)
Gets the aggregate class based on given
declaredType . |
default Stream<Class<?>> |
types()
Gets all types (concrete aggregate classes) of this aggregate.
|
allCommandHandlerInterceptors, allCommandHandlers, allEventHandlers, commandHandlerInterceptors, commandHandlerInterceptors, commandHandlers, commandHandlers, entityClass, getIdentifier, modelOf, publish, routingKey
String type()
Long getVersion(T target)
aggregate
. For event sourced aggregates this is identical to
the sequence number of the last applied event.target
- The target aggregate root instancedefault Optional<Class<?>> type(String declaredType)
declaredType
.declaredType
- the declared type of aggregate represented by String
declaredType
, if existsdefault Optional<String> declaredType(Class<?> type)
type
.type
- the type of the aggregateString
, if existsCopyright © 2010–2023. All rights reserved.