Adempiere 3.5.2a

org.adempiere.util
Class ModelClassGenerator

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

public class ModelClassGenerator
extends Object

Generate Model Classes extending PO. Base class for CMP interface - will be extended to create byte code directly

Version:
$Id: GenerateModel.java,v 1.42 2005/05/08 15:16:56 jjanke Exp $
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
  • better formating of generated source
  • [ 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, Victor Perez, e-Evolution
  • FR [ 1785001 ] Using ModelPackage of EntityType to Generate Model Class

  • Field Summary
    static String COPY
              File Header
    static String NL
               
     
    Constructor Summary
    ModelClassGenerator(int AD_Table_ID, String directory, String packageName)
              Generate PO Class
     
    Method Summary
     void generateJavaGetComment(String propertyName, String description, StringBuffer result)
               
     void generateJavaSetComment(String columnName, String propertyName, String description, StringBuffer result)
               
    static void main(String[] args)
              Generate PO Model Class.
     String toString()
              String representation
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
     

    Field Detail

    NL

    public static final String NL
    See Also:
    Constant Field Values

    COPY

    public static final String COPY
    File Header

    See Also:
    Constant Field Values
    Constructor Detail

    ModelClassGenerator

    public ModelClassGenerator(int AD_Table_ID,
                               String directory,
                               String packageName)
    Generate PO Class

    Parameters:
    AD_Table_ID - table id
    directory - directory with \ or / at the end.
    packageName - package name
    Method Detail

    generateJavaSetComment

    public void generateJavaSetComment(String columnName,
                                       String propertyName,
                                       String description,
                                       StringBuffer result)

    generateJavaGetComment

    public void generateJavaGetComment(String propertyName,
                                       String description,
                                       StringBuffer result)

    toString

    public String toString()
    String representation

    Overrides:
    toString in class Object
    Returns:
    string representation

    main

    public static void main(String[] args)
    Generate PO Model Class.
            Example: java GenerateModel.class mydirectory myPackage 'U','A'
            would generate entity type User and Application classes into mydirectory.
            Without parameters, the default is used:
            C:\Compiere\compiere-all\extend\src\compiere\model\ compiere.model 'U','A'
            

    Parameters:
    args - directory package entityType - directory where to save the generated file - package of the classes to be generated - entityType to be generated

    Adempiere 3.5.2a

    Adempiere® is a registered trademark of ADempiere Business Inc. ©2004-2008 HumanFlash.com All rights reserved.