Class ClassGenerator

java.lang.Object
ch.helvethink.odoo4java.generator.ClassGenerator

public final class ClassGenerator extends Object
Main class to generate models.
  • Field Details

    • LOG

      public static final org.slf4j.Logger LOG
      Simple Logger
  • Method Details

    • generateClass

      public static void generateClass(List<String> excludedPrefixes, List<String> includedPrefixes, String pathToGenerate, String generatedRootPackage, String modelName, Map<String,Map<String,Object>> fields) throws IOException
      Main method to generate a class for a model All attributes of the object are public (no getters and setters), this is very conscious
      Parameters:
      pathToGenerate - Path where we want to generate files - default will be "target"
      modelName - Name of the model we want to generate a class for
      fields - Fields that have been returned from Odoo for this model
      Throws:
      IOException - If we can't write to the destination directory
    • generateClassNG

      public static void generateClassNG(List<String> excludedPrefixes, List<String> includedPrefixes, String pathToGenerate, String generatedRootPackage, String modelName, Map<String,Map<String,Object>> fields) throws IOException
      Main method to generate a class for a model All attributes of the object are public (no getters and setters), this is very conscious
      Parameters:
      pathToGenerate - Path where we want to generate files - default will be "target"
      modelName - Name of the model we want to generate a class
      fields - Fields that have been returned from Odoo for this model
      Throws:
      IOException - If we can't write to the destination directory