]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/ValueQuery.java
Still working for multiple readers
[simantics/platform.git] / bundles / org.simantics.db.impl / src / org / simantics / db / impl / query / ValueQuery.java
index 1521d31936d8e3946addd015b62ac9ce68b77cbe..b96e13d42fc14d177779ef021564dfb1fdd22fed 100644 (file)
@@ -43,18 +43,9 @@ final public class ValueQuery extends UnaryQuery<InternalProcedure<byte[]>> {
                
        }
 
-    public static byte[] computeForEach(ReadGraphImpl graph, final int r) {
-
-        graph.ensureLoaded(r);
-        
-        return graph.getValue(r);
-        
-    }
-       
-       @Override
-       public Object compute(ReadGraphImpl graph, final InternalProcedure<byte[]> procedure) throws DatabaseException {
-               return computeForEach(graph, id, this, procedure);
-    }
+//     public Object compute(ReadGraphImpl graph, final InternalProcedure<byte[]> procedure) throws DatabaseException {
+//             return computeForEach(graph, id, this, procedure);
+//    }
     
     @Override
     public String toString() {
@@ -63,13 +54,13 @@ final public class ValueQuery extends UnaryQuery<InternalProcedure<byte[]>> {
 
     @Override
     public Object performFromCache(ReadGraphImpl graph, InternalProcedure<byte[]> procedure) throws DatabaseException {
-       return compute(graph, procedure);
+       return computeForEach(graph, id, this, procedure);
     }
     
     @Override
     public void recompute(ReadGraphImpl graph) throws DatabaseException {
        
-        compute(graph,  new InternalProcedure<byte[]>() {
+       computeForEach(graph, id, this, new InternalProcedure<byte[]>() {
 
             @Override
             public void execute(ReadGraphImpl graph, byte[] result) {