Annotation Interface Query


@Retention(RUNTIME) @Target({TYPE,ANNOTATION_TYPE}) public @interface Query
Annotation used to mark an object as a query.

Allows for specifying the business/domain name() of the query and the version() of the query. The fields are used to map an annotated-query to a QueryMessage.

Since:
5.0.0
Author:
Steven van Beelen
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The business or domain name of the query.
    The namespace or (bounded) context of the query.
    The version of the query.
  • Element Details

    • namespace

      String namespace
      The namespace or (bounded) context of the query.

      Is used to define the QualifiedName.namespace() of a fully qualified name.

      Defaults to the package name of the annotated class.

      Returns:
      The namespace or (bounded) context of the query.
      Default:
      ""
    • name

      String name
      The business or domain name of the query.

      Is used to define the QualifiedName.localName() of a fully qualified name.

      Defaults to the simple name of the annotated class. Note that when an inner class is annotated, the simple name does not include the names of the enclosing classes.

      Returns:
      The business or domain name of the query.
      Default:
      ""
    • version

      String version
      The version of the query.

      Will typically be mapped to the MessageType.version(). Defaults to MessageType.DEFAULT_VERSION.

      Returns:
      The version of the query.
      Default:
      "0.0.1"