Search in sources :

Example 1 with DtDefinitionModel

use of io.vertigo.studio.plugins.mda.domain.java.model.DtDefinitionModel in project vertigo by KleeGroup.

the class DomainGeneratorPlugin method generateDtObject.

private void generateDtObject(final FileGeneratorConfig fileGeneratorConfig, final MdaResultBuilder mdaResultBuilder, final DtDefinition dtDefinition) {
    final DtDefinitionModel dtDefinitionModel = new DtDefinitionModel(dtDefinition);
    final Map<String, Object> model = new MapBuilder<String, Object>().put("dtDefinition", dtDefinitionModel).put("annotations", new MethodAnnotationsModel(shouldGenerateJpaAnnotations)).build();
    FileGenerator.builder(fileGeneratorConfig).withModel(model).withFileName(dtDefinitionModel.getClassSimpleName() + ".java").withGenSubDir(targetSubDir).withPackageName(dtDefinitionModel.getPackageName()).withTemplateName("domain/java/template/dto.ftl").build().generateFile(mdaResultBuilder);
}
Also used : MethodAnnotationsModel(io.vertigo.studio.plugins.mda.domain.java.model.MethodAnnotationsModel) DtDefinitionModel(io.vertigo.studio.plugins.mda.domain.java.model.DtDefinitionModel)

Aggregations

DtDefinitionModel (io.vertigo.studio.plugins.mda.domain.java.model.DtDefinitionModel)1 MethodAnnotationsModel (io.vertigo.studio.plugins.mda.domain.java.model.MethodAnnotationsModel)1