1 package org.simantics.db.layer0.request;
3 import java.util.Collection;
5 import org.simantics.db.ReadGraph;
6 import org.simantics.db.Resource;
7 import org.simantics.db.common.request.ResourceRead;
8 import org.simantics.db.exception.DatabaseException;
9 import org.simantics.db.layer0.variable.Variable;
11 public class PossibleActiveRun extends ResourceRead<Variable> {
13 public PossibleActiveRun(Resource model) {
17 public PossibleActiveRun(ReadGraph graph, Variable model) throws DatabaseException {
18 super(model.getRepresents(graph));
22 public Variable perform(ReadGraph graph) throws DatabaseException {
24 Collection<Variable> result = graph.sync(new ActiveRuns(resource));
25 if(result.size() == 1) return result.iterator().next();