You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@empire-db.apache.org by Benjamin Venditti <be...@web.de> on 2009/11/14 15:28:33 UTC

Empire-db code generator | 3rd patch

Hi there,

I have uploaded a new patch that will get rid of the additional 
Database, Table and Column bean classes.
The codegen now uses the empire DBDatabase, DBTable and DBColumn classes 
instead.

The patch contains the following changes:
 modifications:
  - CodeGen.java
  - CodeGenConfig.java    // option named "tableClassSuffix" added
  - config.xml                     // option named "tableClassSuffix" added
  - Database.vm
  - Record.vm
  - Table.vm

deletions:
  - package org.apache.empire.db.codegen.types
  - StringUtils.java  // partly moved to ParserUtil.java

additions:
  - CodeGenParser.java  // Used to create a empty DBDatabase and to 
populate that
  - ParserUtil.java           // Used by the velocity templates to get 
strings like accessor name, mutator name, table class name, record class 
name

I think we should go through the configuation options in CodeGenConfig, 
as there are still some things in the templates that are hardcoded, like 
e.g. the "T_" of the variable names. I'll propose a list with 
configuation options soon.

Regards
    Benjamin

Re: Empire-db code generator | 3rd patch

Posted by Francis De Brabandere <fr...@gmail.com>.
Will apply this patch this evening.
Cheers,
Francis

On Nov 14, 2009 3:30 p.m., "Benjamin Venditti" <be...@web.de> wrote:

Hi there,

I have uploaded a new patch that will get rid of the additional Database,
Table and Column bean classes.
The codegen now uses the empire DBDatabase, DBTable and DBColumn classes
instead.

The patch contains the following changes:
modifications:
 - CodeGen.java
 - CodeGenConfig.java    // option named "tableClassSuffix" added
 - config.xml                     // option named "tableClassSuffix" added
 - Database.vm
 - Record.vm
 - Table.vm

deletions:
 - package org.apache.empire.db.codegen.types
 - StringUtils.java  // partly moved to ParserUtil.java

additions:
 - CodeGenParser.java  // Used to create a empty DBDatabase and to populate
that
 - ParserUtil.java           // Used by the velocity templates to get
strings like accessor name, mutator name, table class name, record class
name

I think we should go through the configuation options in CodeGenConfig, as
there are still some things in the templates that are hardcoded, like e.g.
the "T_" of the variable names. I'll propose a list with configuation
options soon.

Regards
  Benjamin