Class 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 the ModelGenerator.
    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ModelGenerator

        public ModelGenerator​(java.lang.String javaPackage,
                              java.lang.String className,
                              java.io.File configPath,
                              java.io.File outputPath)
        Construct the ModelGenerator.
        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