cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From and...@apache.org
Subject svn commit: r725063 - in /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src: main/java/org/apache/cayenne/ main/java/org/apache/cayenne/access/ test/java/org/apache/cayenne/ test/java/org/apache/cayenne/access/ test/java/org/apache/cayenne/re...
Date Wed, 10 Dec 2008 12:10:51 GMT
Author: andrey
Date: Wed Dec 10 04:10:50 2008
New Revision: 725063

URL: http://svn.apache.org/viewvc?rev=725063&view=rev
Log:
CAY-1119 Nested contexts on ROP
Renaming key method

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/CayenneContext.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/ObjectContext.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataContext.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/MockObjectContext.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextDataChannelEventsTest.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextLocalCacheTest.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextParentEventsTest.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextParentPeerEventsTest.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextPeerEventsTest.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextReadTest.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextRollbackTest.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextValidationTest.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextWriteTest.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/remote/NestedObjectContextLocalTest.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/remote/NestedObjectContextParentEventsTest.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/remote/NestedObjectContextPeerEventsTest.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/remote/NestedObjectContextRollbackTest.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/remote/NestedObjectContextTest.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/CayenneContext.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/CayenneContext.java?rev=725063&r1=725062&r2=725063&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/CayenneContext.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/CayenneContext.java
Wed Dec 10 04:10:50 2008
@@ -539,7 +539,7 @@
      * 
      * @since 3.0
      */
