cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r479149 - in /incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne: ./ access/ map/compiled/ property/ util/
Date Sat, 25 Nov 2006 17:21:07 GMT
Author: aadamchik
Date: Sat Nov 25 09:21:06 2006
New Revision: 479149

URL: http://svn.apache.org/viewvc?view=rev&rev=479149
Log:
CAY-701: property" package refactoring
(renaming property interfaces)

Added:
    incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/property/ToManyProperty.java
      - copied, changed from r478936, incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/property/CollectionProperty.java
    incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/property/ToOneProperty.java
      - copied, changed from r478936, incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/property/SingleObjectArcProperty.java
Removed:
    incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/property/CollectionProperty.java
    incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/property/SingleObjectArcProperty.java
Modified:
    incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/CayenneContextGraphAction.java
    incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/CayenneContextMergeHandler.java
    incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/ObjectContextDeleteAction.java
    incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/DataContext.java
    incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/DataContextMergeHandler.java
    incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/DataRowUtils.java
    incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/ObjectDiff.java
    incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/ObjectStore.java
    incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/map/compiled/PersistentDescriptor.java
    incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/property/AbstractCollectionProperty.java
    incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/property/AbstractSingleObjectArcProperty.java
    incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/property/PropertyVisitor.java
    incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/property/SimpleAttributeProperty.java
    incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/util/DeepMergeOperation.java
    incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/util/ObjectDetachOperation.java

Modified: incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/CayenneContextGraphAction.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/CayenneContextGraphAction.java?view=diff&rev=479149&r1=479148&r2=479149
==============================================================================
--- incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/CayenneContextGraphAction.java
(original)
+++ incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/CayenneContextGraphAction.java
Sat Nov 25 09:21:06 2006
@@ -21,9 +21,9 @@
 
 import org.apache.cayenne.property.ArcProperty;
 import org.apache.cayenne.property.AttributeProperty;
-import org.apache.cayenne.property.CollectionProperty;
+import org.apache.cayenne.property.ToManyProperty;
 import org.apache.cayenne.property.PropertyVisitor;
