Hi

NewGenerateMapBuilderTask does not generate the types for the business
object correctly.  The get/set methods use the correct types but all the
private data memebers are of type String.

Here is a patch (Oops, I updated my copy with Daniel's patch so this will
include his as well :-)


RCS file:
/products/cvs/turbine/turbine/examples/NewGenerateMapBuilderTask.java,v
retrieving revision 1.1
diff -r1.1 NewGenerateMapBuilderTask.java
126c126
<     private static String packages = "";
---
>     private static String packageName = "";
193c193
<     public String getPackages() {return packages;}
---
>     public String getPackage() {return packageName;}
199c199
<     public void setPackages(String  v) {this.packages = v;}
---
>     public void setPackage(String  v) {this.packageName = v;}
262a263
>             // HELP: May need separator?
404c405,407
<      * Make directories for packages
---
>      * Turn the package name into an OS-specific directory name.
>      *
>      * @return The package name as a path name.
408,409c411
<         String p = getPackages();
<         return p.replace('.', File.sperator.charAt(0) ) + s;
---
>         return getPackage().replace( '.', File.separator.charAt(0) );
424,425c426
<
<
---
>             // HELP: May need separators?
428,429d428
<
<
433c432
<             outFile.println( "package " + getPackages() + ";" );
---
>             outFile.println( "package " + getPackage() + ";" );
445c444
<             outFile.println( "    public static final String CLASS_NAME =
\"" + getPackages() + "." + className + "\";");
---
>             outFile.println( "    public static final String CLASS_NAME =
\"" + getPackage() + "." + className + "\";");
532c531
<         String subPackage = getPackages() + ".peer"; //
org.apache.turbine.peer
---
>         String subPackage = getPackage() + ".peer"; //
org.apache.turbine.peer
547c546
<             outFile.println( "import " + getPackages() + ".*;" ); //
import the package with the DO
---
>             outFile.println( "import " + getPackage() + ".*;" ); // import
the package with the DO
653c652
<         String subPackage = getPackages(); // org.apache.turbine
---
>         String subPackage = getPackage(); // org.apache.turbine
675a675,676
>                 String type = getJavaType(cmap.getType());
>
679,680c680,681
<                 outFile.println( "    /** the column name for the " +
field + " field */" );
<                 outFile.println( "    private String " +  field + " =
null;" );
---
>                 outFile.println( "    /** the value for the " + field + "
field */" );
>                 outFile.println( "    private " + type + " " + field +
";");
768c769
<         gm.setPackages("org.test");
---
>         gm.setPackage("org.test");



~ Leon



------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to