Class DtoGenerator

java.lang.Object
nl.datasteel.crudcraft.codegen.writer.DtoGenerator
All Implemented Interfaces:
Generator

public class DtoGenerator extends Object implements Generator
Generates Request, Response and Ref DTOs honoring @Dto, @Request, @EnumString, @AuditTrail, embedded classes and JPA-relaties.
  • Constructor Details

    • DtoGenerator

      public DtoGenerator()
  • Method Details

    • generate

      public List<com.squareup.javapoet.JavaFile> generate(ModelDescriptor md, WriteContext ctx)
      Generates DTO classes for the given model descriptor. It creates Request, Response, and Ref DTOs based on the fields defined in the model descriptor.
      Specified by:
      generate in interface Generator
      Parameters:
      md - the model descriptor containing metadata about the entity
      ctx - the write context providing environment and utilities
      Returns:
      a list of JavaFile objects representing the generated DTO classes
    • order

      public int order()
      Description copied from interface: Generator
      Determines the execution order within the generator group (basic or CRUD). Lower values run first.
      Specified by:
      order in interface Generator
      Returns:
      the order value of this generator