Class ModelClassGenerator

java.lang.Object
org.adempiere.util.ModelClassGenerator

public class ModelClassGenerator extends Object
Generate Model Classes extending PO.
Author:
Jorg Janke, Teo Sarca, SC ARHIPAC SERVICE SRL
  • BF [ 1781629 ] Don't use Env.NL in model class/interface generators
  • FR [ 1781630 ] Generated class/interfaces have a lot of unused imports
  • BF [ 1781632 ] Generated class/interfaces should be UTF-8
  • FR [ xxxxxxx ] better formating of generated source
  • FR [ 1787876 ] ModelClassGenerator: list constants should be ordered
  • FR [ 1803309 ] Model generator: generate get method for Search cols
  • FR [ 1990848 ] Generated Models: remove hardcoded field length
  • FR [ 2343096 ] Model Generator: Improve Reference Class Detection
  • BF [ 2780468 ] ModelClassGenerator: not generating methods for Created*
  • --
  • FR [ 2848449 ] ModelClassGenerator: Implement model getters https://sourceforge.net/p/adempiere/feature-requests/812/, Victor Perez, e-Evolution
  • FR [ 1785001 ] Using ModelPackage of EntityType to Generate Model Class
    • Field Details

    • Constructor Details

      • ModelClassGenerator

        public ModelClassGenerator(int AD_Table_ID, String directory, String packageName, String entityTypeFilter)
        Generate PO Class
        Parameters:
        AD_Table_ID - table id
        directory - directory
        packageName - package name
        entityTypeFilter - entity type filter for columns
    • Method Details

      • generateJavaSetComment

        public void generateJavaSetComment(String columnName, String propertyName, String description, StringBuilder result)
        Generate javadoc comment for Set methods.
        Parameters:
        columnName -
        propertyName -
        description -
        result -
      • generateJavaGetComment

        public void generateJavaGetComment(String propertyName, String description, StringBuilder result)
        Generate javadoc comment for Get methods
        Parameters:
        propertyName -
        description -
        result -
      • toString

        public String toString()
        String representation
        Overrides:
        toString in class Object
        Returns:
        string representation
      • generateSource

        public static void generateSource(String sourceFolder, String packageName, String entityType, String tableName, String columnEntityType)
        Parameters:
        sourceFolder -
        packageName -
        entityType -
        tableName - table Like
        columnEntityType -