cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r454233 - in /incubator/cayenne/main/trunk/core/cayenne-jpa/src/main/java/org/apache/cayenne/jpa/enhancer: CglibEnhancer.java DataObjectDelegate.java
Date Sun, 08 Oct 2006 23:27:13 GMT
Author: aadamchik
Date: Sun Oct  8 16:27:12 2006
New Revision: 454233

URL: http://svn.apache.org/viewvc?view=rev&rev=454233
Log:
trimming unused enhancer methods

Modified:
    incubator/cayenne/main/trunk/core/cayenne-jpa/src/main/java/org/apache/cayenne/jpa/enhancer/CglibEnhancer.java
    incubator/cayenne/main/trunk/core/cayenne-jpa/src/main/java/org/apache/cayenne/jpa/enhancer/DataObjectDelegate.java

Modified: incubator/cayenne/main/trunk/core/cayenne-jpa/src/main/java/org/apache/cayenne/jpa/enhancer/CglibEnhancer.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/core/cayenne-jpa/src/main/java/org/apache/cayenne/jpa/enhancer/CglibEnhancer.java?view=diff&rev=454233&r1=454232&r2=454233
==============================================================================
--- incubator/cayenne/main/trunk/core/cayenne-jpa/src/main/java/org/apache/cayenne/jpa/enhancer/CglibEnhancer.java
(original)
+++ incubator/cayenne/main/trunk/core/cayenne-jpa/src/main/java/org/apache/cayenne/jpa/enhancer/CglibEnhancer.java
Sun Oct  8 16:27:12 2006
@@ -115,6 +115,9 @@
         Collection<String> excludes = new ArrayList<String>();
         excludes.add("setSnapshotVersion");
         excludes.add("getSnapshotVersion");
+        excludes.add("getDataContext");
+        excludes.add("setDataContext");
+
         ClassTransformer t2 = new InterfaceMethodInjector(
                 DataObject.class,
                 DataObjectDelegate.class,

Modified: incubator/cayenne/main/trunk/core/cayenne-jpa/src/main/java/org/apache/cayenne/jpa/enhancer/DataObjectDelegate.java
URL: http://svn.apache.org/viewvc/incubator/cayenne/main/trunk/core/cayenne-jpa/src/main/java/org/apache/cayenne/jpa/enhancer/DataObjectDelegate.java?view=diff&rev=454233&r1=454232&r2=454233
==============================================================================
--- incubator/cayenne/main/trunk/core/cayenne-jpa/src/main/java/org/apache/cayenne/jpa/enhancer/DataObjectDelegate.java
(original)
+++ incubator/cayenne/main/trunk/core/cayenne-jpa/src/main/java/org/apache/cayenne/jpa/enhancer/DataObjectDelegate.java
Sun Oct  8 16:27:12 2006
@@ -19,7 +19,6 @@
 
 package org.apache.cayenne.jpa.enhancer;
 
-import org.apache.cayenne.CayenneRuntimeException;
 import org.apache.cayenne.DataObject;
 import org.apache.cayenne.ObjectContext;
 import org.apache.cayenne.ObjectId;
@@ -33,8 +32,8 @@
 /**
  * A static delegate for DataObject callbacks. To obtain class descriptors,
  * DataObjectDelegate will use a DataObject context first, and then fall back to the
- * DataContext bound to the current thread. If none of these methods work, and exception
- * is thrown.
+ * DataContext bound to the current thread. If none of these methods work, an exception is
+ * thrown.
  * 
  * @author Andrus Adamchik
  */
@@ -66,20 +65,6 @@
         }
     }
 
-    public static DataContext getDataContext(DataObject object) {
-        ObjectContext context = object.getObjectContext();
-        if (context == null || context instanceof DataContext) {
-            return (DataContext) context;
-        }
-
-        throw new CayenneRuntimeException("ObjectContext is not a DataContext: "
-                + context);
-    }
-
-    public static void setDataContext(DataObject object, DataContext dataContext) {
-        object.setObjectContext(dataContext);
-    }
-
     public static Object readNestedProperty(DataObject object, String path) {
         return PropertyUtils.getProperty(object, path);
     }
@@ -134,14 +119,6 @@
 
     public static void fetchFinished(DataObject object) {
         // noop
-    }
-
-    public static long getSnapshotVersion(DataObject object) {
-        throw new UnsupportedOperationException("Not supported");
-    }
-
-    public static void setSnapshotVersion(DataObject object, long snapshotVersion) {
-        throw new UnsupportedOperationException("Not supported");
     }
 
     /**



Mime
View raw message