From 5218cc9405c93ab1f0e7a7db57ab12022eb976d8 Mon Sep 17 00:00:00 2001 From: "Matteo Franci a.k.a. Fugerit" Date: Thu, 14 Nov 2024 18:54:53 +0100 Subject: [PATCH] Added generator for microprofile openapi schema #96 Added attribute : 'package-helper-microprofile' To daogen-config Added attribute : 'exampleData' To field And relevant implementation --- CHANGELOG.md | 6 +- .../base/config/DaogenCatalogConstants.java | 7 + .../base/config/DaogenCatalogField.java | 15 +- .../daogen/base/gen/DaogenBasicGenerator.java | 21 ++- .../MicroProfileSchemaWrapperGenerator.java | 58 ++++++++ .../daogen/base/gen/WrapperGenerator.java | 112 +-------------- .../daogen/base/gen/util/WrapperUtils.java | 136 ++++++++++++++++++ .../resources/config/daogen-config-1-0.xsd | 22 ++- .../config/default-generator-catalog.xml | 3 + .../daogenruntest-sample-daogen-config.xml | 3 +- fj-daogen-sample/pom.xml | 6 + .../daogen/fugerit-sample-daogen-config.xml | 8 +- .../sample/def/facade/AddressFinder.java | 18 +-- .../sample/def/facade/LogDataFinder.java | 18 +-- .../def/facade/TestTwoFieldKeyFinder.java | 18 +-- .../sample/def/facade/UploadFinder.java | 18 +-- .../sample/def/facade/UserDataFinder.java | 18 +-- .../daogen/sample/def/facade/UserFinder.java | 18 +-- .../daogen/sample/def/model/ModelAddress.java | 8 +- .../daogen/sample/def/model/ModelLogData.java | 4 +- .../daogen/sample/def/model/ModelUpload.java | 8 +- .../daogen/sample/def/model/ModelUser.java | 12 +- .../sample/def/model/ModelUserData.java | 12 +- .../sample/impl/helper/HelperAddress.java | 29 +--- .../sample/impl/helper/HelperLogData.java | 23 +-- .../impl/helper/HelperTestTwoFieldKey.java | 17 +-- .../sample/impl/helper/HelperUpload.java | 29 +--- .../daogen/sample/impl/helper/HelperUser.java | 35 ++--- .../sample/impl/helper/HelperUserData.java | 35 ++--- .../sample/impl/helper/WrapperAddress.java | 26 +--- .../sample/impl/helper/WrapperLogData.java | 22 +-- .../impl/helper/WrapperTestTwoFieldKey.java | 18 +-- .../sample/impl/helper/WrapperUpload.java | 26 +--- .../sample/impl/helper/WrapperUser.java | 30 ++-- .../sample/impl/helper/WrapperUserData.java | 30 ++-- .../daogen/sample/impl/rse/AddressRSE.java | 4 +- .../daogen/sample/impl/rse/LogDataRSE.java | 2 +- .../daogen/sample/impl/rse/UploadRSE.java | 4 +- .../daogen/sample/impl/rse/UserDataRSE.java | 6 +- .../java/daogen/sample/impl/rse/UserRSE.java | 6 +- .../daogen/sample/impl/struct/ObjAddress.java | 8 +- .../daogen/sample/impl/struct/ObjLogData.java | 4 +- .../daogen/sample/impl/struct/ObjUpload.java | 8 +- .../daogen/sample/impl/struct/ObjUser.java | 12 +- .../sample/impl/struct/ObjUserData.java | 12 +- .../model/AddressJunit4ModelTest.java | 5 +- .../model/LogDataJunit4ModelTest.java | 3 +- .../model/TestTwoFieldKeyJunit4ModelTest.java | 1 - .../model/UploadJunit4ModelTest.java | 5 +- .../model/UserDataJunit4ModelTest.java | 7 +- .../junit4test/model/UserJunit4ModelTest.java | 7 +- src/docs/config/daogen-config-xsd-ref.html | 134 +++++++++-------- 52 files changed, 502 insertions(+), 595 deletions(-) create mode 100644 fj-daogen-base/src/main/java/org/fugerit/java/daogen/base/gen/MicroProfileSchemaWrapperGenerator.java create mode 100644 fj-daogen-base/src/main/java/org/fugerit/java/daogen/base/gen/util/WrapperUtils.java diff --git a/CHANGELOG.md b/CHANGELOG.md index e0c6700a..f53897ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,10 +5,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [1.8.4] - 2024-11-10 +### Added + +- package-helper-microprofile, to add model wrapper with openapi annotation. ### Fixed +## [1.8.4] - 2024-11-10 + - use of LocalDateTime.now() in data facade when 'type-mapper-time-ng' is enabled ## [1.8.3] - 2024-11-09 diff --git a/fj-daogen-base/src/main/java/org/fugerit/java/daogen/base/config/DaogenCatalogConstants.java b/fj-daogen-base/src/main/java/org/fugerit/java/daogen/base/config/DaogenCatalogConstants.java index ce1cee41..ca3b41b3 100644 --- a/fj-daogen-base/src/main/java/org/fugerit/java/daogen/base/config/DaogenCatalogConstants.java +++ b/fj-daogen-base/src/main/java/org/fugerit/java/daogen/base/config/DaogenCatalogConstants.java @@ -44,6 +44,7 @@ private DaogenCatalogConstants() {} public static final String GEN_PROP_PACKAGE_MODEL = "package-model"; public static final String GEN_PROP_PACKAGE_HELPER = "package-helper"; + public static final String GEN_PROP_PACKAGE_HELPER_MICROPROFILE = "package-helper-microprofile"; public static final String GEN_PROP_PACKAGE_FACADE_DEF = "package-facade-def"; public static final String GEN_PROP_PACKAGE_FACADE_DATA_IMPL = "package-facade-data-impl"; public static final String GEN_PROP_PACKAGE_RSE = "package-rse"; @@ -111,6 +112,8 @@ private DaogenCatalogConstants() {} public static final String PREFIX_HELPER = "Helper"; public static final String PREFIX_WRAPPER = "Wrapper"; + + public static final String PREFIX_MPSCHEMA = "MPSchema"; public static final String PREFIX_RESTLOAD = "Load"; @@ -149,6 +152,10 @@ public static String rseName( DaogenCatalogEntity entity ) { public static String wrapperName( DaogenCatalogEntity entity ) { return PREFIX_WRAPPER+entity.toClassName(); } + + public static String mpSchemaName( DaogenCatalogEntity entity ) { + return PREFIX_MPSCHEMA+entity.toClassName(); + } public static String finderlName( DaogenCatalogEntity entity ) { return entity.toClassName()+SUFFIX_FINDER; diff --git a/fj-daogen-base/src/main/java/org/fugerit/java/daogen/base/config/DaogenCatalogField.java b/fj-daogen-base/src/main/java/org/fugerit/java/daogen/base/config/DaogenCatalogField.java index 77a96dba..7ad6c935 100644 --- a/fj-daogen-base/src/main/java/org/fugerit/java/daogen/base/config/DaogenCatalogField.java +++ b/fj-daogen-base/src/main/java/org/fugerit/java/daogen/base/config/DaogenCatalogField.java @@ -18,8 +18,9 @@ public class DaogenCatalogField extends BasicIdConfigType { public static final String ATT_COMMENTS = "comments"; public static final String ATT_UDT = "udt"; public static final String ATT_STRUCT_TYPE = "structType"; - + public static final String ATT_STRUCT_SQL_TYPE = "structSqlType="; public static final String ATT_VIRTUAL = "virtual"; + public static final String ATT_EXAMPLE_DATA = "exampleData"; /** * @@ -48,6 +49,8 @@ public class DaogenCatalogField extends BasicIdConfigType { private String virtual; + private String exampleData; + public boolean isUserType() { return BooleanUtils.isTrue( this.getUdt() ); } @@ -140,6 +143,15 @@ public void setVirtual(String virtual) { this.virtual = virtual; } + public String getExampleData() { + return exampleData; + } + + public void setExampleData(String exampleData) { + this.exampleData = exampleData; + } + + public String describe() { List list = new ArrayList<>(); list.add( StringUtils.concat( ":" , ATT_SQL_TYPE, this.getSqlType() ) ); @@ -151,6 +163,7 @@ public String describe() { list.add( StringUtils.concat( ":" , ATT_UDT, this.getUdt() ) ); list.add( StringUtils.concat( ":" , ATT_STRUCT_TYPE, this.getStructType() ) ); list.add( StringUtils.concat( ":" , ATT_VIRTUAL, this.getVirtual() ) ); + list.add( StringUtils.concat( ":" , ATT_EXAMPLE_DATA, this.getExampleData() ) ); return StringUtils.concat( ",", list ); } diff --git a/fj-daogen-base/src/main/java/org/fugerit/java/daogen/base/gen/DaogenBasicGenerator.java b/fj-daogen-base/src/main/java/org/fugerit/java/daogen/base/gen/DaogenBasicGenerator.java index 81097f99..b9f32c97 100644 --- a/fj-daogen-base/src/main/java/org/fugerit/java/daogen/base/gen/DaogenBasicGenerator.java +++ b/fj-daogen-base/src/main/java/org/fugerit/java/daogen/base/gen/DaogenBasicGenerator.java @@ -35,7 +35,7 @@ public abstract class DaogenBasicGenerator extends SimpleJavaGenerator implement protected static final String CLOSE_AND_THROWS = " ) throws "; - protected static final String AT_OVERRIDE = "@Override"; + public static final String AT_OVERRIDE = "@Override"; protected static final String REAL_CLASS_COMMENT = TAB+"// [HELPER/IMPL MODEL] this class is a stub and can be modified as you see fit (it will not been overwritten)"; @@ -71,7 +71,7 @@ public abstract class DaogenBasicGenerator extends SimpleJavaGenerator implement protected static final String RETURN_RES_LIT = "return res;"; - protected static final String PUBLIC_SPACE_LIT = "public "; + public static final String PUBLIC_SPACE_LIT = "public "; protected static final String PUBLIC_STATIC_SPACE_LIT = "public static "; @@ -162,7 +162,7 @@ protected boolean isJdkVersionEquals( Integer jdkVerson ) { return this.getJdkTargetVersion().intValue() == jdkVerson.intValue(); } - protected boolean isJdkVersionAtLeast( Integer jdkVerson ) { + public boolean isJdkVersionAtLeast( Integer jdkVerson ) { return this.getJdkTargetVersion().intValue() >= jdkVerson.intValue(); } @@ -270,7 +270,7 @@ public String getEntityHelperName() { public String getEntityWrapperName() { return DaogenCatalogConstants.wrapperName( this.getCurrentEntity() ); } - + public String getEntityFacadeDefName() { return DaogenCatalogConstants.facadeDefName( this.getCurrentEntity() ); } @@ -377,7 +377,7 @@ public String getClassBaseWrapper() { return classBaseWrapper; } - protected void setClassBaseWrapper(String classBaseWrapper) { + public void setClassBaseWrapper(String classBaseWrapper) { this.classBaseWrapper = classBaseWrapper; } @@ -472,7 +472,7 @@ protected void beforeClass() { } } - protected void generateSerial( boolean condition ) throws IOException { + public void generateSerial( boolean condition ) throws IOException { if ( condition ) { this.addSerialVerUID(); this.writeSerialHelpers(); @@ -494,4 +494,13 @@ protected void writeSerialHelpers() { this.getWriter().println(); } + @Override + public void setExtendsClass(String extendsClass) { + super.setExtendsClass(extendsClass); + } + + @Override + public void setImplementsInterface(String implementsInterface) { + super.setImplementsInterface(implementsInterface); + } } diff --git a/fj-daogen-base/src/main/java/org/fugerit/java/daogen/base/gen/MicroProfileSchemaWrapperGenerator.java b/fj-daogen-base/src/main/java/org/fugerit/java/daogen/base/gen/MicroProfileSchemaWrapperGenerator.java new file mode 100644 index 00000000..22e1244f --- /dev/null +++ b/fj-daogen-base/src/main/java/org/fugerit/java/daogen/base/gen/MicroProfileSchemaWrapperGenerator.java @@ -0,0 +1,58 @@ +package org.fugerit.java.daogen.base.gen; + +import org.fugerit.java.core.cfg.ConfigException; +import org.fugerit.java.core.db.dao.DAOException; +import org.fugerit.java.core.lang.helpers.StringUtils; +import org.fugerit.java.daogen.base.config.*; +import org.fugerit.java.daogen.base.gen.util.WrapperUtils; + +import java.io.IOException; + +public class MicroProfileSchemaWrapperGenerator extends DaogenBasicGenerator { + + public static final String KEY = "MicroProfileSchemaWrapperGenerator"; + + @Override + public String getKey() { + return KEY; + } + + public void init( DaogenCatalogConfig daogenConfig, DaogenCatalogEntity entity ) throws ConfigException { + super.init( daogenConfig.getGeneralProp( DaogenCatalogConstants.GEN_PROP_SRC_MAIN_JAVA ), + fullObjectName( daogenConfig.getGeneralProp( DaogenCatalogConstants.GEN_PROP_PACKAGE_HELPER_MICROPROFILE ), DaogenCatalogConstants.mpSchemaName( entity ) ), + STYLE_CLASS, daogenConfig, entity ); + this.getImportList().add( "org.eclipse.microprofile.openapi.annotations.media.Schema" ); + WrapperUtils.init( daogenConfig, entity, this ); + new DaogenBasicDecorator() { + @Override + public void addBeforeClass() throws DAOException { + super.addBeforeClass(); + if ( StringUtils.isNotEmpty( entity.getComments() ) ) { + this.accessGenerator().println( String.format( "@Schema( description = \"%s\")" , entity.getComments() ) ); + } + } + }.init( this ); + } + + @Override + public String getEntityWrapperName() { + return DaogenCatalogConstants.mpSchemaName( this.getCurrentEntity() ); + } + + @Override + public void generateDaogenBody() throws IOException { + WrapperUtils.generateBody( this, f -> { + if (StringUtils.isNotEmpty( f.getComments() ) ) { + String base = "@Schema( description = \"%s\" %s)"; + String extra = ""; + if ( StringUtils.isNotEmpty( f.getExampleData() ) ) { + extra = String.format( ", example =\"%s\"", f.getExampleData() ); + } + return String.format( base , f.getComments(), extra ); + } else { + return null; + } + } ); + } + +} diff --git a/fj-daogen-base/src/main/java/org/fugerit/java/daogen/base/gen/WrapperGenerator.java b/fj-daogen-base/src/main/java/org/fugerit/java/daogen/base/gen/WrapperGenerator.java index 6bfcd29d..fd624be0 100644 --- a/fj-daogen-base/src/main/java/org/fugerit/java/daogen/base/gen/WrapperGenerator.java +++ b/fj-daogen-base/src/main/java/org/fugerit/java/daogen/base/gen/WrapperGenerator.java @@ -12,6 +12,7 @@ import org.fugerit.java.daogen.base.config.DaogenCatalogField; import org.fugerit.java.daogen.base.config.DaogenCatalogRelation; import org.fugerit.java.daogen.base.config.DaogenClassConfigHelper; +import org.fugerit.java.daogen.base.gen.util.WrapperUtils; public class WrapperGenerator extends DaogenBasicGenerator { @@ -26,119 +27,12 @@ public void init( DaogenCatalogConfig daogenConfig, DaogenCatalogEntity entity ) super.init( daogenConfig.getGeneralProp( DaogenCatalogConstants.GEN_PROP_SRC_MAIN_JAVA ), fullObjectName( daogenConfig.getGeneralProp( DaogenCatalogConstants.GEN_PROP_PACKAGE_HELPER ), DaogenCatalogConstants.wrapperName( entity ) ), STYLE_CLASS, daogenConfig, entity ); - String daoWrapperNgMode = daogenConfig.getGeneralProp( DaogenCatalogConstants.GEN_PROP_DAO_WRAPPER_NG_MODE, DaogenCatalogConstants.GEN_PROP_DAO_WRAPPER_NG_MODE_DISABLED ); - logger.info( "{} -> {}", DaogenCatalogConstants.GEN_PROP_DAO_WRAPPER_NG_MODE, daoWrapperNgMode ); - if ( DaogenCatalogConstants.GEN_PROP_DAO_WRAPPER_NG_MODE_DISABLED.equalsIgnoreCase( daoWrapperNgMode ) ) { - this.setClassBaseWrapper( DaogenClassConfigHelper.addImport( daogenConfig , DaogenClassConfigHelper.DAO_WRAPPER_BASE, this.getImportList() ) ); - this.setExtendsClass( this.getClassBaseWrapper()+"<"+this.getEntityModelName()+">" ); - } else if ( DaogenCatalogConstants.GEN_PROP_DAO_WRAPPER_NG_MODE_ENABLED.equalsIgnoreCase( daoWrapperNgMode ) ) { - String wrapperNgClass = DaogenClassConfigHelper.findClassConfigProp( daogenConfig, DaogenClassConfigHelper.DAO_WRAPPER_NG_BASE, DaogenClassConfigHelper.DAO_BASE_CLASS ); - if ( StringUtils.isNotEmpty( wrapperNgClass ) ) { - this.setClassBaseWrapper( DaogenClassConfigHelper.addImport( daogenConfig , DaogenClassConfigHelper.DAO_WRAPPER_NG_BASE, this.getImportList() ) ); - this.setExtendsClass( this.getClassBaseWrapper()+"<"+this.getEntityModelName()+">" ); - } - } else { - throw new ConfigException( "Invalid "+DaogenCatalogConstants.GEN_PROP_DAO_WRAPPER_NG_MODE+" parameter : "+daoWrapperNgMode ); - } - this.getImportList().add( this.getDaogenConfig().getGeneralProp( DaogenCatalogConstants.GEN_PROP_PACKAGE_MODEL )+"."+this.getEntityModelName() ); - this.setImplementsInterface( this.getEntityModelName() ); - for ( DaogenCatalogRelation relation : this.getCurrentEntity().getRelations() ) { - DaogenCatalogEntity entityTo = this.getDaogenConfig().getListMap( relation.getTo() ); - this.getImportList().add( this.getDaogenConfig().getGeneralProp( DaogenCatalogConstants.GEN_PROP_PACKAGE_MODEL )+"."+DaogenCatalogConstants.modelName( entityTo ) ); - } - } - - private void generateRelations() { - if ( !this.getCurrentEntity().getRelations().isEmpty() ) { - this.getWriter().println( TAB+"/*" ); - this.getWriter().println( TAB+" * fields generated for relations " ); - this.getWriter().println( TAB+" */" ); - this.getWriter().println(); - for ( DaogenCatalogRelation relation : this.getCurrentEntity().getRelations() ) { - DaogenCatalogEntity entityTo = this.getDaogenConfig().getListMap( relation.getTo() ); - String baseType = DaogenCatalogConstants.modelName( entityTo ); - String className = GeneratorNameHelper.toClassName( relation.getName() ); - if ( DaogenCatalogRelation.MODE_MANY.equalsIgnoreCase( relation.getMode() ) ) { - baseType = "java.util.List<"+baseType+">"; - } - // metodo set - this.getWriter().println( TAB+AT_OVERRIDE ); - this.getWriter().println( TAB+"public void set"+className+"( "+baseType+" value ) {" ); - this.getWriter().println( TAB_2+"this.unwrapModel().set"+className+"( value );" ); - this.getWriter().println( TAB+"}" ); - this.getWriter().println(); - // metodo get - this.getWriter().println( TAB+AT_OVERRIDE ); - this.getWriter().println( TAB+PUBLIC_SPACE_LIT+baseType+" get"+className+"() {" ); - this.getWriter().println( TAB_2+"return this.unwrapModel().get"+className+"();" ); - this.getWriter().println( TAB+"}" ); - this.getWriter().println(); - } - } + WrapperUtils.init( daogenConfig, entity, this ); } @Override public void generateDaogenBody() throws IOException { - String daoWrapperNgMode = this.getDaogenConfig().getGeneralProp( DaogenCatalogConstants.GEN_PROP_DAO_WRAPPER_NG_MODE, DaogenCatalogConstants.GEN_PROP_DAO_WRAPPER_NG_MODE_DISABLED ); - this.generateSerial( DaogenCatalogConstants.GEN_PROP_DAO_WRAPPER_NG_MODE_DISABLED.equalsIgnoreCase( daoWrapperNgMode ) ); - this.getWriter().println( TAB+PUBLIC_SPACE_LIT+this.getEntityWrapperName()+"( "+this.getEntityModelName()+" wrapped ) {" ); - this.getWriter().println( TAB_2+"super( wrapped );" ); - this.getWriter().println( TAB+"}" ); - this.getWriter().println(); - this.getWriter().println( TAB+PUBLIC_SPACE_LIT+this.getEntityModelName()+" unwrap( "+this.getEntityWrapperName()+" wrapper ) {" ); - this.getWriter().println( TAB_2+""+this.getEntityModelName()+" res = wrapper;" ); - if ( this.isJdkVersionAtLeast( DaogenCatalogConstants.GEN_PROP_JDK_TARGET_VERSION_17 ) ) { - this.getWriter().println( TAB_2+"while ( res instanceof "+this.getEntityWrapperName()+" wrappedinstance ) { " ); - this.getWriter().println( TAB_3+"res = wrappedinstance.unwrapModel();" ); - } else { - this.getWriter().println( TAB_2+"while ( res instanceof "+this.getEntityWrapperName()+" ) { " ); - this.getWriter().println( TAB_3+"res = (("+this.getEntityWrapperName()+")res).unwrapModel();" ); - } - this.getWriter().println( TAB_2+"}" ); - this.getWriter().println( TAB_2+"return res;" ); - this.getWriter().println( TAB+"}" ); - this.getWriter().println(); - - boolean relationLast = "true".equalsIgnoreCase( this.getDaogenConfig().getGeneralProp( DaogenCatalogConstants.GEN_PROP_RELATIONS_LAST ) ); - if ( !relationLast ) { - this.generateRelations(); - } - - this.getWriter().println( TAB+"/*" ); - this.getWriter().println( TAB+" * fields generated for entity attributes " ); - this.getWriter().println( TAB+" */" ); - for ( DaogenCatalogField field : this.getCurrentEntity().getAllFields() ) { - // property - String javaSuffix = GeneratorNameHelper.toClassName( field.getId() ); - String realJavaType = this.getDaogenConfig().getTypeMapper().mapForModel( field ); - // metodo set - this.getWriter().println( TAB+AT_OVERRIDE ); - this.getWriter().println( TAB+"public void set"+javaSuffix+"( "+realJavaType+" value ) {" ); - this.getWriter().println( TAB_2+"this.unwrapModel().set"+javaSuffix+"( value );" ); - this.getWriter().println( TAB+"}" ); - this.getWriter().println(); - // metodo get - this.getWriter().println( TAB+AT_OVERRIDE ); - this.getWriter().println( TAB+PUBLIC_SPACE_LIT+realJavaType+" get"+javaSuffix+"() {" ); - this.getWriter().println( TAB_2+"return this.unwrapModel().get"+javaSuffix+"();" ); - this.getWriter().println( TAB+"}" ); - this.getWriter().println(); - } - - if ( relationLast ) { - this.generateRelations(); - } - - if ( BooleanUtils.isTrue( this.getDaogenConfig().getGeneralProp( DaogenCatalogConstants.GEN_PROP_CHECK_EMPTY_INTERFACE ) ) ) { - this.getWriter().println( TAB+AT_OVERRIDE ); - this.getWriter().println( TAB+"public boolean isEmpty() {" ); - this.getWriter().println( TAB_2+"return this.unwrapModel().isEmpty();" ); - this.getWriter().println( TAB+"}" ); - this.getWriter().println(); - } - + WrapperUtils.generateBody( this, f -> null ); } - - } diff --git a/fj-daogen-base/src/main/java/org/fugerit/java/daogen/base/gen/util/WrapperUtils.java b/fj-daogen-base/src/main/java/org/fugerit/java/daogen/base/gen/util/WrapperUtils.java new file mode 100644 index 00000000..c834d924 --- /dev/null +++ b/fj-daogen-base/src/main/java/org/fugerit/java/daogen/base/gen/util/WrapperUtils.java @@ -0,0 +1,136 @@ +package org.fugerit.java.daogen.base.gen.util; + +import lombok.extern.slf4j.Slf4j; +import org.fugerit.java.core.cfg.ConfigException; +import org.fugerit.java.core.javagen.GeneratorNameHelper; +import org.fugerit.java.core.lang.helpers.BooleanUtils; +import org.fugerit.java.core.lang.helpers.StringUtils; +import org.fugerit.java.daogen.base.config.*; +import org.fugerit.java.daogen.base.gen.DaogenBasicGenerator; + +import java.io.IOException; +import java.util.function.Consumer; +import java.util.function.Function; + +@Slf4j +public class WrapperUtils { + + private WrapperUtils() {} + + public static void init(DaogenCatalogConfig daogenConfig, DaogenCatalogEntity entity, DaogenBasicGenerator gen ) throws ConfigException { + String daoWrapperNgMode = daogenConfig.getGeneralProp( DaogenCatalogConstants.GEN_PROP_DAO_WRAPPER_NG_MODE, DaogenCatalogConstants.GEN_PROP_DAO_WRAPPER_NG_MODE_DISABLED ); + log.info( "{} -> {}", DaogenCatalogConstants.GEN_PROP_DAO_WRAPPER_NG_MODE, daoWrapperNgMode ); + if ( DaogenCatalogConstants.GEN_PROP_DAO_WRAPPER_NG_MODE_DISABLED.equalsIgnoreCase( daoWrapperNgMode ) ) { + gen.setClassBaseWrapper( DaogenClassConfigHelper.addImport( daogenConfig , DaogenClassConfigHelper.DAO_WRAPPER_BASE, gen.getImportList() ) ); + gen.setExtendsClass( gen.getClassBaseWrapper()+"<"+gen.getEntityModelName()+">" ); + } else if ( DaogenCatalogConstants.GEN_PROP_DAO_WRAPPER_NG_MODE_ENABLED.equalsIgnoreCase( daoWrapperNgMode ) ) { + String wrapperNgClass = DaogenClassConfigHelper.findClassConfigProp( daogenConfig, DaogenClassConfigHelper.DAO_WRAPPER_NG_BASE, DaogenClassConfigHelper.DAO_BASE_CLASS ); + if ( StringUtils.isNotEmpty( wrapperNgClass ) ) { + gen.setClassBaseWrapper( DaogenClassConfigHelper.addImport( daogenConfig , DaogenClassConfigHelper.DAO_WRAPPER_NG_BASE, gen.getImportList() ) ); + gen.setExtendsClass( gen.getClassBaseWrapper()+"<"+gen.getEntityModelName()+">" ); + } + } else { + throw new ConfigException( "Invalid "+DaogenCatalogConstants.GEN_PROP_DAO_WRAPPER_NG_MODE+" parameter : "+daoWrapperNgMode ); + } + gen.getImportList().add( gen.getDaogenConfig().getGeneralProp( DaogenCatalogConstants.GEN_PROP_PACKAGE_MODEL )+"."+gen.getEntityModelName() ); + gen.setImplementsInterface( gen.getEntityModelName() ); + for ( DaogenCatalogRelation relation : gen.getCurrentEntity().getRelations() ) { + DaogenCatalogEntity entityTo = gen.getDaogenConfig().getListMap( relation.getTo() ); + gen.getImportList().add( gen.getDaogenConfig().getGeneralProp( DaogenCatalogConstants.GEN_PROP_PACKAGE_MODEL )+"."+DaogenCatalogConstants.modelName( entityTo ) ); + } + } + + public static void generateRelations(DaogenBasicGenerator gen ) { + if ( !gen.getCurrentEntity().getRelations().isEmpty() ) { + gen.getWriter().println( DaogenBasicGenerator.TAB+"/*" ); + gen.getWriter().println( DaogenBasicGenerator.TAB+" * fields generated for relations " ); + gen.getWriter().println( DaogenBasicGenerator.TAB+" */" ); + gen.getWriter().println(); + for ( DaogenCatalogRelation relation : gen.getCurrentEntity().getRelations() ) { + DaogenCatalogEntity entityTo = gen.getDaogenConfig().getListMap( relation.getTo() ); + String baseType = DaogenCatalogConstants.modelName( entityTo ); + String className = GeneratorNameHelper.toClassName( relation.getName() ); + if ( DaogenCatalogRelation.MODE_MANY.equalsIgnoreCase( relation.getMode() ) ) { + baseType = "java.util.List<"+baseType+">"; + } + // metodo set + gen.getWriter().println( DaogenBasicGenerator.TAB+DaogenBasicGenerator.AT_OVERRIDE ); + gen.getWriter().println( DaogenBasicGenerator.TAB+"public void set"+className+"( "+baseType+" value ) {" ); + gen.getWriter().println( DaogenBasicGenerator.TAB_2+"this.unwrapModel().set"+className+"( value );" ); + gen.getWriter().println( DaogenBasicGenerator.TAB+"}" ); + gen.getWriter().println(); + // metodo get + gen.getWriter().println( DaogenBasicGenerator.TAB+DaogenBasicGenerator.AT_OVERRIDE ); + gen.getWriter().println( DaogenBasicGenerator.TAB+DaogenBasicGenerator.PUBLIC_SPACE_LIT+baseType+" get"+className+"() {" ); + gen.getWriter().println( DaogenBasicGenerator.TAB_2+"return this.unwrapModel().get"+className+"();" ); + gen.getWriter().println( DaogenBasicGenerator.TAB+"}" ); + gen.getWriter().println(); + } + } + } + + public static void generateBody( DaogenBasicGenerator gen, Function getterDecorator ) throws IOException { + String daoWrapperNgMode = gen.getDaogenConfig().getGeneralProp( DaogenCatalogConstants.GEN_PROP_DAO_WRAPPER_NG_MODE, DaogenCatalogConstants.GEN_PROP_DAO_WRAPPER_NG_MODE_DISABLED ); + gen.generateSerial( DaogenCatalogConstants.GEN_PROP_DAO_WRAPPER_NG_MODE_DISABLED.equalsIgnoreCase( daoWrapperNgMode ) ); + gen.getWriter().println( DaogenBasicGenerator.TAB+DaogenBasicGenerator.PUBLIC_SPACE_LIT+gen.getEntityWrapperName()+"( "+gen.getEntityModelName()+" wrapped ) {" ); + gen.getWriter().println( DaogenBasicGenerator.TAB_2+"super( wrapped );" ); + gen.getWriter().println( DaogenBasicGenerator.TAB+"}" ); + gen.getWriter().println(); + gen.getWriter().println( DaogenBasicGenerator.TAB+DaogenBasicGenerator.PUBLIC_SPACE_LIT+gen.getEntityModelName()+" unwrap( "+gen.getEntityWrapperName()+" wrapper ) {" ); + gen.getWriter().println( DaogenBasicGenerator.TAB_2+""+gen.getEntityModelName()+" res = wrapper;" ); + if ( gen.isJdkVersionAtLeast( DaogenCatalogConstants.GEN_PROP_JDK_TARGET_VERSION_17 ) ) { + gen.getWriter().println( DaogenBasicGenerator.TAB_2+"while ( res instanceof "+gen.getEntityWrapperName()+" wrappedinstance ) { " ); + gen.getWriter().println( DaogenBasicGenerator.TAB_3+"res = wrappedinstance.unwrapModel();" ); + } else { + gen.getWriter().println( DaogenBasicGenerator.TAB_2+"while ( res instanceof "+gen.getEntityWrapperName()+" ) { " ); + gen.getWriter().println( DaogenBasicGenerator.TAB_3+"res = (("+gen.getEntityWrapperName()+")res).unwrapModel();" ); + } + gen.getWriter().println( DaogenBasicGenerator.TAB_2+"}" ); + gen.getWriter().println( DaogenBasicGenerator.TAB_2+"return res;" ); + gen.getWriter().println( DaogenBasicGenerator.TAB+"}" ); + gen.getWriter().println(); + + boolean relationLast = "true".equalsIgnoreCase( gen.getDaogenConfig().getGeneralProp( DaogenCatalogConstants.GEN_PROP_RELATIONS_LAST ) ); + if ( !relationLast ) { + generateRelations( gen ); + } + + gen.getWriter().println( DaogenBasicGenerator.TAB+"/*" ); + gen.getWriter().println( DaogenBasicGenerator.TAB+" * fields generated for entity attributes " ); + gen.getWriter().println( DaogenBasicGenerator.TAB+" */" ); + for ( DaogenCatalogField field : gen.getCurrentEntity().getAllFields() ) { + // property + String javaSuffix = GeneratorNameHelper.toClassName( field.getId() ); + String realJavaType = gen.getDaogenConfig().getTypeMapper().mapForModel( field ); + // metodo set + gen.getWriter().println( DaogenBasicGenerator.TAB+DaogenBasicGenerator.AT_OVERRIDE ); + gen.getWriter().println( DaogenBasicGenerator.TAB+"public void set"+javaSuffix+"( "+realJavaType+" value ) {" ); + gen.getWriter().println( DaogenBasicGenerator.TAB_2+"this.unwrapModel().set"+javaSuffix+"( value );" ); + gen.getWriter().println( DaogenBasicGenerator.TAB+"}" ); + gen.getWriter().println(); + // metodo get + String decorateGet = getterDecorator.apply( field ); + if ( StringUtils.isNotEmpty( decorateGet ) ) { + gen.getWriter().println( DaogenBasicGenerator.TAB+decorateGet ); + } + gen.getWriter().println( DaogenBasicGenerator.TAB+DaogenBasicGenerator.AT_OVERRIDE ); + gen.getWriter().println( DaogenBasicGenerator.TAB+DaogenBasicGenerator.PUBLIC_SPACE_LIT+realJavaType+" get"+javaSuffix+"() {" ); + gen.getWriter().println( DaogenBasicGenerator.TAB_2+"return this.unwrapModel().get"+javaSuffix+"();" ); + gen.getWriter().println( DaogenBasicGenerator.TAB+"}" ); + gen.getWriter().println(); + } + + if ( relationLast ) { + generateRelations( gen ); + } + + if ( BooleanUtils.isTrue( gen.getDaogenConfig().getGeneralProp( DaogenCatalogConstants.GEN_PROP_CHECK_EMPTY_INTERFACE ) ) ) { + gen.getWriter().println( DaogenBasicGenerator.TAB+DaogenBasicGenerator.AT_OVERRIDE ); + gen.getWriter().println( DaogenBasicGenerator.TAB+"public boolean isEmpty() {" ); + gen.getWriter().println( DaogenBasicGenerator.TAB_2+"return this.unwrapModel().isEmpty();" ); + gen.getWriter().println( DaogenBasicGenerator.TAB+"}" ); + gen.getWriter().println(); + } + } + +} diff --git a/fj-daogen-base/src/main/resources/config/daogen-config-1-0.xsd b/fj-daogen-base/src/main/resources/config/daogen-config-1-0.xsd index c88c01f7..366828b5 100644 --- a/fj-daogen-base/src/main/resources/config/daogen-config-1-0.xsd +++ b/fj-daogen-base/src/main/resources/config/daogen-config-1-0.xsd @@ -6,7 +6,7 @@ * * @project : fj-daogen * @creation : 2020-11-12 - * @version : 1.0.0-rc.9 (2024-11-09) + * @version : 1.0.0-rc.10 (2024-11-14) * * XSD for fugerit daogen configuration */ @@ -118,7 +118,7 @@ The entry point for daogen-config documentation is : https://marsdocs.fugerit.or - The type mapper config. It will be default to 'cl://config/daogen_default_type_mapping.xml'. + The type mapper config. It will default to 'cl://config/daogen_default_type_mapping.xml'. It is usually safe to keep the default. @@ -156,14 +156,21 @@ The entry point for daogen-config documentation is : https://marsdocs.fugerit.or The package to be used for model interfaces, for each entity. (e.g. 'org.fugerit.java.daogen.sample.def.model'). - The relevant generators and decorators will only by run if this property is set. + The relevant generators and decorators will only run if this property is set. The package to be used for basic model implementation classes, for each entity. (e.g. 'org.fugerit.java.daogen.sample.impl.helper'). - The relevant generators and decorators will only by run if this property is set. + The relevant generators and decorators will only run if this property is set. + + + + + The package to be used model helper on miprofile specification. + (e.g. 'org.fugerit.java.daogen.sample.impl.helper' or 'org.fugerit.java.daogen.sample.impl.microprofile'). + The relevant generators and decorators will only run if this property is set. @@ -565,6 +572,13 @@ The entry point for daogen-config documentation is : https://marsdocs.fugerit.or Virtual ('true') field will be included in model, but not in persistente (i.e. CRUD) operations. + + + Example data for the field. + (e.g. '123') + It will be used by all relevant generators. (for instance MicroProfileSchemaWrapperGenerator) + + \ No newline at end of file diff --git a/fj-daogen-base/src/main/resources/config/default-generator-catalog.xml b/fj-daogen-base/src/main/resources/config/default-generator-catalog.xml index 8a31f7ff..d2087997 100644 --- a/fj-daogen-base/src/main/resources/config/default-generator-catalog.xml +++ b/fj-daogen-base/src/main/resources/config/default-generator-catalog.xml @@ -19,6 +19,9 @@ + diff --git a/fj-daogen-base/src/test/resources/sample/daogenruntest-sample-daogen-config.xml b/fj-daogen-base/src/test/resources/sample/daogenruntest-sample-daogen-config.xml index 6b992ee2..2d5ff93b 100644 --- a/fj-daogen-base/src/test/resources/sample/daogenruntest-sample-daogen-config.xml +++ b/fj-daogen-base/src/test/resources/sample/daogenruntest-sample-daogen-config.xml @@ -19,6 +19,7 @@ struct_prefix="OBJ_" package-model="org.fugerit.java.daogen.sample.def.model" package-helper="org.fugerit.java.daogen.sample.impl.helper" + package-helper-microprofile="org.fugerit.java.daogen.sample.impl.helper" dao-helper-ng-mode="enabled" dao-wrapper-ng-mode="enabled" dao-finder-ng-mode="enabled" @@ -45,7 +46,7 @@ - + diff --git a/fj-daogen-sample/pom.xml b/fj-daogen-sample/pom.xml index a2bfb9e8..dfaa67d3 100644 --- a/fj-daogen-sample/pom.xml +++ b/fj-daogen-sample/pom.xml @@ -86,6 +86,12 @@ javax.ws.rs-api ${javax-rs-api-version} + + + org.eclipse.microprofile.openapi + microprofile-openapi-api + 3.1.2 + diff --git a/fj-daogen-sample/src/main/daogen/fugerit-sample-daogen-config.xml b/fj-daogen-sample/src/main/daogen/fugerit-sample-daogen-config.xml index dfa202f1..01cca503 100644 --- a/fj-daogen-sample/src/main/daogen/fugerit-sample-daogen-config.xml +++ b/fj-daogen-sample/src/main/daogen/fugerit-sample-daogen-config.xml @@ -28,6 +28,10 @@ package-junit4-model="org.fugerit.java.daogen.sample.junit4test.model" factory-data-impl="org.fugerit.java.daogen.sample.impl.facade.data.FugeritDataLogicFacade" default-sequence="seq_id_fugerit" + dao-helper-ng-mode="enabled" + dao-wrapper-ng-mode="enabled" + dao-finder-ng-mode="enabled" + type-mapper-time-ng="enabled" openapi_host="http://localhost:9080" openapi_path="/fugerit-sample-web/jax-rs" disable-singleton="enabled" @@ -38,8 +42,8 @@ - - + + diff --git a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/def/facade/AddressFinder.java b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/def/facade/AddressFinder.java index 824b74fb..6a11c582 100644 --- a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/def/facade/AddressFinder.java +++ b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/def/facade/AddressFinder.java @@ -1,6 +1,6 @@ package org.fugerit.java.daogen.sample.def.facade; -import org.fugerit.java.core.db.daogen.BaseIdFinder; +import org.fugerit.java.core.db.daogen.IdFinderNG; import org.fugerit.java.daogen.sample.def.model.ModelAddress; // custom import start ( code above here will be overwritten ) @@ -15,25 +15,11 @@ * // custom code start ( code above here will be overwritten ) * // custom code end ( code below here will be overwritten ) */ -public class AddressFinder extends BaseIdFinder { +public class AddressFinder extends IdFinderNG { // custom code start ( code above here will be overwritten ) // custom code end ( code below here will be overwritten ) - private static final long serialVersionUID = 991425775053L; - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - // this class is conditionally serializable, depending on contained object - // special situation can be handled using this method in future - out.defaultWriteObject(); - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - // this class is conditionally serializable, depending on contained object - // special situation can be handled using this method in future - in.defaultReadObject(); - } - private ModelAddress model; public void setModel( ModelAddress model ) { diff --git a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/def/facade/LogDataFinder.java b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/def/facade/LogDataFinder.java index 77cfcf8c..62c39bd1 100644 --- a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/def/facade/LogDataFinder.java +++ b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/def/facade/LogDataFinder.java @@ -1,6 +1,6 @@ package org.fugerit.java.daogen.sample.def.facade; -import org.fugerit.java.core.db.daogen.BaseIdFinder; +import org.fugerit.java.core.db.daogen.IdFinderNG; import org.fugerit.java.daogen.sample.def.model.ModelLogData; // custom import start ( code above here will be overwritten ) @@ -15,25 +15,11 @@ * // custom code start ( code above here will be overwritten ) * // custom code end ( code below here will be overwritten ) */ -public class LogDataFinder extends BaseIdFinder { +public class LogDataFinder extends IdFinderNG { // custom code start ( code above here will be overwritten ) // custom code end ( code below here will be overwritten ) - private static final long serialVersionUID = 329810489228L; - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - // this class is conditionally serializable, depending on contained object - // special situation can be handled using this method in future - out.defaultWriteObject(); - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - // this class is conditionally serializable, depending on contained object - // special situation can be handled using this method in future - in.defaultReadObject(); - } - private ModelLogData model; public void setModel( ModelLogData model ) { diff --git a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/def/facade/TestTwoFieldKeyFinder.java b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/def/facade/TestTwoFieldKeyFinder.java index 54c4c6a0..41e1eb2e 100644 --- a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/def/facade/TestTwoFieldKeyFinder.java +++ b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/def/facade/TestTwoFieldKeyFinder.java @@ -1,6 +1,6 @@ package org.fugerit.java.daogen.sample.def.facade; -import org.fugerit.java.core.db.daogen.BaseIdFinder; +import org.fugerit.java.core.db.daogen.IdFinderNG; import org.fugerit.java.daogen.sample.def.model.ModelTestTwoFieldKey; // custom import start ( code above here will be overwritten ) @@ -15,25 +15,11 @@ * // custom code start ( code above here will be overwritten ) * // custom code end ( code below here will be overwritten ) */ -public class TestTwoFieldKeyFinder extends BaseIdFinder { +public class TestTwoFieldKeyFinder extends IdFinderNG { // custom code start ( code above here will be overwritten ) // custom code end ( code below here will be overwritten ) - private static final long serialVersionUID = 772549612012L; - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - // this class is conditionally serializable, depending on contained object - // special situation can be handled using this method in future - out.defaultWriteObject(); - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - // this class is conditionally serializable, depending on contained object - // special situation can be handled using this method in future - in.defaultReadObject(); - } - private ModelTestTwoFieldKey model; public void setModel( ModelTestTwoFieldKey model ) { diff --git a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/def/facade/UploadFinder.java b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/def/facade/UploadFinder.java index afe758a7..799f6cf4 100644 --- a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/def/facade/UploadFinder.java +++ b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/def/facade/UploadFinder.java @@ -1,6 +1,6 @@ package org.fugerit.java.daogen.sample.def.facade; -import org.fugerit.java.core.db.daogen.BaseIdFinder; +import org.fugerit.java.core.db.daogen.IdFinderNG; import org.fugerit.java.daogen.sample.def.model.ModelUpload; // custom import start ( code above here will be overwritten ) @@ -15,25 +15,11 @@ * // custom code start ( code above here will be overwritten ) * // custom code end ( code below here will be overwritten ) */ -public class UploadFinder extends BaseIdFinder { +public class UploadFinder extends IdFinderNG { // custom code start ( code above here will be overwritten ) // custom code end ( code below here will be overwritten ) - private static final long serialVersionUID = 596269532220L; - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - // this class is conditionally serializable, depending on contained object - // special situation can be handled using this method in future - out.defaultWriteObject(); - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - // this class is conditionally serializable, depending on contained object - // special situation can be handled using this method in future - in.defaultReadObject(); - } - private ModelUpload model; public void setModel( ModelUpload model ) { diff --git a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/def/facade/UserDataFinder.java b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/def/facade/UserDataFinder.java index 8d06589c..73fc6c6c 100644 --- a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/def/facade/UserDataFinder.java +++ b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/def/facade/UserDataFinder.java @@ -1,6 +1,6 @@ package org.fugerit.java.daogen.sample.def.facade; -import org.fugerit.java.core.db.daogen.BaseIdFinder; +import org.fugerit.java.core.db.daogen.IdFinderNG; import org.fugerit.java.daogen.sample.def.model.ModelUserData; // custom import start ( code above here will be overwritten ) @@ -15,25 +15,11 @@ * // custom code start ( code above here will be overwritten ) * // custom code end ( code below here will be overwritten ) */ -public class UserDataFinder extends BaseIdFinder { +public class UserDataFinder extends IdFinderNG { // custom code start ( code above here will be overwritten ) // custom code end ( code below here will be overwritten ) - private static final long serialVersionUID = 338411557691L; - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - // this class is conditionally serializable, depending on contained object - // special situation can be handled using this method in future - out.defaultWriteObject(); - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - // this class is conditionally serializable, depending on contained object - // special situation can be handled using this method in future - in.defaultReadObject(); - } - private ModelUserData model; public void setModel( ModelUserData model ) { diff --git a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/def/facade/UserFinder.java b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/def/facade/UserFinder.java index 9b094434..a94c4baa 100644 --- a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/def/facade/UserFinder.java +++ b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/def/facade/UserFinder.java @@ -1,6 +1,6 @@ package org.fugerit.java.daogen.sample.def.facade; -import org.fugerit.java.core.db.daogen.BaseIdFinder; +import org.fugerit.java.core.db.daogen.IdFinderNG; import org.fugerit.java.daogen.sample.def.model.ModelUser; // custom import start ( code above here will be overwritten ) @@ -15,25 +15,11 @@ * // custom code start ( code above here will be overwritten ) * // custom code end ( code below here will be overwritten ) */ -public class UserFinder extends BaseIdFinder { +public class UserFinder extends IdFinderNG { // custom code start ( code above here will be overwritten ) // custom code end ( code below here will be overwritten ) - private static final long serialVersionUID = 657787973072L; - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - // this class is conditionally serializable, depending on contained object - // special situation can be handled using this method in future - out.defaultWriteObject(); - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - // this class is conditionally serializable, depending on contained object - // special situation can be handled using this method in future - in.defaultReadObject(); - } - private ModelUser model; public void setModel( ModelUser model ) { diff --git a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/def/model/ModelAddress.java b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/def/model/ModelAddress.java index 27b49313..99e51072 100644 --- a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/def/model/ModelAddress.java +++ b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/def/model/ModelAddress.java @@ -81,7 +81,7 @@ public interface ModelAddress extends org.fugerit.java.core.lang.compare.CheckEm * * @return the value of dateInsert */ - java.util.Date getDateInsert(); + java.time.LocalDateTime getDateInsert(); /** * Setter method for property : dateInsert (nullable: yes) @@ -90,7 +90,7 @@ public interface ModelAddress extends org.fugerit.java.core.lang.compare.CheckEm * * @param value the value of dateInsert */ - void setDateInsert( java.util.Date value ); + void setDateInsert( java.time.LocalDateTime value ); /** * Getter method for property : dateUpdate (nullable: yes) @@ -99,7 +99,7 @@ public interface ModelAddress extends org.fugerit.java.core.lang.compare.CheckEm * * @return the value of dateUpdate */ - java.util.Date getDateUpdate(); + java.time.LocalDateTime getDateUpdate(); /** * Setter method for property : dateUpdate (nullable: yes) @@ -108,7 +108,7 @@ public interface ModelAddress extends org.fugerit.java.core.lang.compare.CheckEm * * @param value the value of dateUpdate */ - void setDateUpdate( java.util.Date value ); + void setDateUpdate( java.time.LocalDateTime value ); /** * Getter method for property : info (nullable: no) diff --git a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/def/model/ModelLogData.java b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/def/model/ModelLogData.java index b3299a75..607ba83c 100644 --- a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/def/model/ModelLogData.java +++ b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/def/model/ModelLogData.java @@ -45,7 +45,7 @@ public interface ModelLogData extends org.fugerit.java.core.lang.compare.CheckEm * * @return the value of logTime */ - java.util.Date getLogTime(); + java.time.LocalDateTime getLogTime(); /** * Setter method for property : logTime (nullable: yes) @@ -54,7 +54,7 @@ public interface ModelLogData extends org.fugerit.java.core.lang.compare.CheckEm * * @param value the value of logTime */ - void setLogTime( java.util.Date value ); + void setLogTime( java.time.LocalDateTime value ); /** * Getter method for property : info (nullable: no) diff --git a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/def/model/ModelUpload.java b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/def/model/ModelUpload.java index 54b2924a..e0b6aa03 100644 --- a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/def/model/ModelUpload.java +++ b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/def/model/ModelUpload.java @@ -45,7 +45,7 @@ public interface ModelUpload extends org.fugerit.java.core.lang.compare.CheckEmp * * @return the value of dateInsert */ - java.util.Date getDateInsert(); + java.time.LocalDateTime getDateInsert(); /** * Setter method for property : dateInsert (nullable: yes) @@ -54,7 +54,7 @@ public interface ModelUpload extends org.fugerit.java.core.lang.compare.CheckEmp * * @param value the value of dateInsert */ - void setDateInsert( java.util.Date value ); + void setDateInsert( java.time.LocalDateTime value ); /** * Getter method for property : dateUpdate (nullable: yes) @@ -63,7 +63,7 @@ public interface ModelUpload extends org.fugerit.java.core.lang.compare.CheckEmp * * @return the value of dateUpdate */ - java.util.Date getDateUpdate(); + java.time.LocalDateTime getDateUpdate(); /** * Setter method for property : dateUpdate (nullable: yes) @@ -72,7 +72,7 @@ public interface ModelUpload extends org.fugerit.java.core.lang.compare.CheckEmp * * @param value the value of dateUpdate */ - void setDateUpdate( java.util.Date value ); + void setDateUpdate( java.time.LocalDateTime value ); /** * Getter method for property : content (nullable: yes) diff --git a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/def/model/ModelUser.java b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/def/model/ModelUser.java index 03676ee7..4ab028c2 100644 --- a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/def/model/ModelUser.java +++ b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/def/model/ModelUser.java @@ -99,7 +99,7 @@ public interface ModelUser extends org.fugerit.java.core.lang.compare.CheckEmpty * * @return the value of lastLogin */ - java.util.Date getLastLogin(); + java.time.LocalDateTime getLastLogin(); /** * Setter method for property : lastLogin (nullable: yes) @@ -108,7 +108,7 @@ public interface ModelUser extends org.fugerit.java.core.lang.compare.CheckEmpty * * @param value the value of lastLogin */ - void setLastLogin( java.util.Date value ); + void setLastLogin( java.time.LocalDateTime value ); /** * Getter method for property : dateInsert (nullable: yes) @@ -117,7 +117,7 @@ public interface ModelUser extends org.fugerit.java.core.lang.compare.CheckEmpty * * @return the value of dateInsert */ - java.util.Date getDateInsert(); + java.time.LocalDateTime getDateInsert(); /** * Setter method for property : dateInsert (nullable: yes) @@ -126,7 +126,7 @@ public interface ModelUser extends org.fugerit.java.core.lang.compare.CheckEmpty * * @param value the value of dateInsert */ - void setDateInsert( java.util.Date value ); + void setDateInsert( java.time.LocalDateTime value ); /** * Getter method for property : dateUpdate (nullable: yes) @@ -135,7 +135,7 @@ public interface ModelUser extends org.fugerit.java.core.lang.compare.CheckEmpty * * @return the value of dateUpdate */ - java.util.Date getDateUpdate(); + java.time.LocalDateTime getDateUpdate(); /** * Setter method for property : dateUpdate (nullable: yes) @@ -144,7 +144,7 @@ public interface ModelUser extends org.fugerit.java.core.lang.compare.CheckEmpty * * @param value the value of dateUpdate */ - void setDateUpdate( java.util.Date value ); + void setDateUpdate( java.time.LocalDateTime value ); /** * Getter method for property : state (nullable: no) diff --git a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/def/model/ModelUserData.java b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/def/model/ModelUserData.java index c1cc503d..292409c2 100644 --- a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/def/model/ModelUserData.java +++ b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/def/model/ModelUserData.java @@ -81,7 +81,7 @@ public interface ModelUserData extends org.fugerit.java.core.lang.compare.CheckE * * @return the value of lastLogin */ - java.util.Date getLastLogin(); + java.time.LocalDateTime getLastLogin(); /** * Setter method for property : lastLogin (nullable: yes) @@ -90,7 +90,7 @@ public interface ModelUserData extends org.fugerit.java.core.lang.compare.CheckE * * @param value the value of lastLogin */ - void setLastLogin( java.util.Date value ); + void setLastLogin( java.time.LocalDateTime value ); /** * Getter method for property : dateInsert (nullable: yes) @@ -99,7 +99,7 @@ public interface ModelUserData extends org.fugerit.java.core.lang.compare.CheckE * * @return the value of dateInsert */ - java.util.Date getDateInsert(); + java.time.LocalDateTime getDateInsert(); /** * Setter method for property : dateInsert (nullable: yes) @@ -108,7 +108,7 @@ public interface ModelUserData extends org.fugerit.java.core.lang.compare.CheckE * * @param value the value of dateInsert */ - void setDateInsert( java.util.Date value ); + void setDateInsert( java.time.LocalDateTime value ); /** * Getter method for property : dateUpdate (nullable: yes) @@ -117,7 +117,7 @@ public interface ModelUserData extends org.fugerit.java.core.lang.compare.CheckE * * @return the value of dateUpdate */ - java.util.Date getDateUpdate(); + java.time.LocalDateTime getDateUpdate(); /** * Setter method for property : dateUpdate (nullable: yes) @@ -126,7 +126,7 @@ public interface ModelUserData extends org.fugerit.java.core.lang.compare.CheckE * * @param value the value of dateUpdate */ - void setDateUpdate( java.util.Date value ); + void setDateUpdate( java.time.LocalDateTime value ); /** * Getter method for property : state (nullable: no) diff --git a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/helper/HelperAddress.java b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/helper/HelperAddress.java index e694b75d..4f241cde 100644 --- a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/helper/HelperAddress.java +++ b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/helper/HelperAddress.java @@ -1,6 +1,5 @@ package org.fugerit.java.daogen.sample.impl.helper; -import org.fugerit.java.core.db.daogen.BasicHelper; import org.fugerit.java.daogen.sample.def.model.ModelAddress; import org.fugerit.java.daogen.sample.def.model.ModelUser; @@ -16,25 +15,11 @@ * // custom code start ( code above here will be overwritten ) * // custom code end ( code below here will be overwritten ) */ -public class HelperAddress extends BasicHelper implements ModelAddress { +public class HelperAddress implements ModelAddress { // custom code start ( code above here will be overwritten ) // custom code end ( code below here will be overwritten ) - private static final long serialVersionUID = 102956265348L; - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - // this class is conditionally serializable, depending on contained object - // special situation can be handled using this method in future - out.defaultWriteObject(); - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - // this class is conditionally serializable, depending on contained object - // special situation can be handled using this method in future - in.defaultReadObject(); - } - /* * fields generated for relations */ @@ -78,27 +63,27 @@ public java.math.BigDecimal getIdUser() { return this.idUser; } - private java.util.Date dateInsert; + private java.time.LocalDateTime dateInsert; @Override - public void setDateInsert( java.util.Date value ) { + public void setDateInsert( java.time.LocalDateTime value ) { this.dateInsert = value; } @Override - public java.util.Date getDateInsert() { + public java.time.LocalDateTime getDateInsert() { return this.dateInsert; } - private java.util.Date dateUpdate; + private java.time.LocalDateTime dateUpdate; @Override - public void setDateUpdate( java.util.Date value ) { + public void setDateUpdate( java.time.LocalDateTime value ) { this.dateUpdate = value; } @Override - public java.util.Date getDateUpdate() { + public java.time.LocalDateTime getDateUpdate() { return this.dateUpdate; } diff --git a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/helper/HelperLogData.java b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/helper/HelperLogData.java index 3d48462b..1324fcad 100644 --- a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/helper/HelperLogData.java +++ b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/helper/HelperLogData.java @@ -1,6 +1,5 @@ package org.fugerit.java.daogen.sample.impl.helper; -import org.fugerit.java.core.db.daogen.BasicHelper; import org.fugerit.java.daogen.sample.def.model.ModelLogData; // custom import start ( code above here will be overwritten ) @@ -15,25 +14,11 @@ * // custom code start ( code above here will be overwritten ) * // custom code end ( code below here will be overwritten ) */ -public class HelperLogData extends BasicHelper implements ModelLogData { +public class HelperLogData implements ModelLogData { // custom code start ( code above here will be overwritten ) // custom code end ( code below here will be overwritten ) - private static final long serialVersionUID = 412994167955L; - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - // this class is conditionally serializable, depending on contained object - // special situation can be handled using this method in future - out.defaultWriteObject(); - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - // this class is conditionally serializable, depending on contained object - // special situation can be handled using this method in future - in.defaultReadObject(); - } - /* * fields generated for entity attributes */ @@ -49,15 +34,15 @@ public java.math.BigDecimal getId() { return this.id; } - private java.util.Date logTime; + private java.time.LocalDateTime logTime; @Override - public void setLogTime( java.util.Date value ) { + public void setLogTime( java.time.LocalDateTime value ) { this.logTime = value; } @Override - public java.util.Date getLogTime() { + public java.time.LocalDateTime getLogTime() { return this.logTime; } diff --git a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/helper/HelperTestTwoFieldKey.java b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/helper/HelperTestTwoFieldKey.java index 5e10c97c..4d9a73ad 100644 --- a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/helper/HelperTestTwoFieldKey.java +++ b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/helper/HelperTestTwoFieldKey.java @@ -1,6 +1,5 @@ package org.fugerit.java.daogen.sample.impl.helper; -import org.fugerit.java.core.db.daogen.BasicHelper; import org.fugerit.java.daogen.sample.def.model.ModelTestTwoFieldKey; // custom import start ( code above here will be overwritten ) @@ -15,25 +14,11 @@ * // custom code start ( code above here will be overwritten ) * // custom code end ( code below here will be overwritten ) */ -public class HelperTestTwoFieldKey extends BasicHelper implements ModelTestTwoFieldKey { +public class HelperTestTwoFieldKey implements ModelTestTwoFieldKey { // custom code start ( code above here will be overwritten ) // custom code end ( code below here will be overwritten ) - private static final long serialVersionUID = 145827814931L; - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - // this class is conditionally serializable, depending on contained object - // special situation can be handled using this method in future - out.defaultWriteObject(); - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - // this class is conditionally serializable, depending on contained object - // special situation can be handled using this method in future - in.defaultReadObject(); - } - /* * fields generated for entity attributes */ diff --git a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/helper/HelperUpload.java b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/helper/HelperUpload.java index a9aac4a8..eba61f26 100644 --- a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/helper/HelperUpload.java +++ b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/helper/HelperUpload.java @@ -1,6 +1,5 @@ package org.fugerit.java.daogen.sample.impl.helper; -import org.fugerit.java.core.db.daogen.BasicHelper; import org.fugerit.java.daogen.sample.def.model.ModelUpload; // custom import start ( code above here will be overwritten ) @@ -15,25 +14,11 @@ * // custom code start ( code above here will be overwritten ) * // custom code end ( code below here will be overwritten ) */ -public class HelperUpload extends BasicHelper implements ModelUpload { +public class HelperUpload implements ModelUpload { // custom code start ( code above here will be overwritten ) // custom code end ( code below here will be overwritten ) - private static final long serialVersionUID = 618353454393L; - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - // this class is conditionally serializable, depending on contained object - // special situation can be handled using this method in future - out.defaultWriteObject(); - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - // this class is conditionally serializable, depending on contained object - // special situation can be handled using this method in future - in.defaultReadObject(); - } - /* * fields generated for entity attributes */ @@ -49,27 +34,27 @@ public java.math.BigDecimal getId() { return this.id; } - private java.util.Date dateInsert; + private java.time.LocalDateTime dateInsert; @Override - public void setDateInsert( java.util.Date value ) { + public void setDateInsert( java.time.LocalDateTime value ) { this.dateInsert = value; } @Override - public java.util.Date getDateInsert() { + public java.time.LocalDateTime getDateInsert() { return this.dateInsert; } - private java.util.Date dateUpdate; + private java.time.LocalDateTime dateUpdate; @Override - public void setDateUpdate( java.util.Date value ) { + public void setDateUpdate( java.time.LocalDateTime value ) { this.dateUpdate = value; } @Override - public java.util.Date getDateUpdate() { + public java.time.LocalDateTime getDateUpdate() { return this.dateUpdate; } diff --git a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/helper/HelperUser.java b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/helper/HelperUser.java index b4a2b96d..2e1934b8 100644 --- a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/helper/HelperUser.java +++ b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/helper/HelperUser.java @@ -1,6 +1,5 @@ package org.fugerit.java.daogen.sample.impl.helper; -import org.fugerit.java.core.db.daogen.BasicHelper; import org.fugerit.java.daogen.sample.def.model.ModelAddress; import org.fugerit.java.daogen.sample.def.model.ModelUser; @@ -16,25 +15,11 @@ * // custom code start ( code above here will be overwritten ) * // custom code end ( code below here will be overwritten ) */ -public class HelperUser extends BasicHelper implements ModelUser { +public class HelperUser implements ModelUser { // custom code start ( code above here will be overwritten ) // custom code end ( code below here will be overwritten ) - private static final long serialVersionUID = 727585503819L; - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - // this class is conditionally serializable, depending on contained object - // special situation can be handled using this method in future - out.defaultWriteObject(); - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - // this class is conditionally serializable, depending on contained object - // special situation can be handled using this method in future - in.defaultReadObject(); - } - /* * fields generated for relations */ @@ -90,39 +75,39 @@ public java.lang.String getPassword() { return this.password; } - private java.util.Date lastLogin; + private java.time.LocalDateTime lastLogin; @Override - public void setLastLogin( java.util.Date value ) { + public void setLastLogin( java.time.LocalDateTime value ) { this.lastLogin = value; } @Override - public java.util.Date getLastLogin() { + public java.time.LocalDateTime getLastLogin() { return this.lastLogin; } - private java.util.Date dateInsert; + private java.time.LocalDateTime dateInsert; @Override - public void setDateInsert( java.util.Date value ) { + public void setDateInsert( java.time.LocalDateTime value ) { this.dateInsert = value; } @Override - public java.util.Date getDateInsert() { + public java.time.LocalDateTime getDateInsert() { return this.dateInsert; } - private java.util.Date dateUpdate; + private java.time.LocalDateTime dateUpdate; @Override - public void setDateUpdate( java.util.Date value ) { + public void setDateUpdate( java.time.LocalDateTime value ) { this.dateUpdate = value; } @Override - public java.util.Date getDateUpdate() { + public java.time.LocalDateTime getDateUpdate() { return this.dateUpdate; } diff --git a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/helper/HelperUserData.java b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/helper/HelperUserData.java index 2bc07148..9b122c56 100644 --- a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/helper/HelperUserData.java +++ b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/helper/HelperUserData.java @@ -1,6 +1,5 @@ package org.fugerit.java.daogen.sample.impl.helper; -import org.fugerit.java.core.db.daogen.BasicHelper; import org.fugerit.java.daogen.sample.def.model.ModelUserData; // custom import start ( code above here will be overwritten ) @@ -15,25 +14,11 @@ * // custom code start ( code above here will be overwritten ) * // custom code end ( code below here will be overwritten ) */ -public class HelperUserData extends BasicHelper implements ModelUserData { +public class HelperUserData implements ModelUserData { // custom code start ( code above here will be overwritten ) // custom code end ( code below here will be overwritten ) - private static final long serialVersionUID = 321604260603L; - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - // this class is conditionally serializable, depending on contained object - // special situation can be handled using this method in future - out.defaultWriteObject(); - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - // this class is conditionally serializable, depending on contained object - // special situation can be handled using this method in future - in.defaultReadObject(); - } - /* * fields generated for entity attributes */ @@ -73,39 +58,39 @@ public java.lang.String getPassword() { return this.password; } - private java.util.Date lastLogin; + private java.time.LocalDateTime lastLogin; @Override - public void setLastLogin( java.util.Date value ) { + public void setLastLogin( java.time.LocalDateTime value ) { this.lastLogin = value; } @Override - public java.util.Date getLastLogin() { + public java.time.LocalDateTime getLastLogin() { return this.lastLogin; } - private java.util.Date dateInsert; + private java.time.LocalDateTime dateInsert; @Override - public void setDateInsert( java.util.Date value ) { + public void setDateInsert( java.time.LocalDateTime value ) { this.dateInsert = value; } @Override - public java.util.Date getDateInsert() { + public java.time.LocalDateTime getDateInsert() { return this.dateInsert; } - private java.util.Date dateUpdate; + private java.time.LocalDateTime dateUpdate; @Override - public void setDateUpdate( java.util.Date value ) { + public void setDateUpdate( java.time.LocalDateTime value ) { this.dateUpdate = value; } @Override - public java.util.Date getDateUpdate() { + public java.time.LocalDateTime getDateUpdate() { return this.dateUpdate; } diff --git a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/helper/WrapperAddress.java b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/helper/WrapperAddress.java index 13bf5b51..95fd98df 100644 --- a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/helper/WrapperAddress.java +++ b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/helper/WrapperAddress.java @@ -1,6 +1,6 @@ package org.fugerit.java.daogen.sample.impl.helper; -import org.fugerit.java.core.db.daogen.BasicWrapper; +import org.fugerit.java.core.db.daogen.BasicWrapperNG; import org.fugerit.java.daogen.sample.def.model.ModelAddress; import org.fugerit.java.daogen.sample.def.model.ModelUser; @@ -16,25 +16,11 @@ * // custom code start ( code above here will be overwritten ) * // custom code end ( code below here will be overwritten ) */ -public class WrapperAddress extends BasicWrapper implements ModelAddress { +public class WrapperAddress extends BasicWrapperNG implements ModelAddress { // custom code start ( code above here will be overwritten ) // custom code end ( code below here will be overwritten ) - private static final long serialVersionUID = 608697339771L; - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - // this class is conditionally serializable, depending on contained object - // special situation can be handled using this method in future - out.defaultWriteObject(); - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - // this class is conditionally serializable, depending on contained object - // special situation can be handled using this method in future - in.defaultReadObject(); - } - public WrapperAddress( ModelAddress wrapped ) { super( wrapped ); } @@ -85,22 +71,22 @@ public java.math.BigDecimal getIdUser() { } @Override - public void setDateInsert( java.util.Date value ) { + public void setDateInsert( java.time.LocalDateTime value ) { this.unwrapModel().setDateInsert( value ); } @Override - public java.util.Date getDateInsert() { + public java.time.LocalDateTime getDateInsert() { return this.unwrapModel().getDateInsert(); } @Override - public void setDateUpdate( java.util.Date value ) { + public void setDateUpdate( java.time.LocalDateTime value ) { this.unwrapModel().setDateUpdate( value ); } @Override - public java.util.Date getDateUpdate() { + public java.time.LocalDateTime getDateUpdate() { return this.unwrapModel().getDateUpdate(); } diff --git a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/helper/WrapperLogData.java b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/helper/WrapperLogData.java index e55f2d9f..e77c6597 100644 --- a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/helper/WrapperLogData.java +++ b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/helper/WrapperLogData.java @@ -1,6 +1,6 @@ package org.fugerit.java.daogen.sample.impl.helper; -import org.fugerit.java.core.db.daogen.BasicWrapper; +import org.fugerit.java.core.db.daogen.BasicWrapperNG; import org.fugerit.java.daogen.sample.def.model.ModelLogData; // custom import start ( code above here will be overwritten ) @@ -15,25 +15,11 @@ * // custom code start ( code above here will be overwritten ) * // custom code end ( code below here will be overwritten ) */ -public class WrapperLogData extends BasicWrapper implements ModelLogData { +public class WrapperLogData extends BasicWrapperNG implements ModelLogData { // custom code start ( code above here will be overwritten ) // custom code end ( code below here will be overwritten ) - private static final long serialVersionUID = 827293319822L; - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - // this class is conditionally serializable, depending on contained object - // special situation can be handled using this method in future - out.defaultWriteObject(); - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - // this class is conditionally serializable, depending on contained object - // special situation can be handled using this method in future - in.defaultReadObject(); - } - public WrapperLogData( ModelLogData wrapped ) { super( wrapped ); } @@ -60,12 +46,12 @@ public java.math.BigDecimal getId() { } @Override - public void setLogTime( java.util.Date value ) { + public void setLogTime( java.time.LocalDateTime value ) { this.unwrapModel().setLogTime( value ); } @Override - public java.util.Date getLogTime() { + public java.time.LocalDateTime getLogTime() { return this.unwrapModel().getLogTime(); } diff --git a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/helper/WrapperTestTwoFieldKey.java b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/helper/WrapperTestTwoFieldKey.java index 46f32f51..2ba763cd 100644 --- a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/helper/WrapperTestTwoFieldKey.java +++ b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/helper/WrapperTestTwoFieldKey.java @@ -1,6 +1,6 @@ package org.fugerit.java.daogen.sample.impl.helper; -import org.fugerit.java.core.db.daogen.BasicWrapper; +import org.fugerit.java.core.db.daogen.BasicWrapperNG; import org.fugerit.java.daogen.sample.def.model.ModelTestTwoFieldKey; // custom import start ( code above here will be overwritten ) @@ -15,25 +15,11 @@ * // custom code start ( code above here will be overwritten ) * // custom code end ( code below here will be overwritten ) */ -public class WrapperTestTwoFieldKey extends BasicWrapper implements ModelTestTwoFieldKey { +public class WrapperTestTwoFieldKey extends BasicWrapperNG implements ModelTestTwoFieldKey { // custom code start ( code above here will be overwritten ) // custom code end ( code below here will be overwritten ) - private static final long serialVersionUID = 486564785574L; - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - // this class is conditionally serializable, depending on contained object - // special situation can be handled using this method in future - out.defaultWriteObject(); - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - // this class is conditionally serializable, depending on contained object - // special situation can be handled using this method in future - in.defaultReadObject(); - } - public WrapperTestTwoFieldKey( ModelTestTwoFieldKey wrapped ) { super( wrapped ); } diff --git a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/helper/WrapperUpload.java b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/helper/WrapperUpload.java index 694483f6..d2b2985a 100644 --- a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/helper/WrapperUpload.java +++ b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/helper/WrapperUpload.java @@ -1,6 +1,6 @@ package org.fugerit.java.daogen.sample.impl.helper; -import org.fugerit.java.core.db.daogen.BasicWrapper; +import org.fugerit.java.core.db.daogen.BasicWrapperNG; import org.fugerit.java.daogen.sample.def.model.ModelUpload; // custom import start ( code above here will be overwritten ) @@ -15,25 +15,11 @@ * // custom code start ( code above here will be overwritten ) * // custom code end ( code below here will be overwritten ) */ -public class WrapperUpload extends BasicWrapper implements ModelUpload { +public class WrapperUpload extends BasicWrapperNG implements ModelUpload { // custom code start ( code above here will be overwritten ) // custom code end ( code below here will be overwritten ) - private static final long serialVersionUID = 714845245143L; - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - // this class is conditionally serializable, depending on contained object - // special situation can be handled using this method in future - out.defaultWriteObject(); - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - // this class is conditionally serializable, depending on contained object - // special situation can be handled using this method in future - in.defaultReadObject(); - } - public WrapperUpload( ModelUpload wrapped ) { super( wrapped ); } @@ -60,22 +46,22 @@ public java.math.BigDecimal getId() { } @Override - public void setDateInsert( java.util.Date value ) { + public void setDateInsert( java.time.LocalDateTime value ) { this.unwrapModel().setDateInsert( value ); } @Override - public java.util.Date getDateInsert() { + public java.time.LocalDateTime getDateInsert() { return this.unwrapModel().getDateInsert(); } @Override - public void setDateUpdate( java.util.Date value ) { + public void setDateUpdate( java.time.LocalDateTime value ) { this.unwrapModel().setDateUpdate( value ); } @Override - public java.util.Date getDateUpdate() { + public java.time.LocalDateTime getDateUpdate() { return this.unwrapModel().getDateUpdate(); } diff --git a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/helper/WrapperUser.java b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/helper/WrapperUser.java index 0b0708ea..113ffe66 100644 --- a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/helper/WrapperUser.java +++ b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/helper/WrapperUser.java @@ -1,6 +1,6 @@ package org.fugerit.java.daogen.sample.impl.helper; -import org.fugerit.java.core.db.daogen.BasicWrapper; +import org.fugerit.java.core.db.daogen.BasicWrapperNG; import org.fugerit.java.daogen.sample.def.model.ModelAddress; import org.fugerit.java.daogen.sample.def.model.ModelUser; @@ -16,25 +16,11 @@ * // custom code start ( code above here will be overwritten ) * // custom code end ( code below here will be overwritten ) */ -public class WrapperUser extends BasicWrapper implements ModelUser { +public class WrapperUser extends BasicWrapperNG implements ModelUser { // custom code start ( code above here will be overwritten ) // custom code end ( code below here will be overwritten ) - private static final long serialVersionUID = 117929240875L; - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - // this class is conditionally serializable, depending on contained object - // special situation can be handled using this method in future - out.defaultWriteObject(); - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - // this class is conditionally serializable, depending on contained object - // special situation can be handled using this method in future - in.defaultReadObject(); - } - public WrapperUser( ModelUser wrapped ) { super( wrapped ); } @@ -95,32 +81,32 @@ public java.lang.String getPassword() { } @Override - public void setLastLogin( java.util.Date value ) { + public void setLastLogin( java.time.LocalDateTime value ) { this.unwrapModel().setLastLogin( value ); } @Override - public java.util.Date getLastLogin() { + public java.time.LocalDateTime getLastLogin() { return this.unwrapModel().getLastLogin(); } @Override - public void setDateInsert( java.util.Date value ) { + public void setDateInsert( java.time.LocalDateTime value ) { this.unwrapModel().setDateInsert( value ); } @Override - public java.util.Date getDateInsert() { + public java.time.LocalDateTime getDateInsert() { return this.unwrapModel().getDateInsert(); } @Override - public void setDateUpdate( java.util.Date value ) { + public void setDateUpdate( java.time.LocalDateTime value ) { this.unwrapModel().setDateUpdate( value ); } @Override - public java.util.Date getDateUpdate() { + public java.time.LocalDateTime getDateUpdate() { return this.unwrapModel().getDateUpdate(); } diff --git a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/helper/WrapperUserData.java b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/helper/WrapperUserData.java index 69a8296e..9dd21d32 100644 --- a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/helper/WrapperUserData.java +++ b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/helper/WrapperUserData.java @@ -1,6 +1,6 @@ package org.fugerit.java.daogen.sample.impl.helper; -import org.fugerit.java.core.db.daogen.BasicWrapper; +import org.fugerit.java.core.db.daogen.BasicWrapperNG; import org.fugerit.java.daogen.sample.def.model.ModelUserData; // custom import start ( code above here will be overwritten ) @@ -15,25 +15,11 @@ * // custom code start ( code above here will be overwritten ) * // custom code end ( code below here will be overwritten ) */ -public class WrapperUserData extends BasicWrapper implements ModelUserData { +public class WrapperUserData extends BasicWrapperNG implements ModelUserData { // custom code start ( code above here will be overwritten ) // custom code end ( code below here will be overwritten ) - private static final long serialVersionUID = 647032161858L; - - private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { - // this class is conditionally serializable, depending on contained object - // special situation can be handled using this method in future - out.defaultWriteObject(); - } - - private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { - // this class is conditionally serializable, depending on contained object - // special situation can be handled using this method in future - in.defaultReadObject(); - } - public WrapperUserData( ModelUserData wrapped ) { super( wrapped ); } @@ -80,32 +66,32 @@ public java.lang.String getPassword() { } @Override - public void setLastLogin( java.util.Date value ) { + public void setLastLogin( java.time.LocalDateTime value ) { this.unwrapModel().setLastLogin( value ); } @Override - public java.util.Date getLastLogin() { + public java.time.LocalDateTime getLastLogin() { return this.unwrapModel().getLastLogin(); } @Override - public void setDateInsert( java.util.Date value ) { + public void setDateInsert( java.time.LocalDateTime value ) { this.unwrapModel().setDateInsert( value ); } @Override - public java.util.Date getDateInsert() { + public java.time.LocalDateTime getDateInsert() { return this.unwrapModel().getDateInsert(); } @Override - public void setDateUpdate( java.util.Date value ) { + public void setDateUpdate( java.time.LocalDateTime value ) { this.unwrapModel().setDateUpdate( value ); } @Override - public java.util.Date getDateUpdate() { + public java.time.LocalDateTime getDateUpdate() { return this.unwrapModel().getDateUpdate(); } diff --git a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/rse/AddressRSE.java b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/rse/AddressRSE.java index 9d52dad9..3e471d76 100644 --- a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/rse/AddressRSE.java +++ b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/rse/AddressRSE.java @@ -30,8 +30,8 @@ public ModelAddress extractNext( ResultSet rs ) throws SQLException { HelperAddress current = new HelperAddress(); current.setId( rs.getBigDecimal( "ID" ) ); current.setIdUser( rs.getBigDecimal( "ID_USER" ) ); - current.setDateInsert( rs.getTimestamp( "DATE_INSERT" ) ); - current.setDateUpdate( rs.getTimestamp( "DATE_UPDATE" ) ); + current.setDateInsert( org.fugerit.java.core.db.daogen.SQLTypeConverter.utilDateToLocalDateTime( rs.getTimestamp( "DATE_INSERT" ) ) ); + current.setDateUpdate( org.fugerit.java.core.db.daogen.SQLTypeConverter.utilDateToLocalDateTime( rs.getTimestamp( "DATE_UPDATE" ) ) ); current.setInfo( rs.getString( "INFO" ) ); return current; } diff --git a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/rse/LogDataRSE.java b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/rse/LogDataRSE.java index 40c34fee..64c33597 100644 --- a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/rse/LogDataRSE.java +++ b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/rse/LogDataRSE.java @@ -29,7 +29,7 @@ public class LogDataRSE extends BasicRSExtractor { public ModelLogData extractNext( ResultSet rs ) throws SQLException { HelperLogData current = new HelperLogData(); current.setId( rs.getBigDecimal( "ID" ) ); - current.setLogTime( rs.getTimestamp( "LOG_TIME" ) ); + current.setLogTime( org.fugerit.java.core.db.daogen.SQLTypeConverter.utilDateToLocalDateTime( rs.getTimestamp( "LOG_TIME" ) ) ); current.setInfo( rs.getString( "INFO" ) ); return current; } diff --git a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/rse/UploadRSE.java b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/rse/UploadRSE.java index baa4ebe4..c5a0318b 100644 --- a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/rse/UploadRSE.java +++ b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/rse/UploadRSE.java @@ -29,8 +29,8 @@ public class UploadRSE extends BasicRSExtractor { public ModelUpload extractNext( ResultSet rs ) throws SQLException { HelperUpload current = new HelperUpload(); current.setId( rs.getBigDecimal( "ID" ) ); - current.setDateInsert( rs.getTimestamp( "DATE_INSERT" ) ); - current.setDateUpdate( rs.getTimestamp( "DATE_UPDATE" ) ); + current.setDateInsert( org.fugerit.java.core.db.daogen.SQLTypeConverter.utilDateToLocalDateTime( rs.getTimestamp( "DATE_INSERT" ) ) ); + current.setDateUpdate( org.fugerit.java.core.db.daogen.SQLTypeConverter.utilDateToLocalDateTime( rs.getTimestamp( "DATE_UPDATE" ) ) ); try { current.setContent( org.fugerit.java.core.db.daogen.ByteArrayDataHandler.newHandlerPreload( rs.getBlob( "CONTENT" ) ) ); } catch (Exception e) { diff --git a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/rse/UserDataRSE.java b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/rse/UserDataRSE.java index 13c5f676..aaef7057 100644 --- a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/rse/UserDataRSE.java +++ b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/rse/UserDataRSE.java @@ -31,9 +31,9 @@ public ModelUserData extractNext( ResultSet rs ) throws SQLException { current.setId( rs.getBigDecimal( "ID" ) ); current.setUsername( rs.getString( "USERNAME" ) ); current.setPassword( rs.getString( "PASSWORD" ) ); - current.setLastLogin( rs.getTimestamp( "LAST_LOGIN" ) ); - current.setDateInsert( rs.getTimestamp( "DATE_INSERT" ) ); - current.setDateUpdate( rs.getTimestamp( "DATE_UPDATE" ) ); + current.setLastLogin( org.fugerit.java.core.db.daogen.SQLTypeConverter.utilDateToLocalDateTime( rs.getTimestamp( "LAST_LOGIN" ) ) ); + current.setDateInsert( org.fugerit.java.core.db.daogen.SQLTypeConverter.utilDateToLocalDateTime( rs.getTimestamp( "DATE_INSERT" ) ) ); + current.setDateUpdate( org.fugerit.java.core.db.daogen.SQLTypeConverter.utilDateToLocalDateTime( rs.getTimestamp( "DATE_UPDATE" ) ) ); current.setState( rs.getBigDecimal( "STATE" ) ); return current; } diff --git a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/rse/UserRSE.java b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/rse/UserRSE.java index add642da..02f5c4b7 100644 --- a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/rse/UserRSE.java +++ b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/rse/UserRSE.java @@ -31,9 +31,9 @@ public ModelUser extractNext( ResultSet rs ) throws SQLException { current.setId( rs.getBigDecimal( "ID" ) ); current.setUsername( rs.getString( "USERNAME" ) ); current.setPassword( rs.getString( "PASSWORD" ) ); - current.setLastLogin( rs.getTimestamp( "LAST_LOGIN" ) ); - current.setDateInsert( rs.getTimestamp( "DATE_INSERT" ) ); - current.setDateUpdate( rs.getTimestamp( "DATE_UPDATE" ) ); + current.setLastLogin( org.fugerit.java.core.db.daogen.SQLTypeConverter.utilDateToLocalDateTime( rs.getTimestamp( "LAST_LOGIN" ) ) ); + current.setDateInsert( org.fugerit.java.core.db.daogen.SQLTypeConverter.utilDateToLocalDateTime( rs.getTimestamp( "DATE_INSERT" ) ) ); + current.setDateUpdate( org.fugerit.java.core.db.daogen.SQLTypeConverter.utilDateToLocalDateTime( rs.getTimestamp( "DATE_UPDATE" ) ) ); current.setState( rs.getBigDecimal( "STATE" ) ); return current; } diff --git a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/struct/ObjAddress.java b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/struct/ObjAddress.java index 3e7a5344..238acb57 100644 --- a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/struct/ObjAddress.java +++ b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/struct/ObjAddress.java @@ -68,8 +68,8 @@ public static ObjAddress wrap( ModelAddress model ) { public void readSQL(SQLInput stream, String typeName) throws SQLException { this.setId( stream.readBigDecimal() ); this.setIdUser( stream.readBigDecimal() ); - this.setDateInsert( stream.readTimestamp() ); - this.setDateUpdate( stream.readTimestamp() ); + this.setDateInsert( org.fugerit.java.core.db.daogen.SQLTypeConverter.utilDateToLocalDateTime( stream.readDate() ) ); + this.setDateUpdate( org.fugerit.java.core.db.daogen.SQLTypeConverter.utilDateToLocalDateTime( stream.readDate() ) ); this.setInfo( stream.readString() ); } @@ -77,8 +77,8 @@ public void readSQL(SQLInput stream, String typeName) throws SQLException { public void writeSQL(SQLOutput stream) throws SQLException { stream.writeBigDecimal( this.getId() ); stream.writeBigDecimal( this.getIdUser() ); - stream.writeTimestamp( org.fugerit.java.core.db.daogen.SQLTypeConverter.utilDateToSqlTimestamp( this.getDateInsert() ) ); - stream.writeTimestamp( org.fugerit.java.core.db.daogen.SQLTypeConverter.utilDateToSqlTimestamp( this.getDateUpdate() ) ); + stream.writeTimestamp( org.fugerit.java.core.db.daogen.SQLTypeConverter.localDateTimeToSqlTimestamp( this.getDateInsert() ) ); + stream.writeTimestamp( org.fugerit.java.core.db.daogen.SQLTypeConverter.localDateTimeToSqlTimestamp( this.getDateUpdate() ) ); stream.writeString( this.getInfo() ); } diff --git a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/struct/ObjLogData.java b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/struct/ObjLogData.java index 13135fbb..adfffd3d 100644 --- a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/struct/ObjLogData.java +++ b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/struct/ObjLogData.java @@ -67,14 +67,14 @@ public static ObjLogData wrap( ModelLogData model ) { @Override public void readSQL(SQLInput stream, String typeName) throws SQLException { this.setId( stream.readBigDecimal() ); - this.setLogTime( stream.readTimestamp() ); + this.setLogTime( org.fugerit.java.core.db.daogen.SQLTypeConverter.utilDateToLocalDateTime( stream.readDate() ) ); this.setInfo( stream.readString() ); } @Override public void writeSQL(SQLOutput stream) throws SQLException { stream.writeBigDecimal( this.getId() ); - stream.writeTimestamp( org.fugerit.java.core.db.daogen.SQLTypeConverter.utilDateToSqlTimestamp( this.getLogTime() ) ); + stream.writeTimestamp( org.fugerit.java.core.db.daogen.SQLTypeConverter.localDateTimeToSqlTimestamp( this.getLogTime() ) ); stream.writeString( this.getInfo() ); } diff --git a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/struct/ObjUpload.java b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/struct/ObjUpload.java index c0affe1e..b4479bd2 100644 --- a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/struct/ObjUpload.java +++ b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/struct/ObjUpload.java @@ -110,8 +110,8 @@ public static ObjUpload[] wrap( ModelUpload[] list, java.sql.Connection conn ) t @Override public void readSQL(SQLInput stream, String typeName) throws SQLException { this.setId( stream.readBigDecimal() ); - this.setDateInsert( stream.readTimestamp() ); - this.setDateUpdate( stream.readTimestamp() ); + this.setDateInsert( org.fugerit.java.core.db.daogen.SQLTypeConverter.utilDateToLocalDateTime( stream.readDate() ) ); + this.setDateUpdate( org.fugerit.java.core.db.daogen.SQLTypeConverter.utilDateToLocalDateTime( stream.readDate() ) ); this.setContent( org.fugerit.java.core.db.daogen.SQLTypeConverter.blobToByteHandler( (java.sql.Blob) stream.readObject() ) ); } @@ -122,8 +122,8 @@ public void writeSQL(SQLOutput stream) throws SQLException { } this.areLobsSet = false; // clob and blob will be used only once stream.writeBigDecimal( this.getId() ); - stream.writeTimestamp( org.fugerit.java.core.db.daogen.SQLTypeConverter.utilDateToSqlTimestamp( this.getDateInsert() ) ); - stream.writeTimestamp( org.fugerit.java.core.db.daogen.SQLTypeConverter.utilDateToSqlTimestamp( this.getDateUpdate() ) ); + stream.writeTimestamp( org.fugerit.java.core.db.daogen.SQLTypeConverter.localDateTimeToSqlTimestamp( this.getDateInsert() ) ); + stream.writeTimestamp( org.fugerit.java.core.db.daogen.SQLTypeConverter.localDateTimeToSqlTimestamp( this.getDateUpdate() ) ); stream.writeBlob( this.getContentBlob() ); } diff --git a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/struct/ObjUser.java b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/struct/ObjUser.java index 7ef7bca6..9eed1728 100644 --- a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/struct/ObjUser.java +++ b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/struct/ObjUser.java @@ -69,9 +69,9 @@ public void readSQL(SQLInput stream, String typeName) throws SQLException { this.setId( stream.readBigDecimal() ); this.setUsername( stream.readString() ); this.setPassword( stream.readString() ); - this.setLastLogin( stream.readTimestamp() ); - this.setDateInsert( stream.readTimestamp() ); - this.setDateUpdate( stream.readTimestamp() ); + this.setLastLogin( org.fugerit.java.core.db.daogen.SQLTypeConverter.utilDateToLocalDateTime( stream.readDate() ) ); + this.setDateInsert( org.fugerit.java.core.db.daogen.SQLTypeConverter.utilDateToLocalDateTime( stream.readDate() ) ); + this.setDateUpdate( org.fugerit.java.core.db.daogen.SQLTypeConverter.utilDateToLocalDateTime( stream.readDate() ) ); this.setState( stream.readBigDecimal() ); } @@ -80,9 +80,9 @@ public void writeSQL(SQLOutput stream) throws SQLException { stream.writeBigDecimal( this.getId() ); stream.writeString( this.getUsername() ); stream.writeString( this.getPassword() ); - stream.writeTimestamp( org.fugerit.java.core.db.daogen.SQLTypeConverter.utilDateToSqlTimestamp( this.getLastLogin() ) ); - stream.writeTimestamp( org.fugerit.java.core.db.daogen.SQLTypeConverter.utilDateToSqlTimestamp( this.getDateInsert() ) ); - stream.writeTimestamp( org.fugerit.java.core.db.daogen.SQLTypeConverter.utilDateToSqlTimestamp( this.getDateUpdate() ) ); + stream.writeTimestamp( org.fugerit.java.core.db.daogen.SQLTypeConverter.localDateTimeToSqlTimestamp( this.getLastLogin() ) ); + stream.writeTimestamp( org.fugerit.java.core.db.daogen.SQLTypeConverter.localDateTimeToSqlTimestamp( this.getDateInsert() ) ); + stream.writeTimestamp( org.fugerit.java.core.db.daogen.SQLTypeConverter.localDateTimeToSqlTimestamp( this.getDateUpdate() ) ); stream.writeBigDecimal( this.getState() ); } diff --git a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/struct/ObjUserData.java b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/struct/ObjUserData.java index 5b2f3d75..79012253 100644 --- a/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/struct/ObjUserData.java +++ b/fj-daogen-sample/src/main/java/org/fugerit/java/daogen/sample/impl/struct/ObjUserData.java @@ -69,9 +69,9 @@ public void readSQL(SQLInput stream, String typeName) throws SQLException { this.setId( stream.readBigDecimal() ); this.setUsername( stream.readString() ); this.setPassword( stream.readString() ); - this.setLastLogin( stream.readTimestamp() ); - this.setDateInsert( stream.readTimestamp() ); - this.setDateUpdate( stream.readTimestamp() ); + this.setLastLogin( org.fugerit.java.core.db.daogen.SQLTypeConverter.utilDateToLocalDateTime( stream.readDate() ) ); + this.setDateInsert( org.fugerit.java.core.db.daogen.SQLTypeConverter.utilDateToLocalDateTime( stream.readDate() ) ); + this.setDateUpdate( org.fugerit.java.core.db.daogen.SQLTypeConverter.utilDateToLocalDateTime( stream.readDate() ) ); this.setState( stream.readBigDecimal() ); } @@ -80,9 +80,9 @@ public void writeSQL(SQLOutput stream) throws SQLException { stream.writeBigDecimal( this.getId() ); stream.writeString( this.getUsername() ); stream.writeString( this.getPassword() ); - stream.writeTimestamp( org.fugerit.java.core.db.daogen.SQLTypeConverter.utilDateToSqlTimestamp( this.getLastLogin() ) ); - stream.writeTimestamp( org.fugerit.java.core.db.daogen.SQLTypeConverter.utilDateToSqlTimestamp( this.getDateInsert() ) ); - stream.writeTimestamp( org.fugerit.java.core.db.daogen.SQLTypeConverter.utilDateToSqlTimestamp( this.getDateUpdate() ) ); + stream.writeTimestamp( org.fugerit.java.core.db.daogen.SQLTypeConverter.localDateTimeToSqlTimestamp( this.getLastLogin() ) ); + stream.writeTimestamp( org.fugerit.java.core.db.daogen.SQLTypeConverter.localDateTimeToSqlTimestamp( this.getDateInsert() ) ); + stream.writeTimestamp( org.fugerit.java.core.db.daogen.SQLTypeConverter.localDateTimeToSqlTimestamp( this.getDateUpdate() ) ); stream.writeBigDecimal( this.getState() ); } diff --git a/fj-daogen-sample/src/test/java/org/fugerit/java/daogen/sample/junit4test/model/AddressJunit4ModelTest.java b/fj-daogen-sample/src/test/java/org/fugerit/java/daogen/sample/junit4test/model/AddressJunit4ModelTest.java index af1b058e..0547a0ae 100644 --- a/fj-daogen-sample/src/test/java/org/fugerit/java/daogen/sample/junit4test/model/AddressJunit4ModelTest.java +++ b/fj-daogen-sample/src/test/java/org/fugerit/java/daogen/sample/junit4test/model/AddressJunit4ModelTest.java @@ -44,9 +44,9 @@ public ModelAddress newInstance() { Assert.assertFalse( current.isEmpty() ); current.setIdUser(new java.math.BigDecimal( "1" )); Assert.assertFalse( current.isEmpty() ); - current.setDateInsert(new java.util.Date()); + current.setDateInsert(null); Assert.assertFalse( current.isEmpty() ); - current.setDateUpdate(new java.util.Date()); + current.setDateUpdate(null); Assert.assertFalse( current.isEmpty() ); current.setInfo("1"); Assert.assertFalse( current.isEmpty() ); @@ -60,7 +60,6 @@ public void testJUnit4ModelAddress() { ModelAddress current = this.newInstance(); this.printAll( current ); logger.info( "current toString() : {}", current ); - org.fugerit.java.core.function.SafeFunction.apply( () -> org.fugerit.java.core.io.ObjectIO.fullSerializationTest( current ) ); Assert.assertNotNull( current ); AddressFinder finder1 = new AddressFinder(); finder1.setModel( current ); diff --git a/fj-daogen-sample/src/test/java/org/fugerit/java/daogen/sample/junit4test/model/LogDataJunit4ModelTest.java b/fj-daogen-sample/src/test/java/org/fugerit/java/daogen/sample/junit4test/model/LogDataJunit4ModelTest.java index cd51f1eb..08d650bb 100644 --- a/fj-daogen-sample/src/test/java/org/fugerit/java/daogen/sample/junit4test/model/LogDataJunit4ModelTest.java +++ b/fj-daogen-sample/src/test/java/org/fugerit/java/daogen/sample/junit4test/model/LogDataJunit4ModelTest.java @@ -39,7 +39,7 @@ public ModelLogData newInstance() { Assert.assertTrue( current.isEmpty() ); current.setId(new java.math.BigDecimal( "1" )); Assert.assertFalse( current.isEmpty() ); - current.setLogTime(new java.util.Date()); + current.setLogTime(null); Assert.assertFalse( current.isEmpty() ); current.setInfo("1"); Assert.assertFalse( current.isEmpty() ); @@ -52,7 +52,6 @@ public void testJUnit4ModelLogData() { ModelLogData current = this.newInstance(); this.printAll( current ); logger.info( "current toString() : {}", current ); - org.fugerit.java.core.function.SafeFunction.apply( () -> org.fugerit.java.core.io.ObjectIO.fullSerializationTest( current ) ); Assert.assertNotNull( current ); LogDataFinder finder1 = new LogDataFinder(); finder1.setModel( current ); diff --git a/fj-daogen-sample/src/test/java/org/fugerit/java/daogen/sample/junit4test/model/TestTwoFieldKeyJunit4ModelTest.java b/fj-daogen-sample/src/test/java/org/fugerit/java/daogen/sample/junit4test/model/TestTwoFieldKeyJunit4ModelTest.java index 04a65c4b..37793dd0 100644 --- a/fj-daogen-sample/src/test/java/org/fugerit/java/daogen/sample/junit4test/model/TestTwoFieldKeyJunit4ModelTest.java +++ b/fj-daogen-sample/src/test/java/org/fugerit/java/daogen/sample/junit4test/model/TestTwoFieldKeyJunit4ModelTest.java @@ -52,7 +52,6 @@ public void testJUnit4ModelTestTwoFieldKey() { ModelTestTwoFieldKey current = this.newInstance(); this.printAll( current ); logger.info( "current toString() : {}", current ); - org.fugerit.java.core.function.SafeFunction.apply( () -> org.fugerit.java.core.io.ObjectIO.fullSerializationTest( current ) ); Assert.assertNotNull( current ); TestTwoFieldKeyFinder finder1 = new TestTwoFieldKeyFinder(); finder1.setModel( current ); diff --git a/fj-daogen-sample/src/test/java/org/fugerit/java/daogen/sample/junit4test/model/UploadJunit4ModelTest.java b/fj-daogen-sample/src/test/java/org/fugerit/java/daogen/sample/junit4test/model/UploadJunit4ModelTest.java index 07fec5a6..090a4525 100644 --- a/fj-daogen-sample/src/test/java/org/fugerit/java/daogen/sample/junit4test/model/UploadJunit4ModelTest.java +++ b/fj-daogen-sample/src/test/java/org/fugerit/java/daogen/sample/junit4test/model/UploadJunit4ModelTest.java @@ -40,9 +40,9 @@ public ModelUpload newInstance() { Assert.assertTrue( current.isEmpty() ); current.setId(new java.math.BigDecimal( "1" )); Assert.assertFalse( current.isEmpty() ); - current.setDateInsert(new java.util.Date()); + current.setDateInsert(null); Assert.assertFalse( current.isEmpty() ); - current.setDateUpdate(new java.util.Date()); + current.setDateUpdate(null); Assert.assertFalse( current.isEmpty() ); current.setContent(null); Assert.assertFalse( current.isEmpty() ); @@ -55,7 +55,6 @@ public void testJUnit4ModelUpload() { ModelUpload current = this.newInstance(); this.printAll( current ); logger.info( "current toString() : {}", current ); - org.fugerit.java.core.function.SafeFunction.apply( () -> org.fugerit.java.core.io.ObjectIO.fullSerializationTest( current ) ); Assert.assertNotNull( current ); UploadFinder finder1 = new UploadFinder(); finder1.setModel( current ); diff --git a/fj-daogen-sample/src/test/java/org/fugerit/java/daogen/sample/junit4test/model/UserDataJunit4ModelTest.java b/fj-daogen-sample/src/test/java/org/fugerit/java/daogen/sample/junit4test/model/UserDataJunit4ModelTest.java index 848dae48..b561a808 100644 --- a/fj-daogen-sample/src/test/java/org/fugerit/java/daogen/sample/junit4test/model/UserDataJunit4ModelTest.java +++ b/fj-daogen-sample/src/test/java/org/fugerit/java/daogen/sample/junit4test/model/UserDataJunit4ModelTest.java @@ -47,11 +47,11 @@ public ModelUserData newInstance() { Assert.assertFalse( current.isEmpty() ); current.setPassword("1"); Assert.assertFalse( current.isEmpty() ); - current.setLastLogin(new java.util.Date()); + current.setLastLogin(null); Assert.assertFalse( current.isEmpty() ); - current.setDateInsert(new java.util.Date()); + current.setDateInsert(null); Assert.assertFalse( current.isEmpty() ); - current.setDateUpdate(new java.util.Date()); + current.setDateUpdate(null); Assert.assertFalse( current.isEmpty() ); current.setState(new java.math.BigDecimal( "1" )); Assert.assertFalse( current.isEmpty() ); @@ -64,7 +64,6 @@ public void testJUnit4ModelUserData() { ModelUserData current = this.newInstance(); this.printAll( current ); logger.info( "current toString() : {}", current ); - org.fugerit.java.core.function.SafeFunction.apply( () -> org.fugerit.java.core.io.ObjectIO.fullSerializationTest( current ) ); Assert.assertNotNull( current ); UserDataFinder finder1 = new UserDataFinder(); finder1.setModel( current ); diff --git a/fj-daogen-sample/src/test/java/org/fugerit/java/daogen/sample/junit4test/model/UserJunit4ModelTest.java b/fj-daogen-sample/src/test/java/org/fugerit/java/daogen/sample/junit4test/model/UserJunit4ModelTest.java index 06cb6b52..c39c08ce 100644 --- a/fj-daogen-sample/src/test/java/org/fugerit/java/daogen/sample/junit4test/model/UserJunit4ModelTest.java +++ b/fj-daogen-sample/src/test/java/org/fugerit/java/daogen/sample/junit4test/model/UserJunit4ModelTest.java @@ -48,11 +48,11 @@ public ModelUser newInstance() { Assert.assertFalse( current.isEmpty() ); current.setPassword("1"); Assert.assertFalse( current.isEmpty() ); - current.setLastLogin(new java.util.Date()); + current.setLastLogin(null); Assert.assertFalse( current.isEmpty() ); - current.setDateInsert(new java.util.Date()); + current.setDateInsert(null); Assert.assertFalse( current.isEmpty() ); - current.setDateUpdate(new java.util.Date()); + current.setDateUpdate(null); Assert.assertFalse( current.isEmpty() ); current.setState(new java.math.BigDecimal( "1" )); Assert.assertFalse( current.isEmpty() ); @@ -68,7 +68,6 @@ public void testJUnit4ModelUser() { ModelUser current = this.newInstance(); this.printAll( current ); logger.info( "current toString() : {}", current ); - org.fugerit.java.core.function.SafeFunction.apply( () -> org.fugerit.java.core.io.ObjectIO.fullSerializationTest( current ) ); Assert.assertNotNull( current ); UserFinder finder1 = new UserFinder(); finder1.setModel( current ); diff --git a/src/docs/config/daogen-config-xsd-ref.html b/src/docs/config/daogen-config-xsd-ref.html index b34a5175..11a39a6a 100644 --- a/src/docs/config/daogen-config-xsd-ref.html +++ b/src/docs/config/daogen-config-xsd-ref.html @@ -271,7 +271,7 @@

