Hi Rit?

At this time there is no documentation but the codegen example (maven)
mvn empiredb:codegen

CodeGenMojo.java (in the maven plugin module) explains how to use the
codegenerator programatically:

CodeGenConfig config = new CodeGenConfig();
                if(configFile != null)
                {
                        getLog().info("Loading configuration file: " + 
configFile);
                        config.init(configFile.getAbsolutePath());
                }
                else
                {
                        config.setJdbcURL(jdbcURL);
                        config.setJdbcClass(jdbcClass);
                        config.setJdbcUser(jdbcUser);
                        config.setJdbcPwd(jdbcPwd);
                        
config.setTargetFolder(targetDirectory.getAbsolutePath());
                        config.setTemplateFolder(templateDirectory);
                        config.setPackageName(packageName);
                }
                
                //config.setExceptionsEnabled(true);
                
                getLog().info("Generating code for " + jdbcURL + " ...");
                
                CodeGenParser parser = new CodeGenParser(config);
                DBDatabase db = parser.loadDbModel();
                
                CodeGenWriter codeGen = new CodeGenWriter(config);
                codeGen.generateCodeFiles(db);


I hope this helps,
Francis

On 17 April 2012 22:14, [email protected] <[email protected]> wrote:
> I'm starting from scratch when it comes to empiredb, so am not to clear on
> how everything hangs together. Is there a doc covering how to use the
> codegen module so that I can convert a current schema into code.
>
>
>
> Thanks

Reply via email to