]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.db.common/src/org/simantics/db/common/request/PossibleOwner.java
New implementation NearestOwnerFinder of CommonDBUtils.getNearestOwner
[simantics/platform.git] / bundles / org.simantics.db.common / src / org / simantics / db / common / request / PossibleOwner.java
1 package org.simantics.db.common.request;
2
3 import org.simantics.db.ReadGraph;
4 import org.simantics.db.Resource;
5 import org.simantics.db.common.utils.NearestOwnerFinder;
6 import org.simantics.db.exception.DatabaseException;
7
8 public class PossibleOwner extends ResourceRead<Resource> {
9
10     public PossibleOwner(Resource resource) {
11         super(resource);
12     }
13
14     @Override
15     public Resource perform(ReadGraph graph) throws DatabaseException {
16         return NearestOwnerFinder.getNearestOwner(graph, resource);
17     }
18     
19 }