Reference daogen-config.xsd documentation for Ma type-map-config - The type mapper config. It will be default to 'cl://config/daogen_default_type_mapping.xml'. It is usually safe to keep the default. + The type mapper config. It will default to 'cl://config/daogen_default_type_mapping.xml'. It is usually safe to keep the default. string @@ -337,7 +337,7 @@

Reference daogen-config.xsd documentation for Ma package-model - The package to be used for model interfaces, for each entity. (e.g. 'org.fugerit.java.daogen.sample.def.model'). The relevant generators and decorators will only by run if this property is set. + The package to be used for model interfaces, for each entity. (e.g. 'org.fugerit.java.daogen.sample.def.model'). The relevant generators and decorators will only run if this property is set. string @@ -348,7 +348,7 @@

Reference daogen-config.xsd documentation for Ma package-helper - The package to be used for basic model implementation classes, for each entity. (e.g. 'org.fugerit.java.daogen.sample.impl.helper'). The relevant generators and decorators will only by run if this property is set. + The package to be used for basic model implementation classes, for each entity. (e.g. 'org.fugerit.java.daogen.sample.impl.helper'). The relevant generators and decorators will only run if this property is set. string @@ -356,21 +356,21 @@

Reference daogen-config.xsd documentation for Ma - disable-singleton + package-helper-microprofile - If set to 'enabled' the singleton generation. (i.e. RSE DEFAULT field). + The package to be used model helper on miprofile specification. (e.g. 'org.fugerit.java.daogen.sample.impl.helper' or 'org.fugerit.java.daogen.sample.impl.microprofile'). The relevant generators and decorators will only run if this property is set. - enabledDisabledType , base : string , enumeration : [ enabled , disabled ] + string - dao-helper-ng-mode + disable-singleton - If set to 'enabled' the 'dao.helper.ng' property set will be selected. NOTE: when enabled, Helper entities will not be made serializable. + If set to 'enabled' the singleton generation. (i.e. RSE DEFAULT field). enabledDisabledType , base : string , enumeration : [ enabled , disabled ] @@ -378,10 +378,10 @@

