cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dkazimirc...@apache.org
Subject svn commit: r1164494 - in /cayenne/main/trunk: docs/doc/src/main/resources/ framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/util/ modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/
Date Fri, 02 Sep 2011 11:59:00 GMT
Author: dkazimirchyk
Date: Fri Sep  2 11:59:00 2011
New Revision: 1164494

URL: http://svn.apache.org/viewvc?rev=1164494&view=rev
Log:
CAY-1606 Change CayenneModeler new object naming strategy

changed default naming for new DataDomain, DataNode, DataMap, DbEntity, ObjEntity, Embeddable,
Procedure, Query

Modified:
    cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/util/NamedObjectFactory.java
    cayenne/main/trunk/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateDataMapAction.java
    cayenne/main/trunk/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateNodeAction.java

Modified: cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt?rev=1164494&r1=1164493&r2=1164494&view=diff
==============================================================================
--- cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt (original)
+++ cayenne/main/trunk/docs/doc/src/main/resources/RELEASE-NOTES.txt Fri Sep  2 11:59:00 2011
@@ -32,6 +32,7 @@ CAY-1594 DI extension point: turning on/
 CAY-1598 Per DataMap listeners are called for all entities in DataDomain
 CAY-1599 Annotation-based global listeners registration
 CAY-1605 Switch Cayenne to use unified Maven repository
+CAY-1606 Change CayenneModeler new object naming strategy
 
 Bug Fixes Since 3.1M2:
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/util/NamedObjectFactory.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/util/NamedObjectFactory.java?rev=1164494&r1=1164493&r2=1164494&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/util/NamedObjectFactory.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/util/NamedObjectFactory.java
Fri Sep  2 11:59:00 2011
@@ -190,7 +190,7 @@ public abstract class NamedObjectFactory
 
         @Override
         protected String nameBase() {
-            return "UntitledDomain";
+            return "project";
         }
 
         @Override
@@ -210,7 +210,7 @@ public abstract class NamedObjectFactory
 
         @Override
         protected String nameBase() {
-            return "UntitledMap";
+            return "datamap";
         }
 
         @Override
@@ -244,7 +244,7 @@ public abstract class NamedObjectFactory
 
         @Override
         protected String nameBase() {
-            return "UntitledObjEntity";
+            return "ObjEntity";
         }
 
         @Override
@@ -274,7 +274,7 @@ public abstract class NamedObjectFactory
         @Override
         protected String nameBase() {
             if (getNameBase() == null) {
-                setNameBase("UntitledEmbeddable");
+                setNameBase("Embeddable");
             }
             return getNameBase();
 
@@ -322,7 +322,7 @@ public abstract class NamedObjectFactory
 
         @Override
         protected String nameBase() {
-            return "UntitledDbEntity";
+            return "db_entity";
         }
 
         @Override
@@ -370,7 +370,7 @@ public abstract class NamedObjectFactory
 
         @Override
         protected String nameBase() {
-            return "UntitledProcedure";
+            return "procedure";
         }
 
         @Override
@@ -389,7 +389,7 @@ public abstract class NamedObjectFactory
 
         @Override
         protected String nameBase() {
-            return "UntitledQuery";
+            return "query";
         }
 
         @Override
@@ -440,7 +440,7 @@ public abstract class NamedObjectFactory
 
         @Override
         protected String nameBase() {
-            return "UntitledDataNode";
+            return "datanode";
         }
 
         @Override

Modified: cayenne/main/trunk/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateDataMapAction.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateDataMapAction.java?rev=1164494&r1=1164493&r2=1164494&view=diff
==============================================================================
--- cayenne/main/trunk/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateDataMapAction.java
(original)
+++ cayenne/main/trunk/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateDataMapAction.java
Fri Sep  2 11:59:00 2011
@@ -63,12 +63,9 @@ public class CreateDataMapAction extends
                 .getProject()
                 .getRootNode();
 
-        // use domain name as DataMap base, as map names must be unique across the
-        // project...
         DataMap map = (DataMap) NamedObjectFactory.createObject(
                 DataMap.class,
-                currentDomain,
-                currentDomain.getName() + "Map");
+                currentDomain);
 
         // set configuration source for new dataMap
         Resource baseResource = currentDomain.getConfigurationSource();

Modified: cayenne/main/trunk/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateNodeAction.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateNodeAction.java?rev=1164494&r1=1164493&r2=1164494&view=diff
==============================================================================
--- cayenne/main/trunk/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateNodeAction.java
(original)
+++ cayenne/main/trunk/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/modeler/action/CreateNodeAction.java
Fri Sep  2 11:59:00 2011
@@ -98,8 +98,6 @@ public class CreateNodeAction extends Ca
                 .getProject()
                 .getRootNode();
 
-        // use domain name as DataNode base, as node names must be unique across the
-        // project...
         DataNodeDescriptor node = buildDataNode(domain);
 
         DataSourceInfo src = new DataSourceInfo();
@@ -118,8 +116,7 @@ public class CreateNodeAction extends Ca
     DataNodeDescriptor buildDataNode(DataChannelDescriptor domain) {
         String name = NamedObjectFactory.createName(
                 DataNodeDescriptor.class,
-                domain,
-                domain.getName() + "Node");
+                domain);
 
         DataNodeDescriptor node = new DataNodeDescriptor(name);
         node.setDataChannelDescriptor(domain);



Mime
View raw message