/*******************************************************************************
- * Copyright (c) 2007, 2010 Association for Decentralized Information Management
+ * Copyright (c) 2007, 2018 Association for Decentralized Information Management
* in Industry THTH ry.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
import org.simantics.db.impl.graph.ReadGraphImpl;
import org.simantics.db.request.RequestFlags;
-abstract public class UnaryQuery<Procedure> extends CacheEntryBase implements Query {
-
+public abstract class UnaryQuery<Procedure> extends CacheEntryBase<Procedure> implements Query {
+
final public int id;
public UnaryQuery(int r) {
return this;
}
- @Override
- public void recompute(ReadGraphImpl graph, Object provider, CacheEntry entry) {
- recompute(graph, (QueryProcessor)provider);
- }
-
- @Override
- public void performFromCache(ReadGraphImpl graph, Object provider, Object procedure) {
- performFromCache(graph, (QueryProcessor)provider, (Procedure)procedure);
- }
-
- abstract public void recompute(ReadGraphImpl graph, QueryProcessor provider);
- abstract public Object computeForEach(ReadGraphImpl graph, QueryProcessor provider, Procedure procedure, boolean store);
- abstract public Object performFromCache(ReadGraphImpl graph, QueryProcessor provider, Procedure procedure);
- abstract public void putEntry(QueryProcessor provider);
abstract public void removeEntry(QueryProcessor provider);
- abstract public UnaryQuery<Procedure> getEntry(QueryProcessor provider);
- public Object get(ReadGraphImpl graph, QueryProcessor processor, Object procedure) throws Throwable {
+ public Object get(ReadGraphImpl graph, Procedure procedure) throws Throwable {
if(procedure != null) {
- performFromCache(graph, processor, procedure);
+ performFromCache(graph, procedure);
} else {
checkAndThrow();
}
@Override
boolean isImmutable(ReadGraphImpl graph) throws DatabaseException {
- return graph.processor.isImmutable(id);
+ return graph.processor.isImmutable(id);
}
}