openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwsut...@apache.org
Subject svn commit: r925703 - in /openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence: EntityManagerImpl.java JPAProperties.java
Date Sun, 21 Mar 2010 00:19:27 GMT
Author: kwsutter
Date: Sun Mar 21 00:19:27 2010
New Revision: 925703

URL: http://svn.apache.org/viewvc?rev=925703&view=rev
Log:
OPENJPA-1588.  Removed the processing of the CacheStoreMode property from the convertToKernelValue
method.  Also, corrected the spelling of this method.

Modified:
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/JPAProperties.java

Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java?rev=925703&r1=925702&r2=925703&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java
(original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/EntityManagerImpl.java
Sun Mar 21 00:19:27 2010
@@ -1702,14 +1702,14 @@ public class EntityManagerImpl
         CacheRetrieveMode rMode = JPAProperties.getEnumValue(CacheRetrieveMode.class, 
                 JPAProperties.CACHE_RETRIEVE_MODE, properties);
         if (rMode != null) {
-            fetch.setCacheRetrieveMode(JPAProperties.convertToKenelValue(DataCacheRetrieveMode.class,

+            fetch.setCacheRetrieveMode(JPAProperties.convertToKernelValue(DataCacheRetrieveMode.class,

                     JPAProperties.CACHE_RETRIEVE_MODE, rMode));
             properties.remove(JPAProperties.CACHE_RETRIEVE_MODE);
         }
         CacheStoreMode sMode = JPAProperties.getEnumValue(CacheStoreMode.class, 
                 JPAProperties.CACHE_STORE_MODE, properties);
         if (sMode != null) {
-            fetch.setCacheStoreMode(JPAProperties.convertToKenelValue(DataCacheStoreMode.class,

+            fetch.setCacheStoreMode(JPAProperties.convertToKernelValue(DataCacheStoreMode.class,

                     JPAProperties.CACHE_STORE_MODE, sMode));
             properties.remove(JPAProperties.CACHE_STORE_MODE);
         }
@@ -1791,7 +1791,7 @@ public class EntityManagerImpl
      */
     Object convertUserValue(String key, Object value, Class<?> targetType) {
         if (JPAProperties.isValidKey(key)) 
-            return JPAProperties.convertToKenelValue(targetType, key, value);
+            return JPAProperties.convertToKernelValue(targetType, key, value);
         if (value instanceof String) {
             if ("null".equals(value)) {
                 return null;

Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/JPAProperties.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/JPAProperties.java?rev=925703&r1=925702&r2=925703&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/JPAProperties.java
(original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/JPAProperties.java
Sun Mar 21 00:19:27 2010
@@ -125,7 +125,7 @@ public class JPAProperties {
      * 
      * @return the same value if the given key is not a valid JPA property key or the value
is null.
      */
-    public static <T> T  convertToKenelValue(Class<T> resultType, String key,
Object value) {
+    public static <T> T  convertToKernelValue(Class<T> resultType, String key,
Object value) {
         if (value == null)
             return null;
         if (JPAProperties.isValidKey(key)) {
@@ -134,8 +134,6 @@ public class JPAProperties {
                 return (T)DataCacheRetrieveMode.valueOf(value.toString().trim().toUpperCase());
             } else if (value instanceof CacheStoreMode || (value instanceof String &&
CACHE_STORE_MODE.equals(key))) {
                 return (T)DataCacheStoreMode.valueOf(value.toString().trim().toUpperCase());
-            } else if (value instanceof SharedCacheMode || (value instanceof String &&
CACHE_MODE.equals(key))) {
-                return (T)DataCacheMode.valueOf(value.toString().trim().toUpperCase());
             }
         }
         return (T)value;



Mime
View raw message