X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.db.layer0%2Fsrc%2Forg%2Fsimantics%2Fdb%2Flayer0%2Frequest%2FPossibleActiveRun.java;h=1921e7af0660617baaef9ed289005e3783e6acd0;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hp=7e5849c04e046336dc9d42fedc40790f089186c6;hpb=24e2b34260f219f0d1644ca7a138894980e25b14;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/request/PossibleActiveRun.java b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/request/PossibleActiveRun.java index 7e5849c04..1921e7af0 100644 --- a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/request/PossibleActiveRun.java +++ b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/request/PossibleActiveRun.java @@ -1,30 +1,30 @@ -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 { - - 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 result = graph.sync(new ActiveRuns(resource)); - if(result.size() == 1) return result.iterator().next(); - else return null; - - } - -} +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 { + + 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 result = graph.sync(new ActiveRuns(resource)); + if(result.size() == 1) return result.iterator().next(); + else return null; + + } + +}