--- /dev/null
+package org.simantics.district.network.techtype.requests;
+
+import java.util.Map;
+
+import org.simantics.db.ReadGraph;
+import org.simantics.db.Resource;
+import org.simantics.db.common.procedure.adapter.TransientCacheListener;
+import org.simantics.db.common.request.BinaryRead;
+import org.simantics.db.exception.DatabaseException;
+
+/**
+ * Query for a possible tech type table item in a table with a given item key.
+ *
+ * Results in null, if no such item was found.
+ */
+public class PossibleTechTypeItem extends BinaryRead<Resource, String, Map<String, String>> {
+
+ public PossibleTechTypeItem(Resource table, String itemCode) {
+ super(table, itemCode);
+ }
+
+ @Override
+ public Map<String, String> perform(ReadGraph graph) throws DatabaseException {
+ Resource table = this.parameter;
+ String itemCode = this.parameter2;
+
+ Map<String, Map<String, String>> map = graph.syncRequest(new TechTypeTableData(table), TransientCacheListener.instance());
+ return map.get(itemCode);
+ }
+}
\ No newline at end of file