Package com.digitolio.jdbi.table

Examples of com.digitolio.jdbi.table.TableResolver


    public static void main(String[] args) throws IOException {
        if (args[0].contains("OVERWRITE_THIS_VALUE")) {
            return;
        }
        SnakeCaseTranslatingStrategy strategy = new SnakeCaseTranslatingStrategy();
        TableResolver tableResolver = new TableResolver();

//        Set<Class<?>> inputClasses = new Scanner().scanPackage("com.digitolio.jdbi.codegen.test");
        Set<Class<?>> inputClasses = scanPackage(args[0]);
        List<Class<?>> classes = orderClasses(inputClasses);
        cleanDirectoryForNewDll(new File(args[1].concat("/db/h2/")));
//        File targetDir = new File("D:\\PersonalProjects\\digitolio\\jdbi-codegen\\src\\main\\java\\cemo");
        File targetDir = new File(args[1]);
        StringBuilder allDdl = new StringBuilder();

        for (Class<?> aClass : classes) {
            Table resolve = tableResolver.resolve(aClass, strategy);
            H2Generator h2Generator = new H2Generator(resolve, aClass, targetDir);
            Object generate = h2Generator.generate();
            String content = generate.toString();
            allDdl.append(content).append("\n\n");
            File file = new File(args[1].concat("/db/h2/").concat(resolve.getTableName().toLowerCase().concat(".ddl")));
View Full Code Here


    public static void main(String[] args) {

        if(args[0].contains("OVERWRITE_THIS_VALUE")){return;}

        SnakeCaseTranslatingStrategy strategy = new SnakeCaseTranslatingStrategy();
        TableResolver tableResolver = new TableResolver();

        Set<Class<?>> classes = new Scanner().scanPackage(args[0]);
        File targetDir = new File(args[1]);

        for (Class<?> aClass : classes) {
            Table resolve = tableResolver.resolve(aClass, strategy);
            DAOGenerator daoGenerator = new DAOGenerator(aClass, resolve, targetDir);
            try {
                daoGenerator.generate();
            } catch (JClassAlreadyExistsException e) {
                e.printStackTrace();
View Full Code Here

    public static void main(String[] args) {

        if(args[0].contains("OVERWRITE_THIS_VALUE")){return;}

        SnakeCaseTranslatingStrategy strategy = new SnakeCaseTranslatingStrategy();
        TableResolver tableResolver = new TableResolver();
        Scanner scanner = new Scanner();
        Set<Class<?>> classes = scanner.scanPackage(args[0], CodeGen.CODE_GEN);
        File targetDir = new File(args[1]);

        for (Class<?> aClass : classes) {
            Table resolve = tableResolver.resolve(aClass, strategy);
            DAOGenerator daoGenerator = new DAOGenerator(aClass, resolve, targetDir);
            try {
                daoGenerator.generate();
            } catch (JClassAlreadyExistsException e) {
                e.printStackTrace();
View Full Code Here

    public static void main(String[] args) throws IOException {
        if (args[0].contains("OVERWRITE_THIS_VALUE")) {
            return;
        }
        SnakeCaseTranslatingStrategy strategy = new SnakeCaseTranslatingStrategy();
        TableResolver tableResolver = new TableResolver();

//        Set<Class<?>> inputClasses = new Scanner().scanPackage("com.digitolio.jdbi.codegen.test");
        Set<Class<?>> inputClasses = scanPackage(args[0]);
        List<Class<?>> classes = orderClasses(inputClasses);
        cleanDirectoryForNewDll(new File(args[1].concat("/db/h2/")));
//        File targetDir = new File("D:\\PersonalProjects\\digitolio\\jdbi-codegen\\src\\main\\java\\cemo");
        File targetDir = new File(args[1]);
        StringBuilder allDdl = new StringBuilder();

        for (Class<?> aClass : classes) {
            Table resolve = tableResolver.resolve(aClass, strategy);
            H2Generator h2Generator = new H2Generator(resolve, aClass, targetDir);
            Object generate = h2Generator.generate();
            String content = generate.toString();
            allDdl.append(content).append("\n\n");
            File file = new File(args[1].concat("/db/h2/").concat(resolve.getTableName().toLowerCase().concat(".ddl")));
View Full Code Here

    public static void main(String[] args) throws IOException {
        if (args[0].contains("OVERWRITE_THIS_VALUE")) {
            return;
        }
        SnakeCaseTranslatingStrategy strategy = new SnakeCaseTranslatingStrategy();
        TableResolver tableResolver = new TableResolver();

//        Set<Class<?>> inputClasses = new Scanner().scanPackage("com.digitolio.jdbi.codegen.test");
        Set<Class<?>> inputClasses = scanPackage(args[0]);
        List<Class<?>> classes = orderClasses(inputClasses);
        cleanDirectoryForNewDll(new File(args[1].concat("/db/h2/")));
//        File targetDir = new File("D:\\PersonalProjects\\digitolio\\jdbi-codegen\\src\\main\\java\\cemo");
        File targetDir = new File(args[1]);
        StringBuilder allDdl = new StringBuilder();

        for (Class<?> aClass : classes) {
            Table resolve = tableResolver.resolve(aClass, strategy);
            H2Generator h2Generator = new H2Generator(resolve, aClass, targetDir);
            Object generate = h2Generator.generate();
            String content = generate.toString();
            allDdl.append(content).append("\n\n");
            File file = new File(args[1].concat("/db/h2/").concat(resolve.getTableName().toLowerCase().concat(".ddl")));
View Full Code Here

TOP

Related Classes of com.digitolio.jdbi.table.TableResolver

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.