Package cz.o2.proxima.generator
Class ModelGenerator
- java.lang.Object
-
- cz.o2.proxima.generator.ModelGenerator
-
public class ModelGenerator extends java.lang.Object
Generates code for accessing data of entity and it's attributes.
-
-
Constructor Summary
Constructors Constructor Description ModelGenerator(java.lang.String javaPackage, java.lang.String className, java.io.File configPath, java.io.File outputPath)
Construct theModelGenerator
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
generate()
void
generate(java.io.Writer writer)
static void
main(java.lang.String[] args)
Generate the model from command-line interface.
-
-
-
Constructor Detail
-
ModelGenerator
public ModelGenerator(java.lang.String javaPackage, java.lang.String className, java.io.File configPath, java.io.File outputPath)
Construct theModelGenerator
.- Parameters:
javaPackage
- Java package the model classes are going to be generated in.className
- Class name of the generated model.configPath
- Config to generate the model from.outputPath
- Output directory for the generated model.
-
-
Method Detail
-
main
public static void main(java.lang.String[] args) throws java.lang.Exception
Generate the model from command-line interface.- Parameters:
args
- command-line arguments- Throws:
java.lang.Exception
- on error
-
generate
public void generate() throws java.lang.Exception
- Throws:
java.lang.Exception
-
generate
public void generate(java.io.Writer writer) throws freemarker.template.TemplateException, java.io.IOException
- Throws:
freemarker.template.TemplateException
java.io.IOException
-
-