-import org.apache.cayenne.property.SingleObjectArcProperty;
+import org.apache.cayenne.property.ToOneProperty;
 import org.apache.cayenne.util.ObjectContextGraphAction;
 
 /**
@@ -120,17 +120,17 @@
         if (reverseArc != null) {
             reverseArc.visit(new PropertyVisitor() {
 
-                public boolean visitCollectionArc(CollectionProperty property) {
+                public boolean visitToMany(ToManyProperty property) {
                     property.addTarget(targetObject, sourceObject, false);
                     return false;
                 }
 
-                public boolean visitSingleObjectArc(SingleObjectArcProperty property) {
+                public boolean visitToOne(ToOneProperty property) {
                     property.setTarget(targetObject, sourceObject, false);
                     return false;
                 }
 
-                public boolean visitAttributeProperty(AttributeProperty property) {
+                public boolean visitAttribute(AttributeProperty property) {
                     return false;
                 }
 

Modified: incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/CayenneContextMergeHandler.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/CayenneContextMergeHandler.java?view=diff&rev=479149&r1=479148&r2=479149
==============================================================================
--- incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/CayenneContextMergeHandler.java
(original)
+++ incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/CayenneContextMergeHandler.java
Sat Nov 25 09:21:06 2006
@@ -24,7 +24,7 @@
 import org.apache.cayenne.graph.GraphEvent;
 import org.apache.cayenne.property.ArcProperty;
 import org.apache.cayenne.property.ClassDescriptor;
-import org.apache.cayenne.property.CollectionProperty;
+import org.apache.cayenne.property.ToManyProperty;
 import org.apache.cayenne.property.Property;
 import org.apache.cayenne.util.Util;
 
@@ -205,8 +205,8 @@
 
         context.internalGraphAction().setArcChangeInProcess(true);
         try {
-            if (p instanceof CollectionProperty) {
-                ((CollectionProperty) p).addTarget(source, target, false);
+            if (p instanceof ToManyProperty) {
+                ((ToManyProperty) p).addTarget(source, target, false);
             }
             else {
                 p.writePropertyDirectly(source, null, target);
@@ -241,8 +241,8 @@
 
         context.internalGraphAction().setArcChangeInProcess(true);
         try {
-            if (p instanceof CollectionProperty) {
-                ((CollectionProperty) p).removeTarget(source, target, false);
+            if (p instanceof ToManyProperty) {
+                ((ToManyProperty) p).removeTarget(source, target, false);
             }
             else {
                 p.writePropertyDirectly(source, target, null);

Modified: incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/ObjectContextDeleteAction.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/ObjectContextDeleteAction.java?view=diff&rev=479149&r1=479148&r2=479149
==============================================================================
--- incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/ObjectContextDeleteAction.java
(original)
+++ incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/ObjectContextDeleteAction.java
Sat Nov 25 09:21:06 2006
@@ -30,10 +30,10 @@
 import org.apache.cayenne.property.ArcProperty;
 import org.apache.cayenne.property.AttributeProperty;
 import org.apache.cayenne.property.ClassDescriptor;
-import org.apache.cayenne.property.CollectionProperty;
+import org.apache.cayenne.property.ToManyProperty;
 import org.apache.cayenne.property.Property;
 import org.apache.cayenne.property.PropertyVisitor;
-import org.apache.cayenne.property.SingleObjectArcProperty;
+import org.apache.cayenne.property.ToOneProperty;
 
 /**
  * A CayenneContext helper that processes object deletion.
@@ -103,7 +103,7 @@
 
         descriptor.visitProperties(new PropertyVisitor() {
 
-            public boolean visitCollectionArc(CollectionProperty property) {
+            public boolean visitToMany(ToManyProperty property) {
                 ObjRelationship relationship = (ObjRelationship) entity
                         .getRelationship(property.getName());
 
@@ -111,7 +111,7 @@
                 return true;
             }
 
-            public boolean visitSingleObjectArc(SingleObjectArcProperty property) {
+            public boolean visitToOne(ToOneProperty property) {
                 ObjRelationship relationship = (ObjRelationship) entity
                         .getRelationship(property.getName());
 
@@ -119,7 +119,7 @@
                 return true;
             }
 
-            public boolean visitAttributeProperty(AttributeProperty property) {
+            public boolean visitAttribute(AttributeProperty property) {
                 return true;
             }
         });
@@ -154,11 +154,11 @@
 
                 if (reverseArc != null) {
 
-                    if (reverseArc instanceof CollectionProperty) {
+                    if (reverseArc instanceof ToManyProperty) {
                         Iterator iterator = relatedObjects.iterator();
                         while (iterator.hasNext()) {
                             Object relatedObject = iterator.next();
-                            ((CollectionProperty) reverseArc).removeTarget(
+                            ((ToManyProperty) reverseArc).removeTarget(
                                     relatedObject,
                                     object,
                                     true);
@@ -168,7 +168,7 @@
                         Iterator iterator = relatedObjects.iterator();
                         while (iterator.hasNext()) {
                             Object relatedObject = iterator.next();
-                            ((SingleObjectArcProperty) reverseArc).setTarget(
+                            ((ToOneProperty) reverseArc).setTarget(
                                     relatedObject,
                                     null,
                                     true);
@@ -203,7 +203,7 @@
         }
         // return collections by copy, to allow removal of objects from the underlying
         // relationship inside the iterator
-        else if (property instanceof CollectionProperty) {
+        else if (property instanceof ToManyProperty) {
             Collection relatedCollection = (Collection) related;
             return relatedCollection.isEmpty() ? Collections.EMPTY_LIST : new ArrayList(
                     relatedCollection);

Modified: incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/DataContext.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/DataContext.java?view=diff&rev=479149&r1=479148&r2=479149
==============================================================================
--- incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/DataContext.java
(original)
+++ incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/DataContext.java
Sat Nov 25 09:21:06 2006
@@ -64,9 +64,9 @@
 import org.apache.cayenne.map.ObjRelationship;
 import org.apache.cayenne.property.AttributeProperty;
 import org.apache.cayenne.property.ClassDescriptor;
-import org.apache.cayenne.property.CollectionProperty;
+import org.apache.cayenne.property.ToManyProperty;
 import org.apache.cayenne.property.PropertyVisitor;
-import org.apache.cayenne.property.SingleObjectArcProperty;
+import org.apache.cayenne.property.ToOneProperty;
 import org.apache.cayenne.query.NamedQuery;
 import org.apache.cayenne.query.ObjectIdQuery;
 import org.apache.cayenne.query.Query;
@@ -852,7 +852,7 @@
 
         descriptor.visitProperties(new PropertyVisitor() {
 
-            public boolean visitCollectionArc(CollectionProperty property) {
+            public boolean visitToMany(ToManyProperty property) {
                 property.injectValueHolder(persistent);
 
                 if (!property.isFault(persistent)) {
@@ -876,7 +876,7 @@
                 return true;
             }
 
-            public boolean visitSingleObjectArc(SingleObjectArcProperty property) {
+            public boolean visitToOne(ToOneProperty property) {
                 Object target = property.readPropertyDirectly(persistent);
 
                 if (target instanceof DataObject) {
@@ -893,7 +893,7 @@
                 return true;
             }
 
-            public boolean visitAttributeProperty(AttributeProperty property) {
+            public boolean visitAttribute(AttributeProperty property) {
                 return true;
             }
         });

Modified: incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/DataContextMergeHandler.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/DataContextMergeHandler.java?view=diff&rev=479149&r1=479148&r2=479149
==============================================================================
--- incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/DataContextMergeHandler.java
(original)
+++ incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/DataContextMergeHandler.java
Sat Nov 25 09:21:06 2006
@@ -29,9 +29,9 @@
 import org.apache.cayenne.graph.GraphDiff;
 import org.apache.cayenne.graph.GraphEvent;
 import org.apache.cayenne.property.ClassDescriptor;
-import org.apache.cayenne.property.CollectionProperty;
+import org.apache.cayenne.property.ToManyProperty;
 import org.apache.cayenne.property.Property;
-import org.apache.cayenne.property.SingleObjectArcProperty;
+import org.apache.cayenne.property.ToOneProperty;
 import org.apache.cayenne.util.Util;
 
 /**
@@ -167,11 +167,11 @@
             Object target = context.localObject((ObjectId) targetNodeId, null);
 
             Property p = propertyForId(nodeId, arcId.toString());
-            if (p instanceof CollectionProperty) {
-                ((CollectionProperty) p).addTarget(source, target, false);
+            if (p instanceof ToManyProperty) {
+                ((ToManyProperty) p).addTarget(source, target, false);
             }
             else {
-                ((SingleObjectArcProperty) p).setTarget(source, target, false);
+                ((ToOneProperty) p).setTarget(source, target, false);
             }
         }
     }
@@ -184,11 +184,11 @@
             Object target = context.localObject((ObjectId) targetNodeId, null);
 
             Property p = propertyForId(nodeId, arcId.toString());
-            if (p instanceof CollectionProperty) {
-                ((CollectionProperty) p).removeTarget(source, target, false);
+            if (p instanceof ToManyProperty) {
+                ((ToManyProperty) p).removeTarget(source, target, false);
             }
             else {
-                ((SingleObjectArcProperty) p).setTarget(source, null, false);
+                ((ToOneProperty) p).setTarget(source, null, false);
             }
         }
     }

Modified: incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/DataRowUtils.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/DataRowUtils.java?view=diff&rev=479149&r1=479148&r2=479149
==============================================================================
--- incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/DataRowUtils.java
(original)
+++ incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/DataRowUtils.java
Sat Nov 25 09:21:06 2006
@@ -30,9 +30,9 @@
 import org.apache.cayenne.property.ArcProperty;
 import org.apache.cayenne.property.AttributeProperty;
 import org.apache.cayenne.property.ClassDescriptor;
-import org.apache.cayenne.property.CollectionProperty;
+import org.apache.cayenne.property.ToManyProperty;
 import org.apache.cayenne.property.PropertyVisitor;
-import org.apache.cayenne.property.SingleObjectArcProperty;
+import org.apache.cayenne.property.ToOneProperty;
 import org.apache.cayenne.util.Util;
 
 /**
@@ -84,7 +84,7 @@
 
         descriptor.visitProperties(new PropertyVisitor() {
 
-            public boolean visitAttributeProperty(AttributeProperty property) {
+            public boolean visitAttribute(AttributeProperty property) {
                 ObjAttribute attr = property.getAttribute();
                 String dbAttrPath = attr.getDbAttributePath();
 
@@ -100,7 +100,7 @@
                 return true;
             }
 
-            public boolean visitCollectionArc(CollectionProperty property) {
+            public boolean visitToMany(ToManyProperty property) {
                 // "to many" relationships have no information to collect from
                 // snapshot
                 if (invalidateToManyRelationships) {
@@ -110,7 +110,7 @@
                 return true;
             }
 
-            public boolean visitSingleObjectArc(SingleObjectArcProperty property) {
+            public boolean visitToOne(ToOneProperty property) {
                 property.invalidate(object);
                 return true;
             }
@@ -134,7 +134,7 @@
 
         descriptor.visitProperties(new PropertyVisitor() {
 
-            public boolean visitAttributeProperty(AttributeProperty property) {
+            public boolean visitAttribute(AttributeProperty property) {
                 String dbAttrPath = property.getAttribute().getDbAttributePath();
 
                 // supports merging of partial snapshots...
@@ -158,12 +158,12 @@
                 return true;
             }
 
-            public boolean visitCollectionArc(CollectionProperty property) {
+            public boolean visitToMany(ToManyProperty property) {
                 // noop - nothing to merge
                 return true;
             }
 
-            public boolean visitSingleObjectArc(SingleObjectArcProperty property) {
+            public boolean visitToOne(ToOneProperty property) {
                 ObjRelationship relationship = property.getRelationship();
                 if (relationship.isToPK()) {
                     // TODO: will this work for flattened, how do we save snapshots for

Modified: incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/ObjectDiff.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/ObjectDiff.java?view=diff&rev=479149&r1=479148&r2=479149
==============================================================================
--- incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/ObjectDiff.java
(original)
+++ incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/ObjectDiff.java
Sat Nov 25 09:21:06 2006
@@ -38,10 +38,10 @@
 import org.apache.cayenne.map.ObjRelationship;
 import org.apache.cayenne.property.AttributeProperty;
 import org.apache.cayenne.property.ClassDescriptor;
-import org.apache.cayenne.property.CollectionProperty;
+import org.apache.cayenne.property.ToManyProperty;
 import org.apache.cayenne.property.Property;
 import org.apache.cayenne.property.PropertyVisitor;
-import org.apache.cayenne.property.SingleObjectArcProperty;
+import org.apache.cayenne.property.ToOneProperty;
 import org.apache.cayenne.util.Util;
 
 /**
@@ -92,16 +92,16 @@
 
             classDescriptor.visitProperties(new PropertyVisitor() {
 
-                public boolean visitAttributeProperty(AttributeProperty property) {
+                public boolean visitAttribute(AttributeProperty property) {
                     snapshot.put(property.getName(), property.readProperty(object));
                     return true;
                 }
 
-                public boolean visitCollectionArc(CollectionProperty property) {
+                public boolean visitToMany(ToManyProperty property) {
                     return true;
                 }
 
-                public boolean visitSingleObjectArc(SingleObjectArcProperty property) {
+                public boolean visitToOne(ToOneProperty property) {
 
                     // eagerly resolve optimistically locked relationships
                     Object target = lock ? property.readProperty(object) : property
@@ -189,7 +189,7 @@
             // so we cant't do 'instanceof SingleObjectArcProperty'
             // TODO: andrus, 3.22.2006 - should we consider this a bug?
 
-            if (property instanceof CollectionProperty) {
+            if (property instanceof ToManyProperty) {
 
                 // record flattened op changes
                 ObjEntity entity = object
@@ -218,7 +218,7 @@
                     }
                 }
             }
-            else if (property instanceof SingleObjectArcProperty) {
+            else if (property instanceof ToOneProperty) {
 
                 if (currentArcSnapshot == null) {
                     currentArcSnapshot = new HashMap();
@@ -268,7 +268,7 @@
 
         getClassDescriptor().visitProperties(new PropertyVisitor() {
 
-            public boolean visitAttributeProperty(AttributeProperty property) {
+            public boolean visitAttribute(AttributeProperty property) {
 
                 Object oldValue = snapshot.get(property.getName());
                 Object newValue = property.readProperty(object);
@@ -280,12 +280,12 @@
                 return !modFound[0];
             }
 
-            public boolean visitCollectionArc(CollectionProperty property) {
+            public boolean visitToMany(ToManyProperty property) {
                 // flattened changes
                 return true;
             }
 
-            public boolean visitSingleObjectArc(SingleObjectArcProperty property) {
+            public boolean visitToOne(ToOneProperty property) {
                 if (arcSnapshot == null) {
                     return true;
                 }
@@ -329,7 +329,7 @@
 
         getClassDescriptor().visitProperties(new PropertyVisitor() {
 
-            public boolean visitAttributeProperty(AttributeProperty property) {
+            public boolean visitAttribute(AttributeProperty property) {
 
                 Object newValue = property.readProperty(object);
 
@@ -360,11 +360,11 @@
                 return true;
             }
 
-            public boolean visitCollectionArc(CollectionProperty property) {
+            public boolean visitToMany(ToManyProperty property) {
                 return true;
             }
 
-            public boolean visitSingleObjectArc(SingleObjectArcProperty property) {
+            public boolean visitToOne(ToOneProperty property) {
                 return true;
             }
         });

Modified: incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/ObjectStore.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/ObjectStore.java?view=diff&rev=479149&r1=479148&r2=479149
==============================================================================
--- incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/ObjectStore.java
(original)
+++ incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/access/ObjectStore.java
Sat Nov 25 09:21:06 2006
@@ -49,9 +49,9 @@
 import org.apache.cayenne.map.Procedure;
 import org.apache.cayenne.property.AttributeProperty;
 import org.apache.cayenne.property.ClassDescriptor;
-import org.apache.cayenne.property.CollectionProperty;
+import org.apache.cayenne.property.ToManyProperty;
 import org.apache.cayenne.property.PropertyVisitor;
-import org.apache.cayenne.property.SingleObjectArcProperty;
+import org.apache.cayenne.property.ToOneProperty;
 import org.apache.cayenne.query.ObjectIdQuery;
 import org.apache.cayenne.query.PrefetchTreeNode;
 import org.apache.cayenne.query.QueryMetadata;
@@ -828,12 +828,12 @@
                         .getClassDescriptor(oid.getEntityName());
                 descriptor.visitProperties(new PropertyVisitor() {
 
-                    public boolean visitCollectionArc(CollectionProperty property) {
+                    public boolean visitToMany(ToManyProperty property) {
                         property.invalidate(object);
                         return true;
                     }
 
-                    public boolean visitSingleObjectArc(SingleObjectArcProperty property)
{
+                    public boolean visitToOne(ToOneProperty property) {
                         if (property
                                 .getRelationship()
                                 .isSourceIndependentFromTargetChange()) {
@@ -842,7 +842,7 @@
                         return true;
                     }
 
-                    public boolean visitAttributeProperty(AttributeProperty property) {
+                    public boolean visitAttribute(AttributeProperty property) {
                         return true;
                     }
                 });

Modified: incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/map/compiled/PersistentDescriptor.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/map/compiled/PersistentDescriptor.java?view=diff&rev=479149&r1=479148&r2=479149
==============================================================================
--- incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/map/compiled/PersistentDescriptor.java
(original)
+++ incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/map/compiled/PersistentDescriptor.java
Sat Nov 25 09:21:06 2006
@@ -28,11 +28,11 @@
 import org.apache.cayenne.property.Accessor;
 import org.apache.cayenne.property.AttributeProperty;
 import org.apache.cayenne.property.ClassDescriptor;
-import org.apache.cayenne.property.CollectionProperty;
+import org.apache.cayenne.property.ToManyProperty;
 import org.apache.cayenne.property.Property;
 import org.apache.cayenne.property.PropertyAccessException;
 import org.apache.cayenne.property.PropertyVisitor;
-import org.apache.cayenne.property.SingleObjectArcProperty;
+import org.apache.cayenne.property.ToOneProperty;
 import org.apache.commons.collections.IteratorUtils;
 
 /**
@@ -223,7 +223,7 @@
 
         visitProperties(new PropertyVisitor() {
 
-            public boolean visitAttributeProperty(AttributeProperty property) {
+            public boolean visitAttribute(AttributeProperty property) {
                 property.writePropertyDirectly(
                         to,
                         property.readPropertyDirectly(to),
@@ -231,12 +231,12 @@
                 return true;
             }
 
-            public boolean visitSingleObjectArc(SingleObjectArcProperty property) {
+            public boolean visitToOne(ToOneProperty property) {
                 property.invalidate(to);
                 return true;
             }
 
-            public boolean visitCollectionArc(CollectionProperty property) {
+            public boolean visitToMany(ToManyProperty property) {
                 return true;
             }
         });

Modified: incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/property/AbstractCollectionProperty.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/property/AbstractCollectionProperty.java?view=diff&rev=479149&r1=479148&r2=479149
==============================================================================
--- incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/property/AbstractCollectionProperty.java
(original)
+++ incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/property/AbstractCollectionProperty.java
Sat Nov 25 09:21:06 2006
@@ -31,7 +31,7 @@
  * @author Andrus Adamchik
  */
 public abstract class AbstractCollectionProperty extends AbstractSingleObjectArcProperty
