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.common.transientgraph;
14 import gnu.trove.list.array.TIntArrayList;
16 import org.simantics.db.VirtualGraphContext;
18 public class StatementBuilder {
20 TIntArrayList data = new TIntArrayList();
22 public StatementBuilder(int ... stms) {
26 public void add(int ... stms) {
30 public void commit(VirtualGraphContext context, int resource) {
31 context.updateStatements(resource, data.toArray());
34 public static void commit(VirtualGraphContext context, int resource, int ... stms) {
35 context.updateStatements(resource, stms);