From e623710df8c9c090b01df901d3e807c6d26cfbf7 Mon Sep 17 00:00:00 2001 From: jsimomaa Date: Thu, 15 Jun 2017 09:32:53 +0300 Subject: [PATCH 1/1] TransferableGraphUtils.getObjects2 for fixing not-found handling refs #7306 Change-Id: I1d8dfefb51d579b1cb5ca9e15df82c0a8e347619 --- .../TransferableGraphUtils.java | 33 ++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/bundles/org.simantics.graph/src/org/simantics/graph/representation/TransferableGraphUtils.java b/bundles/org.simantics.graph/src/org/simantics/graph/representation/TransferableGraphUtils.java index 5b40113ae..b210d8dd7 100644 --- a/bundles/org.simantics.graph/src/org/simantics/graph/representation/TransferableGraphUtils.java +++ b/bundles/org.simantics.graph/src/org/simantics/graph/representation/TransferableGraphUtils.java @@ -146,22 +146,53 @@ public class TransferableGraphUtils { return result; } + /** + * This implementation is no longer advised to use because it returns 0 as + * NOT_FOUND which is in fact a valid ID for resource in graph + */ + @Deprecated public static int getPossibleObject(TransferableGraph1 tg, int subject, Identity predicate) { int result = 0; for(int i=0;i getNames(TransferableGraph1 tg, Collection ids) { Map result = new HashMap(); -- 2.43.2