1 /*******************************************************************************
2 * Copyright (c) 2007 VTT Technical Research Centre of Finland and others.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
9 * VTT Technical Research Centre of Finland - initial API and implementation
10 *******************************************************************************/
11 package org.simantics.simulation.data;
13 import org.simantics.databoard.accessor.error.AccessorException;
14 import org.simantics.databoard.binding.Binding;
17 * A handle to a variable of a {@link Datasource}.
19 * @author Toni Kalajainen <toni.kalajainen@vtt.fi>
21 public interface VariableHandle {
24 * @return key (ID) of the variable
29 * @return binding for the variable
34 * @return current value associated with this handle
35 * @throws AccessorException if value cannot be retrieved
37 Object getValue() throws AccessorException;
40 * @return current value associated with this handle within the given Datasource
41 * @throws AccessorException if value cannot be retrieved
43 Object getValue(Datasource datasource) throws AccessorException;
46 * Frees any resource related to this handle.