Reference daogen-config.xsd documentation for Ma - dao-wrapper-ng-mode + dao-helper-ng-mode - If set to 'enabled' the 'dao.wrapper.ng' property set will be selected. NOTE: when enabled, Wrapper entities will not be made serializable. + If set to 'enabled' the 'dao.helper.ng' property set will be selected. NOTE: when enabled, Helper entities will not be made serializable. enabledDisabledType , base : string , enumeration : [ enabled , disabled ] @@ -389,10 +389,10 @@

Reference daogen-config.xsd documentation for Ma - dao-finder-ng-mode + dao-wrapper-ng-mode - If set to 'enabled' the 'dao.finder.ng' property set will be selected. NOTE: when enabled, Finder entities will not be made serializable. + If set to 'enabled' the 'dao.wrapper.ng' property set will be selected. NOTE: when enabled, Wrapper entities will not be made serializable. enabledDisabledType , base : string , enumeration : [ enabled , disabled ] @@ -400,10 +400,10 @@

Reference daogen-config.xsd documentation for Ma - dao-rest-ng-mode + dao-finder-ng-mode - If set to 'enabled' the 'dao.rest.ng' property set will be selected. NOTE: when enabled, Rest entities will not be made serializable. + If set to 'enabled' the 'dao.finder.ng' property set will be selected. NOTE: when enabled, Finder entities will not be made serializable. enabledDisabledType , base : string , enumeration : [ enabled , disabled ] @@ -411,10 +411,10 @@

