cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r602745 - in /cayenne/main/trunk/framework: cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/tools/CayenneGeneratorTask.java maven-cayenne-plugin/src/main/java/org/apache/cayenne/tools/CayenneGeneratorMojo.java
Date Sun, 09 Dec 2007 22:35:53 GMT
Author: aadamchik
Date: Sun Dec  9 14:35:51 2007
New Revision: 602745

URL: http://svn.apache.org/viewvc?rev=602745&view=rev
Log:
CAY-933 Embeddable classes - support class generation
(adding support to the frontend tasks)

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/tools/CayenneGeneratorTask.java
    cayenne/main/trunk/framework/maven-cayenne-plugin/src/main/java/org/apache/cayenne/tools/CayenneGeneratorMojo.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/tools/CayenneGeneratorTask.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/tools/CayenneGeneratorTask.java?rev=602745&r1=602744&r2=602745&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/tools/CayenneGeneratorTask.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/tools/CayenneGeneratorTask.java
Sun Dec  9 14:35:51 2007
@@ -56,6 +56,8 @@
     protected String superpkg;
     protected String supertemplate;
     protected String template;
+    protected String embeddabletemplate;
+    protected String embeddablesupertemplate;
     protected boolean usepkgpath;
 
     /**
@@ -99,6 +101,8 @@
         action.setSuperPkg(superpkg);
         action.setSuperTemplate(supertemplate);
         action.setTemplate(template);
+        action.setEmbeddableSuperTemplate(embeddablesupertemplate);
+        action.setEmbeddableTemplate(embeddabletemplate);
         action.setUsePkgPath(usepkgpath);
 
         return action;
@@ -294,6 +298,14 @@
      */
     public void setMode(String mode) {
         this.mode = mode;
+    }
+
+    public void setEmbeddabletemplate(String embeddabletemplate) {
+        this.embeddabletemplate = embeddabletemplate;
+    }
+
+    public void setEmbeddablesupertemplate(String embeddablesupertemplate) {
+        this.embeddablesupertemplate = embeddablesupertemplate;
     }
 
     /**

Modified: cayenne/main/trunk/framework/maven-cayenne-plugin/src/main/java/org/apache/cayenne/tools/CayenneGeneratorMojo.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/maven-cayenne-plugin/src/main/java/org/apache/cayenne/tools/CayenneGeneratorMojo.java?rev=602745&r1=602744&r2=602745&view=diff
==============================================================================
--- cayenne/main/trunk/framework/maven-cayenne-plugin/src/main/java/org/apache/cayenne/tools/CayenneGeneratorMojo.java
(original)
+++ cayenne/main/trunk/framework/maven-cayenne-plugin/src/main/java/org/apache/cayenne/tools/CayenneGeneratorMojo.java
Sun Dec  9 14:35:51 2007
@@ -44,6 +44,7 @@
  * @goal cgen
  */
 public class CayenneGeneratorMojo extends AbstractMojo {
+	
 	/**
 	 * Project instance used to add generated source code to the build.
 	 * 
@@ -159,7 +160,7 @@
 	private String superPkg;
 
 	/**
-	 * Location of Velocity template file for Java superclass generation.
+	 * Location of Velocity template file for Entity superclass generation.
 	 * Ignored unless <code>makepairs</code> set to <code>true</code>.
If
 	 * omitted, default template is used.
 	 * 
@@ -168,12 +169,30 @@
 	private String superTemplate;
 
 	/**
-	 * Location of Velocity template file for Java class generation. If omitted,
+	 * Location of Velocity template file for Entity class generation. If omitted,
 	 * default template is used.
 	 * 
 	 * @parameter expression="${cgen.template}"
 	 */
 	private String template;
+	
+	/**
+	 * Location of Velocity template file for Embeddable superclass generation.
+	 * Ignored unless <code>makepairs</code> set to <code>true</code>.
If
+	 * omitted, default template is used.
+	 * 
+	 * @parameter expression="${cgen.embeddableSuperTemplate}"
+	 */
+	private String embeddableSuperTemplate;
+
+	/**
+	 * Location of Velocity template file for Embeddable class generation. If omitted,
+	 * default template is used.
+	 * 
+	 * @parameter expression="${cgen.embeddableTemplate}"
+	 */
+	private String embeddableTemplate;
+
 
 	/**
 	 * If set to <code>true</code> (default), a directory tree will be
@@ -282,6 +301,8 @@
 		action.setSuperPkg(superPkg);
 		action.setSuperTemplate(superTemplate);
 		action.setTemplate(template);
+		action.setEmbeddableSuperTemplate(embeddableSuperTemplate);
+		action.setEmbeddableTemplate(embeddableTemplate);
 		action.setUsePkgPath(usePkgPath);
 
 		return action;



Mime
View raw message