X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.db.common%2Fsrc%2Forg%2Fsimantics%2Fdb%2Fcommon%2Frequest%2FPossibleNearestOwner.java;h=d4f51eec6f01e36a7d26a8383702f9de5ee821ec;hp=d2b59d204a6d4b0523fcbb30b1c4e1184ac12a19;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hpb=24e2b34260f219f0d1644ca7a138894980e25b14 diff --git a/bundles/org.simantics.db.common/src/org/simantics/db/common/request/PossibleNearestOwner.java b/bundles/org.simantics.db.common/src/org/simantics/db/common/request/PossibleNearestOwner.java index d2b59d204..d4f51eec6 100644 --- a/bundles/org.simantics.db.common/src/org/simantics/db/common/request/PossibleNearestOwner.java +++ b/bundles/org.simantics.db.common/src/org/simantics/db/common/request/PossibleNearestOwner.java @@ -1,21 +1,21 @@ -package org.simantics.db.common.request; - -import org.simantics.db.ReadGraph; -import org.simantics.db.Resource; -import org.simantics.db.exception.DatabaseException; - -public class PossibleNearestOwner extends ResourceRead2 { - - public PossibleNearestOwner(Resource resource, Resource type) { - super(resource, type); - } - - @Override - public Resource perform(ReadGraph graph) throws DatabaseException { - Resource owner = graph.syncRequest(new PossibleOwner(resource)); - if(owner == null) return null; - if(graph.isInstanceOf(owner, resource2)) return owner; - return graph.syncRequest(new PossibleNearestOwner(owner, resource2)); - } - +package org.simantics.db.common.request; + +import org.simantics.db.ReadGraph; +import org.simantics.db.Resource; +import org.simantics.db.exception.DatabaseException; + +public class PossibleNearestOwner extends ResourceRead2 { + + public PossibleNearestOwner(Resource resource, Resource type) { + super(resource, type); + } + + @Override + public Resource perform(ReadGraph graph) throws DatabaseException { + Resource owner = graph.syncRequest(new PossibleOwner(resource)); + if(owner == null) return null; + if(graph.isInstanceOf(owner, resource2)) return owner; + return graph.syncRequest(new PossibleNearestOwner(owner, resource2)); + } + } \ No newline at end of file