import org.simantics.db.request.Read;\r
import org.simantics.db.Session;\r
import org.simantics.db.exception.DatabaseException;\r
+import org.simantics.db.service.QueryControl;\r
\r
public class JFreeChartResource {\r
\r
Session session = graph.getSession();\r
JFreeChartResource ret = session.peekService(JFreeChartResource.class);\r
if(ret == null) {\r
- ret = new JFreeChartResource(graph);\r
+ QueryControl qc = graph.getService(QueryControl.class);\r
+ ret = new JFreeChartResource(qc.getIndependentGraph(graph));\r
session.registerService(JFreeChartResource.class, ret);\r
}\r
return ret;\r
if(ret == null) {\r
ret = session.syncRequest(new Read<JFreeChartResource>() {\r
public JFreeChartResource perform(ReadGraph graph) throws DatabaseException {\r
- return new JFreeChartResource(graph);\r
+ QueryControl qc = graph.getService(QueryControl.class);\r
+ return new JFreeChartResource(qc.getIndependentGraph(graph));\r
}\r
});\r
session.registerService(JFreeChartResource.class, ret);\r
import org.simantics.db.request.Read;\r
import org.simantics.db.Session;\r
import org.simantics.db.exception.DatabaseException;\r
+import org.simantics.db.service.QueryControl;\r
\r
public class SysdynResource {\r
\r
Session session = graph.getSession();\r
SysdynResource ret = session.peekService(SysdynResource.class);\r
if(ret == null) {\r
- ret = new SysdynResource(graph);\r
+ QueryControl qc = graph.getService(QueryControl.class);\r
+ ret = new SysdynResource(qc.getIndependentGraph(graph));\r
session.registerService(SysdynResource.class, ret);\r
}\r
return ret;\r
if(ret == null) {\r
ret = session.syncRequest(new Read<SysdynResource>() {\r
public SysdynResource perform(ReadGraph graph) throws DatabaseException {\r
- return new SysdynResource(graph);\r
+ QueryControl qc = graph.getService(QueryControl.class);\r
+ return new SysdynResource(qc.getIndependentGraph(graph));\r
}\r
});\r
session.registerService(SysdynResource.class, ret);\r