Reference daogen-config.xsd documentation for Ma - type-mapper-time-ng + dao-rest-ng-mode - If set to 'enabled' the model_ng property in type mapper is selected. NOTE: when enabled, By default java.time.LocalDate/LocalTime/LocalDateTime will be used for model. + If set to 'enabled' the 'dao.rest.ng' property set will be selected. NOTE: when enabled, Rest entities will not be made serializable. enabledDisabledType , base : string , enumeration : [ enabled , disabled ] @@ -422,21 +422,21 @@

Reference daogen-config.xsd documentation for Ma - package-struct + type-mapper-time-ng - The package to be used for database java.sql.String classes, for each entity. (e.g. 'org.fugerit.java.daogen.sample.impl.struct'). The relevant generators and decorators will only by run if this property is set. + If set to 'enabled' the model_ng property in type mapper is selected. NOTE: when enabled, By default java.time.LocalDate/LocalTime/LocalDateTime will be used for model. - string + enabledDisabledType , base : string , enumeration : [ enabled , disabled ] - package-rse + package-struct - The package to be used for database org.fugerit.java.core.db.dao.RSExtractor classes, for each entity. (e.g. 'org.fugerit.java.daogen.sample.impl.rse'). The relevant generators and decorators will only by run if this property is set. + The package to be used for database java.sql.String classes, for each entity. (e.g. 'org.fugerit.java.daogen.sample.impl.struct'). The relevant generators and decorators will only by run if this property is set. string @@ -444,10 +444,10 @@

