cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r1357896 - in /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src: main/java/org/apache/cayenne/ test/java/org/apache/cayenne/ test/java/org/apache/cayenne/testdo/mt/
Date Thu, 05 Jul 2012 20:48:42 GMT
Author: aadamchik
Date: Thu Jul  5 20:48:42 2012
New Revision: 1357896

URL: http://svn.apache.org/viewvc?rev=1357896&view=rev
Log:
CAY-1718 Remove everything deprecated in 3.1

in progress

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/PersistentObject.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/CayenneDataObjectInContextTest.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/PersistentObjectTest.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/MtTable1.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/MtTable3.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/PersistentObject.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/PersistentObject.java?rev=1357896&r1=1357895&r2=1357896&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/PersistentObject.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/PersistentObject.java
Thu Jul  5 20:48:42 2012
@@ -20,7 +20,6 @@
 package org.apache.cayenne;
 
 import org.apache.cayenne.map.EntityResolver;
-import org.apache.cayenne.map.ObjEntity;
 import org.apache.cayenne.reflect.ClassDescriptor;
 import org.apache.cayenne.reflect.Property;
 import org.apache.cayenne.reflect.ToManyMapProperty;
@@ -124,16 +123,4 @@ public abstract class PersistentObject i
 
         return buffer.toString();
     }
-    
-    /**
-     * Returns mapped ObjEntity for this object. If an object is transient or is not
-     * mapped returns null.
-     * 
-     * @since 1.2
-     * @deprecated since 3.1 {@link org.apache.cayenne.Cayenne#getObjEntity(Persistent)}
is used
-     */
-    @Deprecated
-    public ObjEntity getObjEntity() {
-        return Cayenne.getObjEntity(this);
-    }
 }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/CayenneDataObjectInContextTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/CayenneDataObjectInContextTest.java?rev=1357896&r1=1357895&r2=1357896&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/CayenneDataObjectInContextTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/CayenneDataObjectInContextTest.java
Thu Jul  5 20:48:42 2012
@@ -25,12 +25,10 @@ import org.apache.cayenne.access.DataCon
 import org.apache.cayenne.configuration.server.ServerRuntime;
 import org.apache.cayenne.di.Inject;
 import org.apache.cayenne.exp.ExpressionFactory;
-import org.apache.cayenne.map.ObjEntity;
 import org.apache.cayenne.query.SelectQuery;
 import org.apache.cayenne.test.jdbc.DBHelper;
 import org.apache.cayenne.test.jdbc.TableHelper;
 import org.apache.cayenne.testdo.testmap.Artist;
-import org.apache.cayenne.testdo.testmap.Painting;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 
@@ -87,26 +85,6 @@ public class CayenneDataObjectInContextT
         }
     }
 
-    @Deprecated
-    public void testObjEntity() {
-
-        Artist a = new Artist();
-        assertNull(a.getObjEntity());
-
-        context.registerNewObject(a);
-        ObjEntity e = a.getObjEntity();
-        assertNotNull(e);
-        assertEquals("Artist", e.getName());
-
-        Painting p = new Painting();
-        assertNull(p.getObjEntity());
-
-        context.registerNewObject(p);
-        ObjEntity e1 = p.getObjEntity();
-        assertNotNull(e1);
-        assertEquals("Painting", e1.getName());
-    }
-
     public void testCommitChangesInBatch() {
 
         Artist a1 = context.newObject(Artist.class);

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/PersistentObjectTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/PersistentObjectTest.java?rev=1357896&r1=1357895&r2=1357896&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/PersistentObjectTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/PersistentObjectTest.java
Thu Jul  5 20:48:42 2012
@@ -19,17 +19,12 @@
 
 package org.apache.cayenne;
 
-import org.apache.cayenne.di.Inject;
-import org.apache.cayenne.testdo.testmap.Artist;
 import org.apache.cayenne.unit.di.server.ServerCase;
 import org.apache.cayenne.unit.di.server.UseServerRuntime;
 
 @UseServerRuntime(ServerCase.TESTMAP_PROJECT)
 public class PersistentObjectTest extends ServerCase {
 
-    @Inject
-    private ObjectContext context;
-
     public void testObjectContext() {
         MockObjectContext context = new MockObjectContext();
         PersistentObject object = new MockPersistentObject();
@@ -56,12 +51,4 @@ public class PersistentObjectTest extend
         assertSame(id, object.getObjectId());
     }
 
-    @Deprecated
-    public void testGetObjEntity() throws Exception {
-        PersistentObject a = new Artist();
-        assertEquals(a.getObjEntity(), null);
-
-        context.registerNewObject(a);
-        assertEquals(a.getObjEntity().getName(), "Artist");
-    }
 }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/MtTable1.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/MtTable1.java?rev=1357896&r1=1357895&r2=1357896&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/MtTable1.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/MtTable1.java
Thu Jul  5 20:48:42 2012
@@ -18,23 +18,12 @@
  ****************************************************************/
 package org.apache.cayenne.testdo.mt;
 
-import org.apache.cayenne.map.ObjEntity;
 import org.apache.cayenne.testdo.mt.auto._MtTable1;
 
 public class MtTable1 extends _MtTable1 {
 
-    protected ObjEntity entity;
     protected transient boolean prePersisted;
 
-    @Override
-    public ObjEntity getObjEntity() {
-        return (entity != null) ? entity : super.getObjEntity();
-    }
-
-    public void setObjEntity(ObjEntity entity) {
-        this.entity = entity;
-    }
-
     public void prePersistMethod() {
         prePersisted = true;
     }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/MtTable3.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/MtTable3.java?rev=1357896&r1=1357895&r2=1357896&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/MtTable3.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/testdo/mt/MtTable3.java
Thu Jul  5 20:48:42 2012
@@ -18,19 +18,8 @@
  ****************************************************************/
 package org.apache.cayenne.testdo.mt;
 
-import org.apache.cayenne.map.ObjEntity;
 import org.apache.cayenne.testdo.mt.auto._MtTable3;
 
 public class MtTable3 extends _MtTable3 {
 
-    protected ObjEntity entity;
-
-    @Override
-    public ObjEntity getObjEntity() {
-        return (entity != null) ? entity : super.getObjEntity();
-    }
-
-    public void setObjEntity(ObjEntity entity) {
-        this.entity = entity;
-    }
 }



Mime
View raw message