From cde15da71bdb1ccba37aa890fd9fbc2ba99bac58 Mon Sep 17 00:00:00 2001 From: lehtonen Date: Thu, 11 Oct 2012 20:09:06 +0000 Subject: [PATCH] Fixed interop WriteGraph implementations after changes to ReadGraph. refs #3765 git-svn-id: https://www.simantics.org/svn/simantics/interoperability/trunk@25998 ac1ea38d-2e2b-0410-8846-a27921b304fc --- .../interop/mapping/SplittingWriteGraph.java | 56 +++++++++++++++++++ .../interop/mapping/WriteGraphProxy.java | 20 +++++++ 2 files changed, 76 insertions(+) diff --git a/org.simantics.interop.mapping/src/org/simantics/interop/mapping/SplittingWriteGraph.java b/org.simantics.interop.mapping/src/org/simantics/interop/mapping/SplittingWriteGraph.java index c3b0298..fb2cbb5 100644 --- a/org.simantics.interop.mapping/src/org/simantics/interop/mapping/SplittingWriteGraph.java +++ b/org.simantics.interop.mapping/src/org/simantics/interop/mapping/SplittingWriteGraph.java @@ -6240,4 +6240,60 @@ public class SplittingWriteGraph implements WriteGraph { } } + @Override + public T getValue2(final Resource subject, final Object context) throws DatabaseException { + try { + return (T) session.syncRequest(new Read() { + @Override + public T perform(ReadGraph graph) throws DatabaseException { + return graph.getValue2(subject, context); + } + }); + } catch (DatabaseException e) { + throw new ServiceException(e); + } + } + + @Override + public T getPossibleValue2(final Resource subject, final Object context) throws DatabaseException { + try { + return (T) session.syncRequest(new Read() { + @Override + public T perform(ReadGraph graph) throws DatabaseException { + return graph.getPossibleValue2(subject, context); + } + }); + } catch (DatabaseException e) { + throw new ServiceException(e); + } + } + + @Override + public T getValue2(final Resource subject, final Object context, final Binding binding) throws DatabaseException { + try { + return (T) session.syncRequest(new Read() { + @Override + public T perform(ReadGraph graph) throws DatabaseException { + return graph.getValue2(subject, context, binding); + } + }); + } catch (DatabaseException e) { + throw new ServiceException(e); + } + } + + @Override + public T getPossibleValue2(final Resource subject, final Object context, final Binding binding) throws DatabaseException { + try { + return (T) session.syncRequest(new Read() { + @Override + public T perform(ReadGraph graph) throws DatabaseException { + return graph.getPossibleValue2(subject, context, binding); + } + }); + } catch (DatabaseException e) { + throw new ServiceException(e); + } + } + } diff --git a/org.simantics.interop.mapping/src/org/simantics/interop/mapping/WriteGraphProxy.java b/org.simantics.interop.mapping/src/org/simantics/interop/mapping/WriteGraphProxy.java index 1fff2a2..5534653 100644 --- a/org.simantics.interop.mapping/src/org/simantics/interop/mapping/WriteGraphProxy.java +++ b/org.simantics.interop.mapping/src/org/simantics/interop/mapping/WriteGraphProxy.java @@ -2762,4 +2762,24 @@ public class WriteGraphProxy implements WriteGraph { return graph.isImmutable(resource); } + @Override + public T getValue2(Resource subject, Object context) throws DatabaseException { + return graph.getValue2(subject, context); + } + + @Override + public T getPossibleValue2(Resource subject, Object context) throws DatabaseException { + return graph.getPossibleValue2(subject, context); + } + + @Override + public T getValue2(Resource subject, Object context, Binding binding) throws DatabaseException { + return graph.getValue2(subject, context, binding); + } + + @Override + public T getPossibleValue2(Resource subject, Object context, Binding binding) throws DatabaseException { + return graph.getPossibleValue2(subject, context, binding); + } + } -- 2.45.2