-/*******************************************************************************\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.service;\r
-\r
-import org.simantics.db.Resource;\r
-import org.simantics.db.exception.DatabaseException;\r
-import org.simantics.db.exception.ResourceNotFoundException;\r
-\r
-\r
-/**\r
- * @author Antti Villberg\r
- */\r
-public interface ClusteringSupport {\r
-\r
- /**\r
- * TODO: specify thread-safety\r
- * \r
- * @return id of new cluster\r
- */\r
- long createCluster();\r
-\r
- long getCluster(Resource r);\r
- \r
- int getNumberOfResources(long clusterId) throws DatabaseException;\r
- \r
- Resource getResourceByKey(int resourceKey) throws ResourceNotFoundException;\r
- \r
- Resource getResourceByIndexAndCluster(int resourceIndex, long clusterId)\r
- throws DatabaseException, ResourceNotFoundException;\r
- interface Id {\r
- long[] toLong();\r
- }\r
- \r
- boolean isClusterSet(Resource r) throws DatabaseException;\r
- Resource getClusterSetOfCluster(Resource r) throws DatabaseException;\r
- Resource getClusterSetOfCluster(long cluster) throws DatabaseException;\r
- \r
- //Id getModifiedId(long clusterId) throws DatabaseException;\r
-}\r
+/*******************************************************************************
+ * 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;
+}