-        implements CollectionProperty {
+        implements ToManyProperty {
 
     public AbstractCollectionProperty(ClassDescriptor owner,
             ClassDescriptor targetDescriptor, Accessor accessor, String reverseName) {
@@ -96,7 +96,7 @@
     }
 
     public boolean visit(PropertyVisitor visitor) {
-        return visitor.visitCollectionArc(this);
+        return visitor.visitToMany(this);
     }
 
     /**

Modified: incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/property/AbstractSingleObjectArcProperty.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/property/AbstractSingleObjectArcProperty.java?view=diff&rev=479149&r1=479148&r2=479149
==============================================================================
--- incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/property/AbstractSingleObjectArcProperty.java
(original)
+++ incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/property/AbstractSingleObjectArcProperty.java
Sat Nov 25 09:21:06 2006
@@ -28,7 +28,7 @@
  * @author Andrus Adamchik
  */
 public abstract class AbstractSingleObjectArcProperty extends BaseProperty implements
-        SingleObjectArcProperty {
+        ToOneProperty {
 
     protected String complimentaryReverseArcName;
     protected ClassDescriptor targetDescriptor;
@@ -79,17 +79,17 @@
 
                 PropertyVisitor visitor = new PropertyVisitor() {
 
-                    public boolean visitCollectionArc(CollectionProperty property) {
+                    public boolean visitToMany(ToManyProperty property) {
                         property.removeTarget(oldTarget, source, false);
                         return false;
                     }
 
-                    public boolean visitSingleObjectArc(SingleObjectArcProperty property)
{
+                    public boolean visitToOne(ToOneProperty property) {
                         property.setTarget(oldTarget, null, false);
                         return false;
                     }
                     
-                    public boolean visitAttributeProperty(AttributeProperty property) {
+                    public boolean visitAttribute(AttributeProperty property) {
                         return false;
                     }
                 };
@@ -101,17 +101,17 @@
             if (newTarget != null) {
                 PropertyVisitor visitor = new PropertyVisitor() {
 
-                    public boolean visitCollectionArc(CollectionProperty property) {
+                    public boolean visitToMany(ToManyProperty property) {
                         property.addTarget(newTarget, source, false);
                         return false;
                     }
 
-                    public boolean visitSingleObjectArc(SingleObjectArcProperty property)
{
+                    public boolean visitToOne(ToOneProperty property) {
                         property.setTarget(newTarget, source, false);
                         return false;
                     }
 
-                    public boolean visitAttributeProperty(AttributeProperty property) {
+                    public boolean visitAttribute(AttributeProperty property) {
                         return false;
                     }
                 };
@@ -122,7 +122,7 @@
     }
 
     public boolean visit(PropertyVisitor visitor) {
-        return visitor.visitSingleObjectArc(this);
+        return visitor.visitToOne(this);
     }
 
     public ArcProperty getComplimentaryReverseArc() {

Modified: incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/property/PropertyVisitor.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/property/PropertyVisitor.java?view=diff&rev=479149&r1=479148&r2=479149
==============================================================================
--- incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/property/PropertyVisitor.java
(original)
+++ incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/property/PropertyVisitor.java
Sat Nov 25 09:21:06 2006
@@ -28,9 +28,9 @@
  */
 public interface PropertyVisitor {
 
-    boolean visitAttributeProperty(AttributeProperty property);
+    boolean visitAttribute(AttributeProperty property);
 
-    boolean visitSingleObjectArc(SingleObjectArcProperty property);
+    boolean visitToOne(ToOneProperty property);
 
-    boolean visitCollectionArc(CollectionProperty property);
+    boolean visitToMany(ToManyProperty property);
 }

Modified: incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/property/SimpleAttributeProperty.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/property/SimpleAttributeProperty.java?view=diff&rev=479149&r1=479148&r2=479149
==============================================================================
--- incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/property/SimpleAttributeProperty.java
(original)
+++ incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/property/SimpleAttributeProperty.java
Sat Nov 25 09:21:06 2006
@@ -39,7 +39,7 @@
     }
 
     public boolean visit(PropertyVisitor visitor) {
-        return visitor.visitAttributeProperty(this);
+        return visitor.visitAttribute(this);
     }
 
     public ObjAttribute getAttribute() {

Copied: incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/property/ToManyProperty.java
(from r478936, incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/property/CollectionProperty.java)
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/property/ToManyProperty.java?view=diff&rev=479149&p1=incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/property/CollectionProperty.java&r1=478936&p2=incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/property/ToManyProperty.java&r2=479149
==============================================================================
--- incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/property/CollectionProperty.java
(original)
+++ incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/property/ToManyProperty.java
Sat Nov 25 09:21:06 2006
@@ -26,7 +26,7 @@
  * @since 1.2
  * @author Andrus Adamchik
  */
-public interface CollectionProperty extends ArcProperty {
+public interface ToManyProperty extends ArcProperty {
 
     void addTarget(Object source, Object target, boolean setReverse)
             throws PropertyAccessException;

Copied: incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/property/ToOneProperty.java
(from r478936, incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/property/SingleObjectArcProperty.java)
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/property/ToOneProperty.java?view=diff&rev=479149&p1=incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/property/SingleObjectArcProperty.java&r1=478936&p2=incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/property/ToOneProperty.java&r2=479149
==============================================================================
--- incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/property/SingleObjectArcProperty.java
(original)
+++ incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/property/ToOneProperty.java
Sat Nov 25 09:21:06 2006
@@ -25,7 +25,7 @@
  * @since 1.2
  * @author Andrus Adamchik
  */
-public interface SingleObjectArcProperty extends ArcProperty {
+public interface ToOneProperty extends ArcProperty {
 
     public void setTarget(Object source, Object target, boolean setReverse);
 }

Modified: incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/util/DeepMergeOperation.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/util/DeepMergeOperation.java?view=diff&rev=479149&r1=479148&r2=479149
==============================================================================
--- incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/util/DeepMergeOperation.java
(original)
+++ incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/util/DeepMergeOperation.java
Sat Nov 25 09:21:06 2006
@@ -31,9 +31,9 @@
 import org.apache.cayenne.Persistent;
 import org.apache.cayenne.property.AttributeProperty;
 import org.apache.cayenne.property.ClassDescriptor;
-import org.apache.cayenne.property.CollectionProperty;
+import org.apache.cayenne.property.ToManyProperty;
 import org.apache.cayenne.property.PropertyVisitor;
-import org.apache.cayenne.property.SingleObjectArcProperty;
+import org.apache.cayenne.property.ToOneProperty;
 
 /**
  * An operation that performs object graph deep merge, terminating merge at unresolved
@@ -81,7 +81,7 @@
         descriptor = descriptor.getSubclassDescriptor(source.getClass());
         descriptor.visitProperties(new PropertyVisitor() {
 
-            public boolean visitSingleObjectArc(SingleObjectArcProperty property) {
+            public boolean visitToOne(ToOneProperty property) {
 
                 if (!property.isFault(source)) {
                     Object destinationSource = property.readProperty(source);
@@ -98,7 +98,7 @@
                 return true;
             }
 
-            public boolean visitCollectionArc(CollectionProperty property) {
+            public boolean visitToMany(ToManyProperty property) {
                 if (!property.isFault(source)) {
                     Collection collection = (Collection) property.readProperty(source);
 
@@ -120,7 +120,7 @@
                 return true;
             }
 
-            public boolean visitAttributeProperty(AttributeProperty property) {
+            public boolean visitAttribute(AttributeProperty property) {
                 return true;
             }
         });

Modified: incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/util/ObjectDetachOperation.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/util/ObjectDetachOperation.java?view=diff&rev=479149&r1=479148&r2=479149
==============================================================================
--- incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/util/ObjectDetachOperation.java
(original)
+++ incubator/cayenne/main/trunk/core/cayenne-jdk1.4/src/main/java/org/apache/cayenne/util/ObjectDetachOperation.java
Sat Nov 25 09:21:06 2006
@@ -31,10 +31,10 @@
 import org.apache.cayenne.map.EntityResolver;
 import org.apache.cayenne.property.AttributeProperty;
 import org.apache.cayenne.property.ClassDescriptor;
-import org.apache.cayenne.property.CollectionProperty;
+import org.apache.cayenne.property.ToManyProperty;
 import org.apache.cayenne.property.Property;
 import org.apache.cayenne.property.PropertyVisitor;
-import org.apache.cayenne.property.SingleObjectArcProperty;
+import org.apache.cayenne.property.ToOneProperty;
 import org.apache.cayenne.query.PrefetchTreeNode;
 
 /**
@@ -98,7 +98,7 @@
 
         descriptor.visitProperties(new PropertyVisitor() {
 
-            public boolean visitSingleObjectArc(SingleObjectArcProperty property) {
+            public boolean visitToOne(ToOneProperty property) {
                 if (prefetchTree != null) {
 
                     PrefetchTreeNode child = prefetchTree.getNode(property.getName());
@@ -111,7 +111,7 @@
                                 property.getTargetDescriptor(),
                                 child) : null;
 
-                        SingleObjectArcProperty targetProperty = (SingleObjectArcProperty)
targetDescriptor
+                        ToOneProperty targetProperty = (ToOneProperty) targetDescriptor
                                 .getProperty(property.getName());
                         Object oldTarget = targetProperty.isFault(target)
                                 ? null
@@ -124,7 +124,7 @@
                 return true;
             }
 
-            public boolean visitCollectionArc(CollectionProperty property) {
+            public boolean visitToMany(ToManyProperty property) {
                 if (prefetchTree != null) {
                     PrefetchTreeNode child = prefetchTree.getNode(property.getName());
 
@@ -145,7 +145,7 @@
                             targetCollection.add(destinationTarget);
                         }
 
-                        CollectionProperty targetProperty = (CollectionProperty) targetDescriptor
+                        ToManyProperty targetProperty = (ToManyProperty) targetDescriptor
                                 .getProperty(property.getName());
                         targetProperty.writeProperty(target, null, targetCollection);
                     }
@@ -154,7 +154,7 @@
                 return true;
             }
 
-            public boolean visitAttributeProperty(AttributeProperty property) {
+            public boolean visitAttribute(AttributeProperty property) {
                 Property targetProperty = targetDescriptor
                         .getProperty(property.getName());
                 targetProperty.writeProperty(target, null, property.readProperty(source));



Mime
View raw message