X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.db%2Fsrc%2Forg%2Fsimantics%2Fdb%2Fservice%2FClusteringSupport.java;h=fc88dcc9a5f09442bb40a4a7986a13cba3156e1d;hb=c26409b1caf2f1e560d37c5befd11b442399c3fe;hp=1a866f26a1ba706b89ed20ff2c3091175219605c;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.db/src/org/simantics/db/service/ClusteringSupport.java b/bundles/org.simantics.db/src/org/simantics/db/service/ClusteringSupport.java index 1a866f26a..fc88dcc9a 100644 --- a/bundles/org.simantics.db/src/org/simantics/db/service/ClusteringSupport.java +++ b/bundles/org.simantics.db/src/org/simantics/db/service/ClusteringSupport.java @@ -1,48 +1,48 @@ -/******************************************************************************* - * Copyright (c) 2007, 2010 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 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * VTT Technical Research Centre of Finland - initial API and implementation - *******************************************************************************/ -package org.simantics.db.service; - -import org.simantics.db.Resource; -import org.simantics.db.exception.DatabaseException; -import org.simantics.db.exception.ResourceNotFoundException; - - -/** - * @author Antti Villberg - */ -public interface ClusteringSupport { - - /** - * TODO: specify thread-safety - * - * @return id of new cluster - */ - long createCluster(); - - long getCluster(Resource r); - - int getNumberOfResources(long clusterId) throws DatabaseException; - - Resource getResourceByKey(int resourceKey) throws ResourceNotFoundException; - - Resource getResourceByIndexAndCluster(int resourceIndex, long clusterId) - throws DatabaseException, ResourceNotFoundException; - interface Id { - long[] toLong(); - } - - boolean isClusterSet(Resource r) throws DatabaseException; - Resource getClusterSetOfCluster(Resource r) throws DatabaseException; - Resource getClusterSetOfCluster(long cluster) throws DatabaseException; - - //Id getModifiedId(long clusterId) throws DatabaseException; -} +/******************************************************************************* + * Copyright (c) 2007, 2010 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 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * VTT Technical Research Centre of Finland - initial API and implementation + *******************************************************************************/ +package org.simantics.db.service; + +import org.simantics.db.Resource; +import org.simantics.db.exception.DatabaseException; +import org.simantics.db.exception.ResourceNotFoundException; + + +/** + * @author Antti Villberg + */ +public interface ClusteringSupport { + + /** + * TODO: specify thread-safety + * + * @return id of new cluster + */ + long createCluster(); + + long getCluster(Resource r); + + int getNumberOfResources(long clusterId) throws DatabaseException; + + Resource getResourceByKey(int resourceKey) throws ResourceNotFoundException; + + Resource getResourceByIndexAndCluster(int resourceIndex, long clusterId) + throws DatabaseException, ResourceNotFoundException; + interface Id { + long[] toLong(); + } + + boolean isClusterSet(Resource r) throws DatabaseException; + Resource getClusterSetOfCluster(Resource r) throws DatabaseException; + Resource getClusterSetOfCluster(long cluster) throws DatabaseException; + + //Id getModifiedId(long clusterId) throws DatabaseException; +}