Annotation Interface AggregateRoot


@Documented @Target({TYPE,ANNOTATION_TYPE}) @Retention(RUNTIME) public @interface AggregateRoot
Annotation placed on types that should be treated as the root of an aggregate. Such types will be the entry point for command messages that target the aggregate.

The use of this annotation is not mandatory for the framework. It allows setting an explicit type name for the Aggregate. Other than that, it's probably useful for developers.

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Get the String representation of the aggregate's type.
  • Element Details

    • type

      String type
      Get the String representation of the aggregate's type. Optional. This defaults to the simple name of the annotated class.
      Default:
      ""