-    public ObjectContext createChildObjectContext() {
+    public ObjectContext createChildContext() {
         return new CayenneContext(this, graphManager.changeEventsEnabled, 
                 graphManager.lifecycleEventsEnabled);
     }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/ObjectContext.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/ObjectContext.java?rev=725063&r1=725062&r2=725063&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/ObjectContext.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/ObjectContext.java
Wed Dec 10 04:10:50 2008
@@ -31,7 +31,7 @@
 /**
  * A Cayenne object facade to a persistent store. Instances of ObjectContext are used in
  * the application code to access Cayenne persistence features.
- * 
+ *
  * @since 1.2
  */
 public interface ObjectContext extends Serializable {
@@ -87,7 +87,7 @@
      * Registers a transient object with the context. The difference with
      * {@link #newObject(Class)} is that a user creates an object herself, before
      * attaching it to the context, instead of relying on Cayenne to do that.
-     * 
+     *
      * @param object new object that needs to be made persistent.
      * @since 3.0
      */
@@ -95,7 +95,7 @@
 
     /**
      * Schedules a persistent object for deletion on next commit.
-     * 
+     *
      * @throws DeleteDenyException if a {@link org.apache.cayenne.map.DeleteRule#DENY}
      *             delete rule is applicable for object deletion.
      */
@@ -106,11 +106,11 @@
      * accessing property values. This callback allows ObjectContext to "inflate"
      * unresolved objects on demand and also resolve properties that rely on lazy
      * faulting.
-     * 
+     *
      * @since 3.0
      */
     void prepareForAccess(Persistent object, String property, boolean lazyFaulting);
-    
+
     /**
      * @deprecated since 3.0 use {@link #prepareForAccess(Persistent, String, boolean)}.
      */
@@ -174,27 +174,27 @@
      * Returns an DataChannel used by this context.
      */
     DataChannel getChannel();
-    
+
     /**
      * Creates and returns a new child ObjectContext.
-     * 
+     *
      * @since 3.0
      */
-    ObjectContext createChildObjectContext();
-    
+    ObjectContext createChildContext();
+
     /**
      * Returns <code>true</code> if there are any modified, deleted or new objects
      * registered with this ObjectContext, <code>false</code> otherwise.
-     * 
+     *
      * @since 3.0
      */
     boolean hasChanges();
-    
+
     /**
      * "Invalidates" a Collection of persistent objects. This operation would remove each
      * object's snapshot from cache and change object's state to HOLLOW. On the next
      * access to this object, it will be refetched.
-     * 
+     *
      * @see RefreshQuery
      */
     void invalidateObjects(Collection objects);

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataContext.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataContext.java?rev=725063&r1=725062&r2=725063&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataContext.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataContext.java
Wed Dec 10 04:10:50 2008
@@ -259,7 +259,7 @@
      * 
      * @since 3.0
      */
-    public ObjectContext createChildObjectContext() {
+    public ObjectContext createChildContext() {
         return createChildDataContext();
     }
 
@@ -267,7 +267,7 @@
      * Creates and returns a new child DataContext.
      * 
      * @since 1.2
-     * @deprecated since 3.0 use {@link #createChildObjectContext()}.
+     * @deprecated since 3.0 use {@link #createChildContext()}.
      */
     @Deprecated
     public DataContext createChildDataContext() {

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/MockObjectContext.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/MockObjectContext.java?rev=725063&r1=725062&r2=725063&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/MockObjectContext.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/MockObjectContext.java
Wed Dec 10 04:10:50 2008
@@ -134,7 +134,7 @@
         return null;
     }
 
-    public ObjectContext createChildObjectContext() {
+    public ObjectContext createChildContext() {
         return null;
     }
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextDataChannelEventsTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextDataChannelEventsTest.java?rev=725063&r1=725062&r2=725063&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextDataChannelEventsTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/DataContextDataChannelEventsTest.java
Wed Dec 10 04:10:50 2008
@@ -80,7 +80,7 @@
         MockChannelListener listener = new MockChannelListener();
         EventUtil.listenForChannelEvents(context, listener);
 
-        ObjectContext child = context.createChildObjectContext();
+        ObjectContext child = context.createChildContext();
         Artist a1 = (Artist) child.localObject(a.getObjectId(), a);
 
         a1.setArtistName("Y");
@@ -121,7 +121,7 @@
     public void testChangeEventOnPeerChangeSecondNestingLevel() throws Exception {
         DataContext context = createDataContext();
 
-        ObjectContext childPeer1 = context.createChildObjectContext();
+        ObjectContext childPeer1 = context.createChildContext();
 
         Artist a = childPeer1.newObject(Artist.class);
         a.setArtistName("X");
@@ -130,7 +130,7 @@
         final MockChannelListener listener = new MockChannelListener();
         EventUtil.listenForChannelEvents((DataChannel) childPeer1, listener);
 
-        ObjectContext childPeer2 = context.createChildObjectContext();
+        ObjectContext childPeer2 = context.createChildContext();
 
         Artist a1 = (Artist) childPeer2.localObject(a.getObjectId(), a);
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextLocalCacheTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextLocalCacheTest.java?rev=725063&r1=725062&r2=725063&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextLocalCacheTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextLocalCacheTest.java
Wed Dec 10 04:10:50 2008
@@ -41,7 +41,7 @@
         query.setCacheStrategy(QueryCacheStrategy.LOCAL_CACHE);
 
         DataContext context = createDataContext();
-        ObjectContext child1 = context.createChildObjectContext();
+        ObjectContext child1 = context.createChildContext();
 
         assertNull(((BaseContext) child1).getQueryCache().get(
                 query.getMetaData(child1.getEntityResolver())));

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextParentEventsTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextParentEventsTest.java?rev=725063&r1=725062&r2=725063&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextParentEventsTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextParentEventsTest.java
Wed Dec 10 04:10:50 2008
@@ -27,7 +27,7 @@
 
     public void testParentUpdatedId() {
         DataContext context = createDataContext();
-        ObjectContext child1 = context.createChildObjectContext();
+        ObjectContext child1 = context.createChildContext();
 
         Artist ac = child1.newObject(Artist.class);
         ac.setArtistName("X");

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextParentPeerEventsTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextParentPeerEventsTest.java?rev=725063&r1=725062&r2=725063&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextParentPeerEventsTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextParentPeerEventsTest.java
Wed Dec 10 04:10:50 2008
@@ -37,7 +37,7 @@
         DataContext parentPeer = context.getParentDataDomain().createDataContext();
         Artist a1 = (Artist) parentPeer.localObject(a.getObjectId(), a);
 
-        final ObjectContext peer2 = context.createChildObjectContext();
+        final ObjectContext peer2 = context.createChildContext();
         final Artist a2 = (Artist) peer2.localObject(a.getObjectId(), a);
 
         a1.setArtistName("Y");
@@ -74,7 +74,7 @@
         Painting p1 = (Painting) parentPeer.localObject(p.getObjectId(), p);
         Artist altA1 = (Artist) parentPeer.localObject(altA.getObjectId(), altA);
 
-        final ObjectContext peer2 = context.createChildObjectContext();
+        final ObjectContext peer2 = context.createChildContext();
         final Painting p2 = (Painting) peer2.localObject(p.getObjectId(), p);
         final Artist altA2 = (Artist) peer2.localObject(altA.getObjectId(), altA);
         Artist a2 = (Artist) peer2.localObject(a.getObjectId(), a);
@@ -115,7 +115,7 @@
         Painting py1 = (Painting) parentPeer.localObject(py.getObjectId(), py);
         Artist a1 = (Artist) parentPeer.localObject(a.getObjectId(), a);
 
-        final ObjectContext peer2 = context.createChildObjectContext();
+        final ObjectContext peer2 = context.createChildContext();
         final Painting py2 = (Painting) peer2.localObject(py.getObjectId(), py);
         final Artist a2 = (Artist) peer2.localObject(a.getObjectId(), a);
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextPeerEventsTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextPeerEventsTest.java?rev=725063&r1=725062&r2=725063&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextPeerEventsTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextPeerEventsTest.java
Wed Dec 10 04:10:50 2008
@@ -30,12 +30,12 @@
     public void testPeerObjectUpdatedTempOID() {
         DataContext context = createDataContext();
 
-        ObjectContext peer1 = context.createChildObjectContext();
+        ObjectContext peer1 = context.createChildContext();
         Artist a1 = peer1.newObject(Artist.class);
         a1.setArtistName("Y");
         ObjectId a1TempId = a1.getObjectId();
 
-        ObjectContext peer2 = context.createChildObjectContext();
+        ObjectContext peer2 = context.createChildContext();
         Artist a2 = (Artist) peer2.localObject(a1TempId, a1);
 
         assertEquals(a1TempId, a2.getObjectId());
@@ -53,10 +53,10 @@
         a.setArtistName("X");
         context.commitChanges();
 
-        ObjectContext peer1 = context.createChildObjectContext();
+        ObjectContext peer1 = context.createChildContext();
         Artist a1 = (Artist) peer1.localObject(a.getObjectId(), a);
 
-        ObjectContext peer2 = context.createChildObjectContext();
+        ObjectContext peer2 = context.createChildContext();
         Artist a2 = (Artist) peer2.localObject(a.getObjectId(), a);
 
         a1.setArtistName("Y");
@@ -82,11 +82,11 @@
         altA.setArtistName("Y");
         context.commitChanges();
 
-        ObjectContext peer1 = context.createChildObjectContext();
+        ObjectContext peer1 = context.createChildContext();
         Painting p1 = (Painting) peer1.localObject(p.getObjectId(), p);
         Artist altA1 = (Artist) peer1.localObject(altA.getObjectId(), altA);
 
-        ObjectContext peer2 = context.createChildObjectContext();
+        ObjectContext peer2 = context.createChildContext();
         Painting p2 = (Painting) peer2.localObject(p.getObjectId(), p);
         Artist altA2 = (Artist) peer2.localObject(altA.getObjectId(), altA);
         Artist a2 = (Artist) peer2.localObject(a.getObjectId(), a);
@@ -116,11 +116,11 @@
 
         context.commitChanges();
 
-        ObjectContext peer1 = context.createChildObjectContext();
+        ObjectContext peer1 = context.createChildContext();
         Painting py1 = (Painting) peer1.localObject(py.getObjectId(), py);
         Artist a1 = (Artist) peer1.localObject(a.getObjectId(), a);
 
-        ObjectContext peer2 = context.createChildObjectContext();
+        ObjectContext peer2 = context.createChildContext();
         Painting py2 = (Painting) peer2.localObject(py.getObjectId(), py);
         Artist a2 = (Artist) peer2.localObject(a.getObjectId(), a);
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextReadTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextReadTest.java?rev=725063&r1=725062&r2=725063&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextReadTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextReadTest.java
Wed Dec 10 04:10:50 2008
@@ -40,7 +40,7 @@
         DataContext parent = createDataContext();
         parent.setValidatingObjectsOnCommit(true);
 
-        ObjectContext child1 = parent.createChildObjectContext();
+        ObjectContext child1 = parent.createChildContext();
 
         assertNotNull(child1);
         assertSame(parent, child1.getChannel());
@@ -48,14 +48,14 @@
 
         parent.setValidatingObjectsOnCommit(false);
 
-        ObjectContext child2 = parent.createChildObjectContext();
+        ObjectContext child2 = parent.createChildContext();
 
         assertNotNull(child2);
         assertSame(parent, child2.getChannel());
         assertFalse(((DataContext) child2).isValidatingObjectsOnCommit());
 
         // second level of nesting
-        ObjectContext child21 = child2.createChildObjectContext();
+        ObjectContext child21 = child2.createChildContext();
 
         assertNotNull(child21);
         assertSame(child2, child21.getChannel());
@@ -67,7 +67,7 @@
         createTestData("testArtists");
 
         DataContext context = createDataContext();
-        ObjectContext childContext = context.createChildObjectContext();
+        ObjectContext childContext = context.createChildContext();
 
         Persistent _new = context.newObject(Artist.class);
 
@@ -159,7 +159,7 @@
         createTestData("testArtists");
 
         DataContext context = createDataContext();
-        ObjectContext childContext = context.createChildObjectContext();
+        ObjectContext childContext = context.createChildContext();
 
         int modifiedId = 33003;
         Artist modified = (Artist) DataObjectUtils.objectForQuery(
@@ -202,7 +202,7 @@
         deleteTestData();
 
         DataContext context = createDataContext();
-        ObjectContext childContext = context.createChildObjectContext();
+        ObjectContext childContext = context.createChildContext();
 
         Artist _new = context.newObject(Artist.class);
         Painting _newP = context.newObject(Painting.class);
@@ -227,7 +227,7 @@
         createTestData("testArtists");
 
         DataContext parent = createDataContext();
-        ObjectContext child = parent.createChildObjectContext();
+        ObjectContext child = parent.createChildContext();
 
         // test how different object states appear in the child on select
 
@@ -286,7 +286,7 @@
         createTestData("testReadRelationship");
 
         DataContext parent = createDataContext();
-        ObjectContext child = parent.createChildObjectContext();
+        ObjectContext child = parent.createChildContext();
 
         // test how different object states appear in the child on select
 
@@ -397,7 +397,7 @@
         createTestData("testPrefetching");
 
         DataContext parent = createDataContext();
-        ObjectContext child = parent.createChildObjectContext();
+        ObjectContext child = parent.createChildContext();
 
         ObjectId prefetchedId = new ObjectId(
                 "Artist",
@@ -436,7 +436,7 @@
         createTestData("testPrefetching");
 
         DataContext parent = createDataContext();
-        ObjectContext child = parent.createChildObjectContext();
+        ObjectContext child = parent.createChildContext();
 
         SelectQuery q = new SelectQuery(Artist.class);
         q.addOrdering(Artist.ARTIST_NAME_PROPERTY, true);

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextRollbackTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextRollbackTest.java?rev=725063&r1=725062&r2=725063&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextRollbackTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextRollbackTest.java
Wed Dec 10 04:10:50 2008
@@ -26,7 +26,7 @@
 
     public void testRollbackChanges() {
         DataContext context = createDataContext();
-        ObjectContext child1 = context.createChildObjectContext();
+        ObjectContext child1 = context.createChildContext();
 
         assertFalse(context.hasChanges());
         assertFalse(child1.hasChanges());
@@ -44,7 +44,7 @@
 
     public void testRollbackChangesLocally() {
         DataContext context = createDataContext();
-        ObjectContext child1 = context.createChildObjectContext();
+        ObjectContext child1 = context.createChildContext();
 
         assertFalse(context.hasChanges());
         assertFalse(child1.hasChanges());

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextValidationTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextValidationTest.java?rev=725063&r1=725062&r2=725063&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextValidationTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextValidationTest.java
Wed Dec 10 04:10:50 2008
@@ -30,7 +30,7 @@
         DataContext context = createDataContext();
         context.setValidatingObjectsOnCommit(true);
 
-        ObjectContext childContext = context.createChildObjectContext();
+        ObjectContext childContext = context.createChildContext();
         assertTrue(
                 "Child context must have inherited the validation flag from parent",
                 ((DataContext) childContext).isValidatingObjectsOnCommit());

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextWriteTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextWriteTest.java?rev=725063&r1=725062&r2=725063&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextWriteTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/access/NestedDataContextWriteTest.java
Wed Dec 10 04:10:50 2008
@@ -51,7 +51,7 @@
         createTestData("testDeleteNew");
 
         DataContext context = createDataContext();
-        ObjectContext childContext = context.createChildObjectContext();
+        ObjectContext childContext = context.createChildContext();
 
         Artist a = DataObjectUtils.objectForPK(childContext, Artist.class, 33001);
         Painting p = childContext.newObject(Painting.class);
@@ -74,8 +74,8 @@
         createTestData("testNullifyToOne");
 
         DataContext context = createDataContext();
-        ObjectContext childContext = context.createChildObjectContext();
-        ObjectContext childContextPeer = context.createChildObjectContext();
+        ObjectContext childContext = context.createChildContext();
+        ObjectContext childContextPeer = context.createChildContext();
 
         Painting childP1 = DataObjectUtils.objectForPK(
                 childContext,
@@ -109,7 +109,7 @@
         createTestData("testFlushChanges");
 
         DataContext context = createDataContext();
-        ObjectContext childContext = context.createChildObjectContext();
+        ObjectContext childContext = context.createChildContext();
 
         // make sure we fetch in predictable order
         SelectQuery query = new SelectQuery(Artist.class);
@@ -181,7 +181,7 @@
         createTestData("testFlushChanges");
 
         DataContext context = createDataContext();
-        ObjectContext childContext = context.createChildObjectContext();
+        ObjectContext childContext = context.createChildContext();
 
         // make sure we fetch in predictable order
         SelectQuery query = new SelectQuery(Artist.class);
@@ -218,7 +218,7 @@
         createTestData("testFlushChanges");
 
         DataContext context = createDataContext();
-        ObjectContext childContext = context.createChildObjectContext();
+        ObjectContext childContext = context.createChildContext();
 
         // make sure we fetch in predictable order
         SelectQuery query = new SelectQuery(Artist.class);
@@ -285,7 +285,7 @@
         createTestData("testCommitChangesToParent_MergeProperties");
 
         DataContext context = createDataContext();
-        ObjectContext childContext = context.createChildObjectContext();
+        ObjectContext childContext = context.createChildContext();
 
         // make sure we fetch in predictable order
         SelectQuery query = new SelectQuery(Painting.class);
@@ -365,7 +365,7 @@
         deleteTestData();
 
         DataContext context = createDataContext();
-        ObjectContext childContext = context.createChildObjectContext();
+        ObjectContext childContext = context.createChildContext();
 
         Painting childMaster = childContext.newObject(Painting.class);
         childMaster.setPaintingTitle("Master");
@@ -405,7 +405,7 @@
         deleteTestData();
 
         DataContext context = createDataContext();
-        ObjectContext childContext = context.createChildObjectContext();
+        ObjectContext childContext = context.createChildContext();
 
         Artist childO1 = childContext.newObject(Artist.class);
         childO1.setArtistName("Master");
@@ -449,7 +449,7 @@
         deleteTestData();
 
         DataContext context = createDataContext();
-        ObjectContext childContext = context.createChildObjectContext();
+        ObjectContext childContext = context.createChildContext();
 
         Artist childO1 = childContext.newObject(Artist.class);
         childO1.setArtistName("o1");
@@ -547,7 +547,7 @@
     public void testAddRemove() {
 
         DataContext context = createDataContext();
-        ObjectContext child = context.createChildObjectContext();
+        ObjectContext child = context.createChildContext();
 
         Artist a = child.newObject(Artist.class);
         a.setArtistName("X");

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/remote/NestedObjectContextLocalTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/remote/NestedObjectContextLocalTest.java?rev=725063&r1=725062&r2=725063&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/remote/NestedObjectContextLocalTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/remote/NestedObjectContextLocalTest.java
Wed Dec 10 04:10:50 2008
@@ -31,7 +31,7 @@
         SelectQuery query = new SelectQuery(ClientMtTable1.class);
         query.setCacheStrategy(QueryCacheStrategy.LOCAL_CACHE);
 
-        BaseContext child1 = (BaseContext) context.createChildObjectContext();
+        BaseContext child1 = (BaseContext) context.createChildContext();
 
         assertNull(child1.getQueryCache().get(
                 query.getMetaData(child1.getEntityResolver())));

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/remote/NestedObjectContextParentEventsTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/remote/NestedObjectContextParentEventsTest.java?rev=725063&r1=725062&r2=725063&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/remote/NestedObjectContextParentEventsTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/remote/NestedObjectContextParentEventsTest.java
Wed Dec 10 04:10:50 2008
@@ -27,7 +27,7 @@
     public void testParentUpdatedId() throws Exception {
         deleteTestData();
         
-        ObjectContext child = context.createChildObjectContext();
+        ObjectContext child = context.createChildContext();
 
         ClientMtTable1 ac = child.newObject(ClientMtTable1.class);
         ac.setGlobalAttribute1("X");

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/remote/NestedObjectContextPeerEventsTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/remote/NestedObjectContextPeerEventsTest.java?rev=725063&r1=725062&r2=725063&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/remote/NestedObjectContextPeerEventsTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/remote/NestedObjectContextPeerEventsTest.java
Wed Dec 10 04:10:50 2008
@@ -29,12 +29,12 @@
     public void testPeerObjectUpdatedTempOID() throws Exception {
         deleteTestData();
         
-        ObjectContext peer1 = context.createChildObjectContext();
+        ObjectContext peer1 = context.createChildContext();
         ClientMtTable1 a1 = peer1.newObject(ClientMtTable1.class);
         a1.setGlobalAttribute1("Y");
         ObjectId a1TempId = a1.getObjectId();
 
-        ObjectContext peer2 = context.createChildObjectContext();
+        ObjectContext peer2 = context.createChildContext();
         ClientMtTable1 a2 = (ClientMtTable1) peer2.localObject(a1TempId, a1);
 
         assertEquals(a1TempId, a2.getObjectId());
@@ -52,10 +52,10 @@
         a.setGlobalAttribute1("X");
         context.commitChanges();
 
-        ObjectContext peer1 = context.createChildObjectContext();
+        ObjectContext peer1 = context.createChildContext();
         ClientMtTable1 a1 = (ClientMtTable1) peer1.localObject(a.getObjectId(), a);
 
-        ObjectContext peer2 = context.createChildObjectContext();
+        ObjectContext peer2 = context.createChildContext();
         ClientMtTable1 a2 = (ClientMtTable1) peer2.localObject(a.getObjectId(), a);
 
         a1.setGlobalAttribute1("Y");
@@ -80,11 +80,11 @@
         altA.setGlobalAttribute1("Y");
         context.commitChanges();
 
-        ObjectContext peer1 = context.createChildObjectContext();
+        ObjectContext peer1 = context.createChildContext();
         ClientMtTable2 p1 = (ClientMtTable2) peer1.localObject(p.getObjectId(), p);
         ClientMtTable1 altA1 = (ClientMtTable1) peer1.localObject(altA.getObjectId(), altA);
 
-        ObjectContext peer2 = context.createChildObjectContext();
+        ObjectContext peer2 = context.createChildContext();
         ClientMtTable2 p2 = (ClientMtTable2) peer2.localObject(p.getObjectId(), p);
         ClientMtTable1 altA2 = (ClientMtTable1) peer2.localObject(altA.getObjectId(), altA);
         ClientMtTable1 a2 = (ClientMtTable1) peer2.localObject(a.getObjectId(), a);
@@ -113,11 +113,11 @@
 
         context.commitChanges();
 
-        ObjectContext peer1 = context.createChildObjectContext();
+        ObjectContext peer1 = context.createChildContext();
         ClientMtTable2 py1 = (ClientMtTable2) peer1.localObject(py.getObjectId(), py);
         ClientMtTable1 a1 = (ClientMtTable1) peer1.localObject(a.getObjectId(), a);
 
-        ObjectContext peer2 = context.createChildObjectContext();
+        ObjectContext peer2 = context.createChildContext();
         ClientMtTable2 py2 = (ClientMtTable2) peer2.localObject(py.getObjectId(), py);
         ClientMtTable1 a2 = (ClientMtTable1) peer2.localObject(a.getObjectId(), a);
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/remote/NestedObjectContextRollbackTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/remote/NestedObjectContextRollbackTest.java?rev=725063&r1=725062&r2=725063&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/remote/NestedObjectContextRollbackTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/remote/NestedObjectContextRollbackTest.java
Wed Dec 10 04:10:50 2008
@@ -24,7 +24,7 @@
 public class NestedObjectContextRollbackTest extends RemoteCayenneCase {
 
     public void testRollbackChanges() {
-        ObjectContext child1 = context.createChildObjectContext();
+        ObjectContext child1 = context.createChildContext();
         
         assertFalse(context.hasChanges());
         assertFalse(child1.hasChanges());
@@ -43,7 +43,7 @@
     }
     
     public void testRollbackChangesLocally() {
-        ObjectContext child1 = context.createChildObjectContext();
+        ObjectContext child1 = context.createChildContext();
         
         assertFalse(context.hasChanges());
         assertFalse(child1.hasChanges());

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/remote/NestedObjectContextTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/remote/NestedObjectContextTest.java?rev=725063&r1=725062&r2=725063&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/remote/NestedObjectContextTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/remote/NestedObjectContextTest.java
Wed Dec 10 04:10:50 2008
@@ -37,13 +37,13 @@
  */
 public class NestedObjectContextTest extends RemoteCayenneCase {
     public void testChannels() {
-        ObjectContext child = context.createChildObjectContext();
+        ObjectContext child = context.createChildContext();
 
         assertNotNull(child);
         assertSame(context, child.getChannel());
 
         // second level of nesting
-        ObjectContext grandchild = child.createChildObjectContext();
+        ObjectContext grandchild = child.createChildContext();
 
         assertNotNull(grandchild);
         assertSame(child, grandchild.getChannel());
@@ -52,7 +52,7 @@
     public void testLocalObjectSynchronize() throws Exception {
         deleteTestData();
 
-        ObjectContext child = context.createChildObjectContext();
+        ObjectContext child = context.createChildContext();
 
         ClientMtTable1 committed = context.newObject(ClientMtTable1.class);
         ClientMtTable1 deleted = context.newObject(ClientMtTable1.class);
@@ -117,7 +117,7 @@
     public void testLocalObjectsNoOverride() throws Exception {
         deleteTestData();
 
-        ObjectContext child = context.createChildObjectContext();
+        ObjectContext child = context.createChildContext();
 
         ClientMtTable1 modified = context.newObject(ClientMtTable1.class);
         context.commitChanges();
@@ -149,7 +149,7 @@
     public void testLocalObjectRelationship() throws Exception {
         deleteTestData();
 
-        ObjectContext child = context.createChildObjectContext();
+        ObjectContext child = context.createChildContext();
 
         ClientMtTable1 _new = context.newObject(ClientMtTable1.class);
         ClientMtTable2 _new2 = context.newObject(ClientMtTable2.class);
@@ -172,7 +172,7 @@
     public void testSelect() throws Exception {
         deleteTestData();
 
-        ObjectContext child = context.createChildObjectContext();
+        ObjectContext child = context.createChildContext();
 
         ClientMtTable1 committed = context.newObject(ClientMtTable1.class);
         ClientMtTable1 deleted = context.newObject(ClientMtTable1.class);
@@ -221,7 +221,7 @@
 
         context.commitChanges();
 
-        ObjectContext child = context.createChildObjectContext();
+        ObjectContext child = context.createChildContext();
 
         SelectQuery q = new SelectQuery(ClientMtTable2.class);
         q.addPrefetch(ClientMtTable2.TABLE1_PROPERTY);
@@ -266,7 +266,7 @@
 
         context.commitChanges();
 
-        ObjectContext child = context.createChildObjectContext();
+        ObjectContext child = context.createChildContext();
 
         SelectQuery q = new SelectQuery(ClientMtTable1.class);
         q.addOrdering("globalAttribute1", true);
@@ -308,7 +308,7 @@
 
     public void testDeleteNew() throws Exception {
         deleteTestData();
-        ObjectContext child = context.createChildObjectContext();
+        ObjectContext child = context.createChildContext();
 
         ClientMtTable1 a = context.newObject(ClientMtTable1.class);
         context.commitChanges();
@@ -338,8 +338,8 @@
 
         context.commitChanges();
 
-        ObjectContext child = context.createChildObjectContext();
-        ObjectContext childPeer = context.createChildObjectContext();
+        ObjectContext child = context.createChildContext();
+        ObjectContext childPeer = context.createChildContext();
 
         ClientMtTable2 childP1 = (ClientMtTable2) DataObjectUtils.objectForPK(child, b.getObjectId());
 
@@ -374,7 +374,7 @@
         context.newObject(ClientMtTable1.class);
         context.commitChanges();
 
-        ObjectContext child = context.createChildObjectContext();
+        ObjectContext child = context.createChildContext();
 
         SelectQuery query = new SelectQuery(ClientMtTable1.class);
         List objects = child.performQuery(query);
@@ -443,7 +443,7 @@
         context.newObject(ClientMtTable1.class);
         context.commitChanges();
 
-        ObjectContext child = context.createChildObjectContext();
+        ObjectContext child = context.createChildContext();
 
         // make sure we fetch in predictable order
         SelectQuery query = new SelectQuery(ClientMtTable1.class);
@@ -483,7 +483,7 @@
         context.newObject(ClientMtTable1.class);
         context.commitChanges();
 
-        ObjectContext child = context.createChildObjectContext();
+        ObjectContext child = context.createChildContext();
 
         // make sure we fetch in predictable order
         SelectQuery query = new SelectQuery(ClientMtTable1.class);
@@ -544,7 +544,7 @@
 
     public void testAddRemove() throws Exception {
         deleteTestData();
-        ObjectContext child = context.createChildObjectContext();
+        ObjectContext child = context.createChildContext();
 
         ClientMtTable1 a = child.newObject(ClientMtTable1.class);
         a.setGlobalAttribute1("X");
@@ -569,7 +569,7 @@
 
     public void testChangeRel() throws Exception {
         deleteTestData();
-        ObjectContext child = context.createChildObjectContext();
+        ObjectContext child = context.createChildContext();
 
         ClientMtTable1 a = child.newObject(ClientMtTable1.class);
         ClientMtTable2 b = child.newObject(ClientMtTable2.class);



Mime
View raw message