\r
import org.simantics.db.Resource;\r
import org.simantics.db.ReadGraph;\r
+import org.simantics.db.request.Read;\r
import org.simantics.db.Session;\r
import org.simantics.db.exception.DatabaseException;\r
\r
return ret;\r
}\r
\r
+ public static SysdynResource getInstance(Session session) throws DatabaseException {\r
+ SysdynResource ret = session.getService(SysdynResource.class);\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
+ }\r
+ });\r
+ session.registerService(SysdynResource.class, ret);\r
+ }\r
+ return ret;\r
+ }\r
+ \r
}\r
\r