Reference daogen-config.xsd documentation for Ma - package-facade-def + package-rse - The package to be used for DAO facade interfaces, for each entity. (e.g. 'org.fugerit.java.daogen.sample.def.facade'). The relevant generators and decorators will only by run if this property is set. + The package to be used for database org.fugerit.java.core.db.dao.RSExtractor classes, for each entity. (e.g. 'org.fugerit.java.daogen.sample.impl.rse'). The relevant generators and decorators will only by run if this property is set. string @@ -455,10 +455,10 @@

Reference daogen-config.xsd documentation for Ma - package-facade-data-impl + package-facade-def - The package to be used for DAO facade basic implementation, for each entity. (e.g. 'org.fugerit.java.daogen.sample.impl.facade.data'). The relevant generators and decorators will only by run if this property is set. + The package to be used for DAO facade interfaces, for each entity. (e.g. 'org.fugerit.java.daogen.sample.def.facade'). The relevant generators and decorators will only by run if this property is set. string @@ -466,10 +466,10 @@

Reference daogen-config.xsd documentation for Ma - factory-def + package-facade-data-impl - The fully qualified name to be used for DAO factory interface. (e.g. 'org.fugerit.java.daogen.sample.def.facade.FugeritLogicFacade'). The relevant generators and decorators will only by run if this property is set. + The package to be used for DAO facade basic implementation, for each entity. (e.g. 'org.fugerit.java.daogen.sample.impl.facade.data'). The relevant generators and decorators will only by run if this property is set. string @@ -477,10 +477,10 @@

