/** * Create an instance of {@link Generate } * */ public Generate createGenerate() { return new Generate(); }
g.setGenerate(new Generate()); if (g.getGenerate().isIndexes() != null) generator.setGenerateIndexes(g.getGenerate().isIndexes()); if (g.getGenerate().isRelations() != null) generator.setGenerateRelations(g.getGenerate().isRelations()); if (g.getGenerate().isImplicitJoinPathsToOne() != null) generator.setGenerateImplicitJoinPathsToOne(g.getGenerate().isImplicitJoinPathsToOne()); if (g.getGenerate().isDeprecated() != null) generator.setGenerateDeprecated(g.getGenerate().isDeprecated()); if (g.getGenerate().isDeprecationOnUnknownTypes() != null) generator.setGenerateDeprecationOnUnknownTypes(g.getGenerate().isDeprecationOnUnknownTypes()); if (g.getGenerate().isInstanceFields() != null) generator.setGenerateInstanceFields(g.getGenerate().isInstanceFields()); if (g.getGenerate().isGeneratedAnnotation() != null) generator.setGenerateGeneratedAnnotation(g.getGenerate().isGeneratedAnnotation()); if (g.getGenerate().isRoutines() != null) generator.setGenerateRoutines(g.getGenerate().isRoutines()); if (g.getGenerate().isSequences() != null) generator.setGenerateSequences(g.getGenerate().isSequences()); if (g.getGenerate().isUdts() != null) generator.setGenerateUDTs(g.getGenerate().isUdts()); if (g.getGenerate().isTables() != null) generator.setGenerateTables(g.getGenerate().isTables()); if (g.getGenerate().isRecords() != null) generator.setGenerateRecords(g.getGenerate().isRecords()); if (g.getGenerate().isRecordsImplementingRecordN() != null) generator.setGenerateRecordsImplementingRecordN(g.getGenerate().isRecordsImplementingRecordN()); if (g.getGenerate().isPojos() != null) generator.setGeneratePojos(g.getGenerate().isPojos());
public static void codegen() throws Exception { List<ForcedType> forcedTypes = JooqConfig.defaultForcedTypes(); HikariDataSource ds = CMSConnectionPools.processing(); Configuration configuration = new Configuration() .withJdbc(new Jdbc() .withDriver(Driver.class.getName()) .withUrl(ds.getJdbcUrl()) .withUser(ds.getUsername()) .withPassword(ds.getPassword())) .withGenerator(new Generator() .withDatabase(new Database() .withName(MySQLDatabase.class.getName()) .withIncludes(".*") .withExcludes("") .withIncludeExcludeColumns(true) .withForcedTypes(forcedTypes) .withInputSchema("sj_cms")) .withGenerate(new Generate() .withJavaTimeTypes(true)) .withStrategy(new Strategy() .withName(CustomGeneratorStrategy.class.getName())) .withTarget(new Target() .withPackageName("com.stubbornjava.cms.server.generated") .withDirectory("src/generated/java"))); GenerationTool.generate(configuration); }
@Override public int hashCode() { final int prime = 31; int result = 1; result = ((prime*result)+((name == null)? 0 :name.hashCode())); result = ((prime*result)+((strategy == null)? 0 :strategy.hashCode())); result = ((prime*result)+((database == null)? 0 :database.hashCode())); result = ((prime*result)+((generate == null)? 0 :generate.hashCode())); result = ((prime*result)+((target == null)? 0 :target.hashCode())); return result; }
if (!generate.equals(other.generate)) { return false;