-package org.simantics.db.layer0.request;\r
-\r
-import java.util.Collection;\r
-\r
-import org.simantics.db.ReadGraph;\r
-import org.simantics.db.Resource;\r
-import org.simantics.db.common.request.ResourceRead;\r
-import org.simantics.db.exception.DatabaseException;\r
-import org.simantics.db.layer0.variable.Variable;\r
-\r
-public class PossibleActiveRun extends ResourceRead<Variable> {\r
-\r
- public PossibleActiveRun(Resource model) {\r
- super(model);\r
- }\r
-\r
- public PossibleActiveRun(ReadGraph graph, Variable model) throws DatabaseException {\r
- super(model.getRepresents(graph));\r
- }\r
-\r
- @Override\r
- public Variable perform(ReadGraph graph) throws DatabaseException {\r
-\r
- Collection<Variable> result = graph.sync(new ActiveRuns(resource));\r
- if(result.size() == 1) return result.iterator().next();\r
- else return null;\r
-\r
- }\r
-\r
-}\r
+package org.simantics.db.layer0.request;
+
+import java.util.Collection;
+
+import org.simantics.db.ReadGraph;
+import org.simantics.db.Resource;
+import org.simantics.db.common.request.ResourceRead;
+import org.simantics.db.exception.DatabaseException;
+import org.simantics.db.layer0.variable.Variable;
+
+public class PossibleActiveRun extends ResourceRead<Variable> {
+
+ public PossibleActiveRun(Resource model) {
+ super(model);
+ }
+
+ public PossibleActiveRun(ReadGraph graph, Variable model) throws DatabaseException {
+ super(model.getRepresents(graph));
+ }
+
+ @Override
+ public Variable perform(ReadGraph graph) throws DatabaseException {
+
+ Collection<Variable> result = graph.sync(new ActiveRuns(resource));
+ if(result.size() == 1) return result.iterator().next();
+ else return null;
+
+ }
+
+}