Reference daogen-config.xsd documentation for Ma - factory-data-impl + factory-def - The fully qualified name to be used for DAO factory basic implementation. (e.g. 'org.fugerit.java.daogen.sample.impl.facade.data.FugeritDataLogicFacade'). The relevant generators and decorators will only by run if this property is set. + The fully qualified name to be used for DAO factory interface. (e.g. 'org.fugerit.java.daogen.sample.def.facade.FugeritLogicFacade'). The relevant generators and decorators will only by run if this property is set. string @@ -488,10 +488,10 @@

Reference daogen-config.xsd documentation for Ma - package-rest-load + factory-data-impl - The package to be used for a basic rest service implementation, for load methods, for each entity. (e.g. 'org.fugerit.java.daogen.sample.impl.rest.load'). The relevant generators and decorators will only by run if this property is set. NOTE: REST services generation is not recommended, if not as a starting stub. + The fully qualified name to be used for DAO factory basic implementation. (e.g. 'org.fugerit.java.daogen.sample.impl.facade.data.FugeritDataLogicFacade'). The relevant generators and decorators will only by run if this property is set. string @@ -499,10 +499,10 @@

Reference daogen-config.xsd documentation for Ma - package-spring-rest-load + package-rest-load - The package to be used for a basic spring rest service implementation, for load methods, for each entity. (e.g. 'org.fugerit.java.daogen.sample.impl.spring.rest.load'). The relevant generators and decorators will only by run if this property is set. NOTE: REST services generation is not recommended, if not as a starting stub. + The package to be used for a basic rest service implementation, for load methods, for each entity. (e.g. 'org.fugerit.java.daogen.sample.impl.rest.load'). The relevant generators and decorators will only by run if this property is set. NOTE: REST services generation is not recommended, if not as a starting stub. string @@ -510,10 +510,10 @@

