cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r600400 - in /cayenne/main/trunk/framework: cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/gen/ cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/tools/ maven-cayenne-plugin/src/main/java/org/apache/cayenne/tools/
Date Sun, 02 Dec 2007 22:55:08 GMT
Author: aadamchik
Date: Sun Dec  2 14:55:07 2007
New Revision: 600400

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

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/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/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=600400&r1=600399&r2=600400&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
Sun Dec  2 14:55:07 2007
@@ -49,7 +49,7 @@
     public static final String SUPERCLASS_PREFIX = "_";
     private static final String WILDCARD = "*";
 
-    protected List<ObjEntity> objEntities;
+    protected List<ObjEntity> entities;
     protected String superPkg;
     protected DataMap dataMap;
     protected ClassGeneratorMode mode;
@@ -149,11 +149,11 @@
 
         // TODO: andrus, 12/2/2007 - should we setup a dummy entity for an empty map in
         // DataMap mode?
-        if (mode != ClassGeneratorMode.entity && !objEntities.isEmpty()) {
-            return Collections.singleton(objEntities.get(0));
+        if (mode != ClassGeneratorMode.entity && !entities.isEmpty()) {
+            return Collections.singleton(entities.get(0));
         }
         else {
-            return this.objEntities;
+            return this.entities;
         }
     }
 
@@ -487,8 +487,8 @@
         this.dataMap = dataMap;
     }
 
-    public List<ObjEntity> getObjEntities() {
-        return objEntities;
+    public List<ObjEntity> getEntities() {
+        return entities;
     }
 
     /**
@@ -496,8 +496,8 @@
      * list to allow its independent modification and also filters out entities that do
      * not require class generation.
      */
-    public void setObjEntities(List<ObjEntity> objEntities) {
-        this.objEntities = objEntities != null
+    public void setEntities(List<ObjEntity> objEntities) {
+        this.entities = objEntities != null
                 ? new ArrayList<ObjEntity>(objEntities)
                 : new ArrayList<ObjEntity>();
     }

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=600400&r1=600399&r2=600400&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  2 14:55:07 2007
@@ -154,7 +154,7 @@
             generatorAction.setLogger(logger);
             generatorAction.setTimestamp(map.lastModified());
             generatorAction.setDataMap(loadAction.getMainDataMap());
-            generatorAction.setObjEntities((List<ObjEntity>) filterAction
+            generatorAction.setEntities((List<ObjEntity>) filterAction
                     .getFilteredEntities(loadAction.getMainDataMap()));
             generatorAction.execute();
         }

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=600400&r1=600399&r2=600400&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  2 14:55:07 2007
@@ -224,7 +224,7 @@
 			generator.setLogger(logger);
 			generator.setTimestamp(map.lastModified());
 			generator.setDataMap(loaderAction.getMainDataMap());
-			generator.setObjEntities((List<ObjEntity>) filterAction
+			generator.setEntities((List<ObjEntity>) filterAction
 					.getFilteredEntities(loaderAction.getMainDataMap()));
 			generator.execute();
 		} catch (Exception e) {



Mime
View raw message