1 package org.simantics.district.network.techtype.requests;
3 import org.simantics.db.ReadGraph;
4 import org.simantics.db.Resource;
5 import org.simantics.db.common.procedure.adapter.TransientCacheListener;
6 import org.simantics.db.common.request.ResourceRead;
7 import org.simantics.db.exception.DatabaseException;
8 import org.simantics.district.network.ontology.DistrictNetworkResource;
10 public class TechTypeTableKeyName extends ResourceRead<String> {
12 public TechTypeTableKeyName(Resource table) {
17 public String perform(ReadGraph graph) throws DatabaseException {
18 DistrictNetworkResource DN = DistrictNetworkResource.getInstance(graph);
20 Resource type = graph.getPossibleObject(resource, DN.TechType_TechTypeTable_HasComponentType);
21 return type != null ? graph.syncRequest(new PossibleTechTypeKeyName(type), TransientCacheListener.instance()) : null;