]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
ListIndexRoots request 93/493/1
authorAntti Villberg <antti.villberg@semantum.fi>
Sun, 7 May 2017 06:49:56 +0000 (09:49 +0300)
committerAntti Villberg <antti.villberg@semantum.fi>
Sun, 7 May 2017 06:49:56 +0000 (09:49 +0300)
refs #7197

Change-Id: Ideac8aaeb23154aa94d465b838903f4fa373a458

bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/request/ListIndexRoots.java [new file with mode: 0644]

diff --git a/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/request/ListIndexRoots.java b/bundles/org.simantics.db.layer0/src/org/simantics/db/layer0/request/ListIndexRoots.java
new file mode 100644 (file)
index 0000000..235de05
--- /dev/null
@@ -0,0 +1,26 @@
+package org.simantics.db.layer0.request;
+
+import java.util.Collection;
+
+import org.simantics.db.ReadGraph;
+import org.simantics.db.Resource;
+import org.simantics.db.common.request.SingletonRead;
+import org.simantics.db.exception.DatabaseException;
+import org.simantics.db.layer0.util.Layer0Utils;
+
+/**
+ * Returns a set of index roots.
+ * 
+ * @author Antti Villberg
+ */
+public class ListIndexRoots extends SingletonRead<Collection<Resource>> {
+
+    public ListIndexRoots() {
+    }
+
+    @Override
+    public Collection<Resource> perform(ReadGraph graph) throws DatabaseException {
+       return Layer0Utils.listIndexRoots(graph);
+    }
+
+}