]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.structural2/src/org/simantics/structural2/queries/ConnectionJoinComponents.java
Fix GetComponentLocation to work with procedural UC instances
[simantics/platform.git] / bundles / org.simantics.structural2 / src / org / simantics / structural2 / queries / ConnectionJoinComponents.java
1 package org.simantics.structural2.queries;
2
3 import java.util.Collection;
4
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
10 public class ConnectionJoinComponents extends ResourceRead<Collection<Resource>> {
11
12         public ConnectionJoinComponents(Resource connectionJoin) {
13                 super(connectionJoin);
14         }
15         
16         @Override
17         public Collection<Resource> perform(ReadGraph graph) throws DatabaseException {
18         ConnectionSet cs = new ConnectionSet(graph);
19         cs.addJoin(graph, resource);
20         return cs.getConnections();
21         }
22         
23 }