X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.db.procore%2Fsrc%2Ffi%2Fvtt%2Fsimantics%2Fprocore%2Finternal%2FXSupportImpl.java;h=7a9be048055fdcff23e9831a2882917d2d5ede6d;hb=HEAD;hp=4ac08fc0b8a25ff02f1596f402e8c669d1634726;hpb=c26409b1caf2f1e560d37c5befd11b442399c3fe;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/XSupportImpl.java b/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/XSupportImpl.java index 4ac08fc0b..7a9be0480 100644 --- a/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/XSupportImpl.java +++ b/bundles/org.simantics.db.procore/src/fi/vtt/simantics/procore/internal/XSupportImpl.java @@ -1,5 +1,7 @@ package fi.vtt.simantics.procore.internal; +import java.io.IOException; + import org.simantics.db.Database; import org.simantics.db.Resource; import org.simantics.db.Session; @@ -169,4 +171,20 @@ public class XSupportImpl implements XSupport { public boolean rolledback() { return session.graphSession.rolledback(); } + + @Override + public boolean isClusterLoaded(ClusterUID clusterUID) throws DatabaseException { + ClusterImpl clusterImpl = session.clusterTable.getClusterByClusterUIDOrMakeProxy(clusterUID); + return clusterImpl.isLoaded(); + } + + @Override + public void saveQueries() throws DatabaseException { + try { + session.queryProvider2.save(); + } catch (IOException e) { + throw new DatabaseException(e); + } + } + }