Java 类org.jooq.util.GenerationTool 实例源码

项目:vertx-jooq-async    文件:VertxGeneratorTest.java   
@Test
public void generateCodeShouldSucceed() throws Exception {
    Configuration configuration = TestTool.createGeneratorConfig(
            FutureAsyncVertxGenerator.class.getName(),"future.async.vertx",  FutureAsyncGeneratorStrategy.class);
    try {
        GenerationTool.generate(configuration);
        Assert.assertTrue(true);
    } catch (Exception e) {
        e.printStackTrace();
        Assert.fail(e.getMessage());
    }
}
项目:vertx-jooq-async    文件:VertxGeneratorTest.java   
@Test
public void generateCodeShouldSucceed() throws Exception {
    Configuration configuration = TestTool.createGeneratorConfig(
            RXAsyncVertxGenerator.class.getName(), "rx.async.vertx", RXAsyncGeneratorStrategy.class);
    try {
        GenerationTool.generate(configuration);
        Assert.assertTrue(true);
    } catch (Exception e) {
        e.printStackTrace();
        Assert.fail(e.getMessage());
    }
}
项目:vertx-jooq-async    文件:VertxGeneratorTest.java   
@Test
public void generateCodeShouldSucceed() throws Exception {
    Configuration configuration = TestTool.createGeneratorConfig(
            ClassicAsyncVertxGenerator.class.getName(),"classic.async.vertx", ClassicAsyncGeneratorStrategy.class);
    try {
        GenerationTool.generate(configuration);
        Assert.assertTrue(true);
    } catch (Exception e) {
        e.printStackTrace();
        Assert.fail(e.getMessage());
    }
}
项目:jooq-flyway-typesafe-migration    文件:ModelSynchronizer.java   
private void generate(Configuration configuration) {
    try {
        GenerationTool.generate(configuration);
    } catch (Exception e) {
        throw new RuntimeException("Model generation in " + configuration.getGenerator().getTarget().getDirectory() + " failed", e);
    }
}
项目:carbon    文件:JooqCodeGenerator.java   
public void generate() throws Exception {
    Configuration configuration = new Configuration()
        .withJdbc(new Jdbc()
            .withDriver(dialect.getDriverClassName())
            .withUrl(getUrl())
            .withUsername(user)
            .withPassword(password))
        .withGenerator(new Generator()
            .withName(CarbonJooqGenerator.class.getName())
            .withGenerate(new Generate()
                .withRelations(true)
                .withImmutablePojos(false) // if true, cannot use 'into()' method
                .withInterfaces(true)
                .withDaos(true))
            .withDatabase(new Database()
                .withName(getJooqDBClassName())
                .withIncludes(".*")
                .withExcludes("")
                .withInputSchema(db)
                .withForcedTypes(new ForcedType()
                    .withUserType(LocalDateTime.class.getName())
                    .withConverter(LocalDateTimeConverter.class.getName())
                    .withTypes("DATETIME"))
            )
            .withTarget(new Target()
                .withPackageName(packageName)
                .withDirectory(outputDir.getAbsolutePath())));
    GenerationTool.generate(configuration);
}
项目:vertx-jooq    文件:VertxGeneratorTest.java   
@Test
public void generateCodeShouldSucceed() throws Exception {
    Configuration configuration = TestTool.createGeneratorConfig(
            ClassicVertxGenerator.class.getName(),"classic.asindb", ClassicAsInDBGeneratorStrategy.class);
    try {
        GenerationTool.generate(configuration);
        Assert.assertTrue(true);
    } catch (Exception e) {
        e.printStackTrace();
        Assert.fail(e.getMessage());
    }
}
项目:vertx-jooq    文件:VertxGeneratorTest.java   
@Test
public void generateCodeShouldSucceed() throws Exception {
    Configuration configuration = TestTool.createGeneratorConfig(
            ClassicVertxGenerator.class.getName(),"classic.lowercase", ToLowerCaseGeneratorStrategy.class);
    try {
        GenerationTool.generate(configuration);
        Assert.assertTrue(true);
    } catch (Exception e) {
        e.printStackTrace();
        Assert.fail(e.getMessage());
    }
}
项目:vertx-jooq    文件:VertxGeneratorTest.java   
@Test
public void generateCodeShouldSucceed() throws Exception {
    Configuration configuration = TestTool.createGeneratorConfig(
            FutureVertxGenerator.class.getName(),"future.vertx",  FutureGeneratorStrategy.class);
    try {
        GenerationTool.generate(configuration);
        Assert.assertTrue(true);
    } catch (Exception e) {
        e.printStackTrace();
        Assert.fail(e.getMessage());
    }
}
项目:vertx-jooq    文件:VertxGuiceGeneratorTest.java   
@Test
public void generateCodeShouldSucceed() throws Exception {

    Configuration configuration = TestTool.createGeneratorConfig(
            FutureVertxGuiceGenerator.class.getName(),"future.guice",  FutureGeneratorStrategy.class);

    try {
        GenerationTool.generate(configuration);
        Assert.assertTrue(true);
    } catch (Exception e) {
        e.printStackTrace();
        Assert.fail(e.getMessage());
    }
}
项目:vertx-jooq    文件:VertxGeneratorTest.java   
@Test
public void generateCodeShouldSucceed() throws Exception {
    Configuration configuration = TestTool.createGeneratorConfig(
            RXVertxGenerator.class.getName(),"rx.vertx",  RXGeneratorStrategy.class);
    try {
        GenerationTool.generate(configuration);
        Assert.assertTrue(true);
    } catch (Exception e) {
        e.printStackTrace();
        Assert.fail(e.getMessage());
    }
}
项目:vertx-jooq    文件:VertxGuiceGeneratorTest.java   
@Test
public void generateCodeShouldSucceed() throws Exception {

    Configuration configuration = TestTool.createGeneratorConfig(
            RXVertxGuiceGenerator.class.getName(),"rx.guice",  RXGeneratorStrategy.class);

    try {
        GenerationTool.generate(configuration);
        Assert.assertTrue(true);
    } catch (Exception e) {
        e.printStackTrace();
        Assert.fail(e.getMessage());
    }
}
项目:vertx-jooq    文件:VertxGeneratorTest.java   
@Test
public void generateCodeShouldSucceed() throws Exception {
    Configuration configuration = TestTool.createGeneratorConfig(
            ClassicVertxGenerator.class.getName(),"classic.vertx", ClassicGeneratorStrategy.class);
    try {
        GenerationTool.generate(configuration);
        Assert.assertTrue(true);
    } catch (Exception e) {
        e.printStackTrace();
        Assert.fail(e.getMessage());
    }
}
项目:vertx-jooq    文件:VertxGuiceGeneratorTest.java   
@Test
public void generateCodeShouldSucceed() throws Exception {

    Configuration configuration = TestTool.createGeneratorConfig(
            ClassicVertxGuiceGenerator.class.getName(),"classic.guice",  ClassicGeneratorStrategy.class);

    try {
        GenerationTool.generate(configuration);
        Assert.assertTrue(true);
    } catch (Exception e) {
        e.printStackTrace();
        Assert.fail(e.getMessage());
    }
}
项目:BfROpenLab    文件:CodeGenerator.java   
public static void main(String[] args) throws Exception {
    GenerationTool.main(new String[] { CodeGenerator.class.getResource("jooq.xml").getFile() });
}