Reference daogen-config.xsd documentation for Ma - package-junit4-model + package-spring-rest-load - The package to be used for a basic junit 4 implementation, for each entity. (e.g. 'org.fugerit.java.daogen.sample.junit4test.model'). The relevant generators and decorators will only by run if this property is set. NOTE: The junit generation is a very simple stub to start with. + The package to be used for a basic spring rest service implementation, for load methods, for each entity. (e.g. 'org.fugerit.java.daogen.sample.impl.spring.rest.load'). The relevant generators and decorators will only by run if this property is set. NOTE: REST services generation is not recommended, if not as a starting stub. string @@ -521,10 +521,10 @@

Reference daogen-config.xsd documentation for Ma - package-junit5-model + package-junit4-model - The package to be used for a basic junit 5 implementation, for each entity. (e.g. 'org.fugerit.java.daogen.sample.junit5test.model'). The relevant generators and decorators will only by run if this property is set. NOTE: The junit generation is a very simple stub to start with. + The package to be used for a basic junit 4 implementation, for each entity. (e.g. 'org.fugerit.java.daogen.sample.junit4test.model'). The relevant generators and decorators will only by run if this property is set. NOTE: The junit generation is a very simple stub to start with. string @@ -532,10 +532,10 @@

Reference daogen-config.xsd documentation for Ma - graalvm-reflect-config + package-junit5-model - Path to the reflect-config.json file to be created (e.g. 'daogen-reflect-config.json'). Initial folder is defined by 'src-main-resources' property. NOTE: Only one file for all the project will be created. + The package to be used for a basic junit 5 implementation, for each entity. (e.g. 'org.fugerit.java.daogen.sample.junit5test.model'). The relevant generators and decorators will only by run if this property is set. NOTE: The junit generation is a very simple stub to start with. string @@ -543,10 +543,10 @@

