cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r702115 - /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/ObjEntity.java
Date Mon, 06 Oct 2008 11:54:12 GMT
Author: aadamchik
Date: Mon Oct  6 04:54:12 2008
New Revision: 702115

URL: http://svn.apache.org/viewvc?rev=702115&view=rev
Log:
CAY-795 Horizontal inheritance (Propert_attr_creating_typo.patch)

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/ObjEntity.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/ObjEntity.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/ObjEntity.java?rev=702115&r1=702114&r2=702115&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/ObjEntity.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/map/ObjEntity.java
Mon Oct  6 04:54:12 2008
@@ -85,7 +85,7 @@
     protected boolean excludingDefaultListeners;
     protected boolean excludingSuperclassListeners;
 
-    protected Map<String, String> overridedAttributes;
+    protected Map<String, String> overriddenAttributes;
 
     public ObjEntity() {
         this(null);
@@ -96,7 +96,7 @@
         this.lockType = LOCK_TYPE_NONE;
         this.callbacks = new CallbackMap();
         this.entityListeners = new ArrayList<EntityListener>(2);
-        this.overridedAttributes = new TreeMap<String, String>();
+        this.overriddenAttributes = new TreeMap<String, String>();
     }
 
     /**
@@ -175,7 +175,7 @@
         // store attributes
         encoder.print(getDeclaredAttributes());
 
-        for (Map.Entry<String, String> override : overridedAttributes.entrySet()) {
+        for (Map.Entry<String, String> override : overriddenAttributes.entrySet())
{
             encoder.print("<attribute-override name=\"" + override.getKey() + '\"');
             encoder.print(" db-attribute-path=\"");
             encoder.print(Util.encodeXmlAttribute(override.getValue()));
@@ -685,13 +685,13 @@
             Attribute attr = superEntity.getAttribute(name);
             ObjAttribute result = null;
             if (attr instanceof ObjAttribute) {
-                String overridedDbPath = overridedAttributes.get(name);
-                if (overridedDbPath != null) {
-                    result = new ObjAttribute((ObjAttribute) attr);
-                    result.setEntity(this);
-                    result.setDbAttributePath(overridedDbPath);
-                    return result;
+                String overriddedDbPath = overriddenAttributes.get(name);
+                result = new ObjAttribute((ObjAttribute) attr);
+                result.setEntity(this);
+                if (overriddedDbPath != null) {
+                    result.setDbAttributePath(overriddedDbPath);
                 }
+                return result;
             }
 
             return attr;
@@ -729,7 +729,7 @@
             superEntity.appendAttributes(attributeMap);
             for (String attributeName : attributeMap.keySet()) {
 
-                String overridedDbPath = overridedAttributes.get(attributeName);
+                String overridedDbPath = overriddenAttributes.get(attributeName);
 
                 ObjAttribute attribute = new ObjAttribute(attributeMap.get(attributeName));
                 attribute.setEntity(this);
@@ -745,7 +745,7 @@
      * @since 3.0
      */
     public void addAttributeOverride(String attributeName, String dbPath) {
-        overridedAttributes.put(attributeName, dbPath);
+        overriddenAttributes.put(attributeName, dbPath);
     }
 
     /**



Mime
View raw message