]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/QuerySupport.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.db.impl / src / org / simantics / db / impl / query / QuerySupport.java
diff --git a/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/QuerySupport.java b/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/QuerySupport.java
new file mode 100644 (file)
index 0000000..10842cf
--- /dev/null
@@ -0,0 +1,67 @@
+/*******************************************************************************\r
+ * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
+ * in Industry THTH ry.\r
+ * All rights reserved. This program and the accompanying materials\r
+ * are made available under the terms of the Eclipse Public License v1.0\r
+ * which accompanies this distribution, and is available at\r
+ * http://www.eclipse.org/legal/epl-v10.html\r
+ *\r
+ * Contributors:\r
+ *     VTT Technical Research Centre of Finland - initial API and implementation\r
+ *******************************************************************************/\r
+package org.simantics.db.impl.query;\r
+\r
+import java.io.InputStream;\r
+\r
+import org.simantics.db.Resource;\r
+import org.simantics.db.Session;\r
+import org.simantics.db.VirtualGraph;\r
+import org.simantics.db.exception.ResourceNotFoundException;\r
+import org.simantics.db.impl.graph.ReadGraphImpl;\r
+\r
+public interface QuerySupport extends ResourceTranslator {\r
+\r
+       Session getSession();\r
+       \r
+       boolean isImmutable(int id);\r
+       long getClusterId(int id);\r
+       int getId(Resource resource);\r
+       Resource getResource(int id);\r
+       \r
+    boolean resume(ReadGraphImpl graph);\r
+       void dirtyPrimitives();\r
+       void aboutToRead();\r
+       \r
+       int getSingleInstance(int subject);\r
+       int getSingleSuperrelation(int subject);\r
+       int getFunctionalObject(int subject, int predicate);\r
+       boolean getObjects(ReadGraphImpl graph, int subject, int predicate, IntProcedure procedure);\r
+    \r
+       org.simantics.db.DirectStatements getStatements(ReadGraphImpl graph, final int subject, QueryProcessor processor, boolean ignoreVirtual);\r
+    \r
+    void getPredicates(ReadGraphImpl graph, int subject, IntProcedure procedure);\r
+    byte[] getValue(ReadGraphImpl graph, int resource);\r
+    InputStream getValueStream(ReadGraphImpl graph, int resource);\r
+    \r
+    void requestCluster(ReadGraphImpl graph, long clusterId, Runnable r);\r
+    \r
+    void ensureLoaded(final ReadGraphImpl graph, final int subject, final int predicate);\r
+    void ensureLoaded(final ReadGraphImpl graph, final int subject);\r
+    boolean isLoaded(int subject);\r
+    \r
+       int getBuiltin(String uri);\r
+\r
+       @Deprecated // Use SerialisationSupport instead\r
+       int getRandomAccessReference(String id) throws ResourceNotFoundException;\r
+\r
+    void checkTasks();\r
+    void ceased(int thread);\r
+    Object getLock();\r
+    \r
+    VirtualGraph getProvider(int subject, int predicate, int object);\r
+    VirtualGraph getProvider(int subject, int predicate);\r
+    VirtualGraph getValueProvider(int subject);\r
+    \r
+    void exit(Throwable t);\r
+    \r
+}\r