openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From awh...@apache.org
Subject svn commit: r441158 [5/5] - in /incubator/openjpa/trunk: openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/ openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/ openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/ openjpa-kernel/s...
Date Thu, 07 Sep 2006 17:51:09 GMT
Modified: incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryResultCache.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryResultCache.java?view=diff&rev=441158&r1=441157&r2=441158
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryResultCache.java
(original)
+++ incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryResultCache.java
Thu Sep  7 10:51:05 2006
@@ -15,13 +15,9 @@
  */
 package org.apache.openjpa.persistence;
 
-import java.util.Collections;
 import javax.persistence.Query;
 
-import org.apache.openjpa.datacache.DelegatingQueryCache;
 import org.apache.openjpa.datacache.QueryCache;
-import org.apache.openjpa.datacache.QueryKey;
-import org.apache.openjpa.datacache.TypesChangedEvent;
 
 /**
  * Query result cache.

Modified: incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryResultCacheImpl.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryResultCacheImpl.java?view=diff&rev=441158&r1=441157&r2=441158
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryResultCacheImpl.java
(original)
+++ incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/QueryResultCacheImpl.java
Thu Sep  7 10:51:05 2006
@@ -27,7 +27,6 @@
  * Implements Query result cache via delegation to QueryCache.
  *
  * @author Abe White
- * @author Pinaki Poddar
  * @since 0.4.1
  * @nojavadoc
  */
@@ -44,47 +43,29 @@
             PersistenceExceptions.TRANSLATOR);
     }
 
-    /**
-     * Delegate.
-     */
     public QueryCache getDelegate() {
         return _cache.getDelegate();
     }
 
-    /**
-     * Pin the given query's result to the cache.
-     */
     public void pin(Query q) {
         if (_cache.getDelegate() != null)
             _cache.pin(toQueryKey(q));
     }
 
-    /**
-     * Unpin a previously-pinned query result.
-     */
     public void unpin(Query q) {
         if (_cache.getDelegate() != null)
             _cache.unpin(toQueryKey(q));
     }
 
-    /**
-     * Evict a query result from the cache.
-     */
     public void evict(Query q) {
         if (_cache.getDelegate() != null)
             _cache.remove(toQueryKey(q));
     }
 
-    /**
-     * Clear the cache.
-     */
     public void evictAll() {
         _cache.clear();
     }
 
-    /**
-     * Evict all result for queries involving the given class.
-     */
     public void evictAll(Class cls) {
         _cache.onTypesChanged(new TypesChangedEvent(this,
             Collections.singleton(cls)));

Modified: incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/StoreCache.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/StoreCache.java?view=diff&rev=441158&r1=441157&r2=441158
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/StoreCache.java
(original)
+++ incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/StoreCache.java
Thu Sep  7 10:51:05 2006
@@ -15,20 +15,14 @@
  */
 package org.apache.openjpa.persistence;
 
-import java.util.Arrays;
-import java.util.BitSet;
 import java.util.Collection;
 
 import org.apache.openjpa.datacache.DataCache;
-import org.apache.openjpa.datacache.DelegatingDataCache;
-import org.apache.openjpa.meta.ClassMetaData;
-import org.apache.openjpa.meta.MetaDataRepository;
 
 /**
  * Represents the L2 cache over the data store.
  *
  * @author Abe White
- * @author Pinaki Poddar
  * @since 0.4.1
  * @published
  */

Modified: incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/StoreCacheImpl.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/StoreCacheImpl.java?view=diff&rev=441158&r1=441157&r2=441158
==============================================================================
--- incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/StoreCacheImpl.java
(original)
+++ incubator/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/StoreCacheImpl.java
Thu Sep  7 10:51:05 2006
@@ -29,7 +29,6 @@
  * Implements the L2 cache over the data store via delegation to DataCache.
  *
  * @author Abe White
- * @author Pinaki Poddar
  * @since 0.4.1
  * @nojavadoc
  */
@@ -54,9 +53,8 @@
     }
 
     public boolean contains(Class cls, Object oid) {
-        return _cache.getDelegate() != null
-            && _cache.contains(OpenJPAPersistence.toOpenJPAObjectId
-            (getMetaData(cls), oid));
+        return _cache.getDelegate() != null && _cache.contains
+            (OpenJPAPersistence.toOpenJPAObjectId(getMetaData(cls), oid));
     }
 
     public boolean containsAll(Class cls, Object... oids) {
@@ -77,8 +75,8 @@
 
     public void pin(Class cls, Object oid) {
         if (_cache.getDelegate() != null)
-            _cache.pin(
-                OpenJPAPersistence.toOpenJPAObjectId(getMetaData(cls), oid));
+            _cache.pin(OpenJPAPersistence.toOpenJPAObjectId(getMetaData(cls), 
+                oid));
     }
 
     public void pinAll(Class cls, Object... oids) {
@@ -87,9 +85,8 @@
 
     public void pinAll(Class cls, Collection oids) {
         if (_cache.getDelegate() != null)
-            _cache
-                .pinAll(OpenJPAPersistence.toOpenJPAObjectIds(getMetaData(cls),
-                    oids));
+            _cache.pinAll(OpenJPAPersistence.toOpenJPAObjectIds
+                (getMetaData(cls), oids));
     }
 
     public void unpin(Class cls, Object oid) {
@@ -104,9 +101,8 @@
 
     public void unpinAll(Class cls, Collection oids) {
         if (_cache.getDelegate() != null)
-            _cache.unpinAll(
-                OpenJPAPersistence.toOpenJPAObjectIds(getMetaData(cls),
-                    oids));
+            _cache.unpinAll(OpenJPAPersistence.toOpenJPAObjectIds
+                (getMetaData(cls), oids));
     }
 
     public void evict(Class cls, Object oid) {
@@ -121,9 +117,8 @@
 
     public void evictAll(Class cls, Collection oids) {
         if (_cache.getDelegate() != null)
-            _cache.removeAll(
-                OpenJPAPersistence.toOpenJPAObjectIds(getMetaData(cls),
-                    oids));
+            _cache.removeAll(OpenJPAPersistence.toOpenJPAObjectIds
+                (getMetaData(cls), oids));
     }
 
     public void evictAll() {



Mime
View raw message