X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.graph.db%2Fsrc%2Forg%2Fsimantics%2Fgraph%2Fdb%2FTransferableGraphs.java;h=cd9111ec10b89b55db21110cf9d0032b44d1ac8b;hb=aaa119360108a77eb4fcf6f2ade0591cbfaf0415;hp=bdfd3de6e2ae326ad739468ac913f1f58fcbe274;hpb=e6575b75b71f3634687bf314644dde78115f6e88;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.graph.db/src/org/simantics/graph/db/TransferableGraphs.java b/bundles/org.simantics.graph.db/src/org/simantics/graph/db/TransferableGraphs.java index bdfd3de6e..cd9111ec1 100644 --- a/bundles/org.simantics.graph.db/src/org/simantics/graph/db/TransferableGraphs.java +++ b/bundles/org.simantics.graph.db/src/org/simantics/graph/db/TransferableGraphs.java @@ -21,6 +21,7 @@ import java.util.Collection; import java.util.HashSet; import java.util.TreeMap; import java.util.UUID; +import java.util.function.BiFunction; import org.simantics.databoard.Accessors; import org.simantics.databoard.Bindings; @@ -61,7 +62,6 @@ import org.simantics.graph.representation.External; import org.simantics.graph.representation.Identity; import org.simantics.graph.representation.TransferableGraph1; import org.simantics.graph.representation.Value; -import org.simantics.utils.datastructures.BinaryFunction; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -154,7 +154,7 @@ public class TransferableGraphs { session.getService(SerialisationSupport.class)); } - public static void importGraph1(Session session, final TransferableGraph1 tg, IImportAdvisor advisor, final BinaryFunction callback) throws DatabaseException, TransferableGraphException { + public static void importGraph1(Session session, final TransferableGraph1 tg, IImportAdvisor advisor, final BiFunction callback) throws DatabaseException, TransferableGraphException { final TransferableGraphImportProcess process = new TransferableGraphImportProcess(tg, advisor == null ? new ImportAdvisor() : advisor); session.syncRequest(new ReadRequest() { @@ -168,7 +168,7 @@ public class TransferableGraphs { public void perform(WriteOnlyGraph graph) throws DatabaseException { process.write(graph); if(callback != null) - callback.call(graph, process); + callback.apply(graph, process); } }); } @@ -235,7 +235,7 @@ public class TransferableGraphs { }); } - public static void importGraph1WithChanges(Session session, final TransferableGraph1 tg, IImportAdvisor advisor, final BinaryFunction callback) throws DatabaseException, TransferableGraphException { + public static void importGraph1WithChanges(Session session, final TransferableGraph1 tg, IImportAdvisor advisor, final BiFunction callback) throws DatabaseException, TransferableGraphException { final TransferableGraphImportProcess process = new TransferableGraphImportProcess(tg, advisor == null ? new ImportAdvisor() : advisor); session.syncRequest(new ReadRequest() { @@ -252,7 +252,7 @@ public class TransferableGraphs { comments.add("Imported transferable graph with " + tg.resourceCount + " resources"); graph.addMetadata(comments); if(callback != null) - callback.call(graph, process); + callback.apply(graph, process); } }); }