1 /*******************************************************************************
2 * Copyright (c) 2007, 2010 Association for Decentralized Information Management
4 * All rights reserved. This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License v1.0
6 * which accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * VTT Technical Research Centre of Finland - initial API and implementation
11 *******************************************************************************/
12 package org.simantics.db.procore.cluster;
14 import org.simantics.db.exception.DatabaseException;
15 import org.simantics.db.impl.ClusterBase;
16 import org.simantics.db.impl.ClusterI;
17 import org.simantics.db.impl.ClusterSupport;
19 public class ClusterPrintDebugInfo
20 implements ClusterI.ObjectProcedure<Integer> {
21 private ClusterBase cluster;
22 private ClusterSupport support;
23 private ObjectTable ot;
25 public ClusterPrintDebugInfo(ClusterBase cluster, ResourceTable resourceTable
26 , PredicateTable predicateTable, ClusterSupport support,
27 ObjectTable ot) throws DatabaseException {
28 this.cluster = cluster;
30 throw new DatabaseException("Illegal argument.");
31 this.support = support;
36 public boolean execute(Integer i, int resourceRef) {
39 resourceKey = ClusterTraits.createResourceKey(cluster.getClusterKey(), resourceRef);
40 } catch (DatabaseException e) {
42 return false; // continue loop
44 CalculateStatements cs = new CalculateStatements(resourceRef, ot);
46 cluster.forPredicates(resourceKey, cs, cs, support);
47 } catch (Throwable t) {
50 return false; // continue loop
52 public int getSize() {