cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r602241 - in /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src: main/java/org/apache/cayenne/gen/TemplateProcessor.java test/java/org/apache/cayenne/tools/CayenneGeneratorTaskTest.java
Date Fri, 07 Dec 2007 22:13:38 GMT
Author: aadamchik
Date: Fri Dec  7 14:13:38 2007
New Revision: 602241

URL: http://svn.apache.org/viewvc?rev=602241&view=rev
Log:
CAY-933 Embeddable classes - support class generation
(more preliminary cleanup)

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/gen/TemplateProcessor.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/tools/CayenneGeneratorTaskTest.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/gen/TemplateProcessor.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/gen/TemplateProcessor.java?rev=602241&r1=602240&r2=602241&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/gen/TemplateProcessor.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/gen/TemplateProcessor.java
Fri Dec  7 14:13:38 2007
@@ -44,7 +44,6 @@
 
     protected Template classTemplate;
     protected Context velocityContext;
-    protected boolean superclass;
 
     public TemplateProcessor(String template, Context velocityContext) throws Exception {
 
@@ -125,9 +124,5 @@
 
     public void setVelocityContext(Context velocityContext) {
         this.velocityContext = velocityContext;
-    }
-
-    public void setSuperclass(boolean superclass) {
-        this.superclass = superclass;
     }
 }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/tools/CayenneGeneratorTaskTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/tools/CayenneGeneratorTaskTest.java?rev=602241&r1=602240&r2=602241&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/tools/CayenneGeneratorTaskTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/tools/CayenneGeneratorTaskTest.java
Fri Dec  7 14:13:38 2007
@@ -245,7 +245,7 @@
         // run task
         task.execute();
 
-        // check results
+        // check entity results
         File a = new File(
                 mapDir,
                 convertPath("org/apache/cayenne/testdo/embeddable/EmbedEntity1.java"));
@@ -256,9 +256,36 @@
                 "org.apache.cayenne.testdo.embeddable",
                 "_EmbedEntity1");
 
-        File _a = new File(mapDir, convertPath("org/apache/cayenne/testdo/embeddable/auto/_EmbedEntity1.java"));
+        File _a = new File(
+                mapDir,
+                convertPath("org/apache/cayenne/testdo/embeddable/auto/_EmbedEntity1.java"));
         assertTrue(_a.exists());
-        assertContents(_a, "_EmbedEntity1", "org.apache.cayenne.testdo.embeddable.auto",
"CayenneDataObject");
+        assertContents(
+                _a,
+                "_EmbedEntity1",
+                "org.apache.cayenne.testdo.embeddable.auto",
+                "CayenneDataObject");
+
+        // check embeddable results
+//        File e = new File(
+//                mapDir,
+//                convertPath("org/apache/cayenne/testdo/embeddable/Embeddable1.java"));
+//        assertTrue(e.isFile());
+//        assertContents(
+//                e,
+//                "Embeddable1",
+//                "org.apache.cayenne.testdo.embeddable",
+//                "_Embeddable1");
+//
+//        File _e = new File(
+//                mapDir,
+//                convertPath("org/apache/cayenne/testdo/embeddable/auto/_Embeddable1.java"));
+//        assertTrue(_e.exists());
+//        assertContents(
+//                _e,
+//                "_Embeddable1",
+//                "org.apache.cayenne.testdo.embeddable.auto",
+//                "Object");
     }
 
     private String convertPath(String unixPath) {



Mime
View raw message