Reference daogen-config.xsd documentation for Ma - base-rest-service + graalvm-reflect-config - The base class for REST services. (e.g. 'org.fugerit.java.daogen.sample.helper.ServiceProviderHelper'). NOTE: REST services generation is not recommended, if not as a starting stub. + Path to the reflect-config.json file to be created (e.g. 'daogen-reflect-config.json'). Initial folder is defined by 'src-main-resources' property. NOTE: Only one file for all the project will be created. string @@ -554,32 +554,32 @@

Reference daogen-config.xsd documentation for Ma - openapi_host + base-rest-service - The host to be used for openapi specification and implementation specification. + The base class for REST services. (e.g. 'org.fugerit.java.daogen.sample.helper.ServiceProviderHelper'). NOTE: REST services generation is not recommended, if not as a starting stub. - anyURI + string - openapi_path + openapi_host - The path to be used for openapi specification and implementation specification. + The host to be used for openapi specification and implementation specification. - string + anyURI - default-sequence + openapi_path - The default sequence name to be used for the entities (it is possible to override it). + The path to be used for openapi specification and implementation specification. string @@ -587,10 +587,10 @@

Reference daogen-config.xsd documentation for Ma - check-empty-interface + default-sequence - If set to '1' will check if interfaces have no methods. NOTE: currently ignored. + The default sequence name to be used for the entities (it is possible to override it). string @@ -598,23 +598,34 @@

Reference daogen-config.xsd documentation for Ma - jdk-target-version + check-empty-interface - The jdk target version. + If set to '1' will check if interfaces have no methods. NOTE: currently ignored. - jdkTargetVersionType , base : string , enumeration : [ 8 , 11 , 17 , 21 ] + string - jee-target-mode + jdk-target-version - The enterprise edition target environment. + The jdk target version. + jdkTargetVersionType , base : string , enumeration : [ 8 , 11 , 17 , 21 ] + + + + + jee-target-mode + + + The enterprise edition target environment. + + jeeTargetModeType , base : string , enumeration : [ javax , jakarta ] @@ -1001,6 +1012,17 @@

Reference daogen-config.xsd documentation for Ma string + + + + exampleData + + + Example data for the field. (e.g. '123') It will be used by all relevant generators. (for instance MicroProfileSchemaWrapperGenerator) + + + string +