]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.db.common/src/org/simantics/db/common/primitiverequest/IsInstanceOf.java
Multiple reader thread support for db client
[simantics/platform.git] / bundles / org.simantics.db.common / src / org / simantics / db / common / primitiverequest / IsInstanceOf.java
index 63a5ddcb3293f2fa34f72e118d123dce341e4cc0..84e6fdc34ea10402c68b27f4ac06f31f8c61c1b0 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
 /*******************************************************************************
- * Copyright (c) 2007, 2010 Association for Decentralized Information Management
+ * Copyright (c) 2007, 2018 Association for Decentralized Information Management
  * in Industry THTH ry.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * in Industry THTH ry.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  *******************************************************************************/
 package org.simantics.db.common.primitiverequest;
 
  *******************************************************************************/
 package org.simantics.db.common.primitiverequest;
 
-import org.simantics.db.AsyncReadGraph;
+import org.simantics.db.ReadGraph;
 import org.simantics.db.Resource;
 import org.simantics.db.Resource;
-import org.simantics.db.common.request.ResourceAsyncRead2;
-import org.simantics.db.procedure.AsyncProcedure;
+import org.simantics.db.common.request.ResourceRead2;
+import org.simantics.db.exception.DatabaseException;
 
 
-final public class IsInstanceOf extends ResourceAsyncRead2<Boolean> {
+public final class IsInstanceOf extends ResourceRead2<Boolean> {
 
     public IsInstanceOf(Resource resource, Resource resource2) {
         super(resource, resource2);
     }
 
     @Override
 
     public IsInstanceOf(Resource resource, Resource resource2) {
         super(resource, resource2);
     }
 
     @Override
-    public void perform(AsyncReadGraph graph, AsyncProcedure<Boolean> procedure) {
-        graph.forIsInstanceOf(resource, resource2, procedure);
+    public Boolean perform(ReadGraph graph) throws DatabaseException {
+        return graph.isInstanceOf(resource, resource2);
     }
 
 }
     }
 
 }