]> gerrit.simantics Code Review - simantics/interop.git/commitdiff
Fixed interop WriteGraph implementations after changes to ReadGraph.
authorlehtonen <lehtonen@ac1ea38d-2e2b-0410-8846-a27921b304fc>
Thu, 11 Oct 2012 20:09:06 +0000 (20:09 +0000)
committerMarko Luukkainen <marko.luukkainen@vtt.fi>
Thu, 2 Feb 2017 09:22:21 +0000 (11:22 +0200)
refs #3765

git-svn-id: https://www.simantics.org/svn/simantics/interoperability/trunk@25998 ac1ea38d-2e2b-0410-8846-a27921b304fc

org.simantics.interop.mapping/src/org/simantics/interop/mapping/SplittingWriteGraph.java
org.simantics.interop.mapping/src/org/simantics/interop/mapping/WriteGraphProxy.java

index c3b02988b5809da26fb5c2840d0f0a14371bcf5f..fb2cbb56ff3e7bb1dae6274e0c4b97288e0a49e8 100644 (file)
@@ -6240,4 +6240,60 @@ public class SplittingWriteGraph implements WriteGraph {
            }\r
        }\r
 \r
+    @Override\r
+    public <T> T getValue2(final Resource subject, final Object context) throws DatabaseException {\r
+        try {\r
+            return (T) session.syncRequest(new Read<T>() {\r
+                @Override\r
+                public T perform(ReadGraph graph) throws DatabaseException {\r
+                    return graph.getValue2(subject, context);\r
+                }\r
+            });\r
+        } catch (DatabaseException e) {\r
+            throw new ServiceException(e);\r
+        }\r
+    }\r
+\r
+    @Override\r
+    public <T> T getPossibleValue2(final Resource subject, final Object context) throws DatabaseException {\r
+        try {\r
+            return (T) session.syncRequest(new Read<T>() {\r
+                @Override\r
+                public T perform(ReadGraph graph) throws DatabaseException {\r
+                    return graph.getPossibleValue2(subject, context);\r
+                }\r
+            });\r
+        } catch (DatabaseException e) {\r
+            throw new ServiceException(e);\r
+        }\r
+    }\r
+\r
+    @Override\r
+    public <T> T getValue2(final Resource subject, final Object context, final Binding binding) throws DatabaseException {\r
+        try {\r
+            return (T) session.syncRequest(new Read<T>() {\r
+                @Override\r
+                public T perform(ReadGraph graph) throws DatabaseException {\r
+                    return graph.getValue2(subject, context, binding);\r
+                }\r
+            });\r
+        } catch (DatabaseException e) {\r
+            throw new ServiceException(e);\r
+        }\r
+    }\r
+\r
+    @Override\r
+    public <T> T getPossibleValue2(final Resource subject, final Object context, final Binding binding) throws DatabaseException {\r
+        try {\r
+            return (T) session.syncRequest(new Read<T>() {\r
+                @Override\r
+                public T perform(ReadGraph graph) throws DatabaseException {\r
+                    return graph.getPossibleValue2(subject, context, binding);\r
+                }\r
+            });\r
+        } catch (DatabaseException e) {\r
+            throw new ServiceException(e);\r
+        }\r
+    }\r
+\r
 }\r
index 1fff2a287f03a41f83172e99644a4991f7b51b70..55346537774f6da7ee8926e68f0e890ec2d418f3 100644 (file)
@@ -2762,4 +2762,24 @@ public class WriteGraphProxy implements WriteGraph {
                return graph.isImmutable(resource);\r
        }\r
 \r
+    @Override\r
+    public <T> T getValue2(Resource subject, Object context) throws DatabaseException {\r
+        return graph.getValue2(subject, context);\r
+    }\r
+\r
+    @Override\r
+    public <T> T getPossibleValue2(Resource subject, Object context) throws DatabaseException {\r
+        return graph.getPossibleValue2(subject, context);\r
+    }\r
+\r
+    @Override\r
+    public <T> T getValue2(Resource subject, Object context, Binding binding) throws DatabaseException {\r
+        return graph.getValue2(subject, context, binding);\r
+    }\r
+\r
+    @Override\r
+    public <T> T getPossibleValue2(Resource subject, Object context, Binding binding) throws DatabaseException {\r
+        return graph.getPossibleValue2(subject, context, binding);\r
+    }\r
+\r
 }\r