cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r601120 - in /cayenne/main/trunk/framework: cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/gen/ cayenne-modeler/src/main/java/org/apache/cayenne/modeler/
Date Tue, 04 Dec 2007 22:29:00 GMT
Author: aadamchik
Date: Tue Dec  4 14:28:59 2007
New Revision: 601120

URL: http://svn.apache.org/viewvc?rev=601120&view=rev
Log:
CAY-926 Refactoring class generator classes
(cleanup and future todo)

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/gen/ClassGenerationAction.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/gen/ClassGenerationAction1_1.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/gen/ClientClassGenerationAction.java
    cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/CodeTemplateManager.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/gen/ClassGenerationAction.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/gen/ClassGenerationAction.java?rev=601120&r1=601119&r2=601120&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/gen/ClassGenerationAction.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/gen/ClassGenerationAction.java
Tue Dec  4 14:28:59 2007
@@ -73,15 +73,15 @@
         this.makePairs = true;
     }
 
-    public String defaultSingleClassTemplate() {
+    protected String defaultSingleClassTemplate() {
         return ClassGenerationAction.SINGLE_CLASS_TEMPLATE;
     }
 
-    public String defaultSubclassTemplate() {
+    protected String defaultSubclassTemplate() {
         return ClassGenerationAction.SUBCLASS_TEMPLATE;
     }
 
-    public String defaultSuperclassTemplate() {
+    protected String defaultSuperclassTemplate() {
         return ClassGenerationAction.SUPERCLASS_TEMPLATE;
     }
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/gen/ClassGenerationAction1_1.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/gen/ClassGenerationAction1_1.java?rev=601120&r1=601119&r2=601120&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/gen/ClassGenerationAction1_1.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/gen/ClassGenerationAction1_1.java
Tue Dec  4 14:28:59 2007
@@ -36,17 +36,17 @@
     public static final String SUPERCLASS_TEMPLATE = "dotemplates/superclass.vm";
 
     @Override
-    public String defaultSingleClassTemplate() {
+    protected String defaultSingleClassTemplate() {
         return ClassGenerationAction1_1.SINGLE_CLASS_TEMPLATE;
     }
 
     @Override
-    public String defaultSubclassTemplate() {
+    protected String defaultSubclassTemplate() {
         return ClassGenerationAction1_1.SUBCLASS_TEMPLATE;
     }
 
     @Override
-    public String defaultSuperclassTemplate() {
+    protected String defaultSuperclassTemplate() {
         return ClassGenerationAction1_1.SUPERCLASS_TEMPLATE;
     }
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/gen/ClientClassGenerationAction.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/gen/ClientClassGenerationAction.java?rev=601120&r1=601119&r2=601120&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/gen/ClientClassGenerationAction.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/gen/ClientClassGenerationAction.java
Tue Dec  4 14:28:59 2007
@@ -33,18 +33,18 @@
     public static final String SUPERCLASS_TEMPLATE = "dotemplates/v1_2/client-superclass.vm";
 
     @Override
-    public String defaultSingleClassTemplate() {
+    protected String defaultSingleClassTemplate() {
         throw new IllegalStateException(
                 "Default generation for single classes on the client is not supported.");
     }
 
     @Override
-    public String defaultSubclassTemplate() {
+    protected String defaultSubclassTemplate() {
         return ClientClassGenerationAction.SUBCLASS_TEMPLATE;
     }
 
     @Override
-    public String defaultSuperclassTemplate() {
+    protected String defaultSuperclassTemplate() {
         return ClientClassGenerationAction.SUPERCLASS_TEMPLATE;
     }
 

Modified: cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/CodeTemplateManager.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/CodeTemplateManager.java?rev=601120&r1=601119&r2=601120&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/CodeTemplateManager.java
(original)
+++ cayenne/main/trunk/framework/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/CodeTemplateManager.java
Tue Dec  4 14:28:59 2007
@@ -107,6 +107,8 @@
         }
     }
 
+    // TODO: andrus, 12/5/2007 - this should also take a "pairs" parameter to correctly
+    // assign standard templates
     public String getTemplatePath(String name, String version) {
         Object value = customTemplates.get(name);
         if (value != null) {



Mime
View raw message