Annotation Type DtoOf


  • @Documented
    @Retention(RUNTIME)
    @Target({TYPE,ANNOTATION_TYPE})
    public @interface DtoOf
    This annotation allows to declare a relation between a class acting as DTO and the aggregate (or tuple of aggregates) it represents. It is only required by the business framework if you don't have an explicit Assembler implementation for the types involved, as it allows it to generate a default generic implementation.

    Usage:

     @DtoOf(Customer.class)
      public class CustomerDto {
          ...
      }
     

    Depending upon the assembler default implementation(s) present in the classpath, a generic assembler can be injected with a qualified Assembler interface:

     public class SomeClass {
        @Inject
        @SomeQualifier
         Assembler<Customer, CustomerDto> customerAssembler;
     }
     
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      Class<? extends AggregateRoot<?>>[] value  
    • Element Detail

      • value

        Class<? extends AggregateRoot<?>>[] value
        Returns:
        the aggregate classes needed to assemble this dto