]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.document.server/src/org/simantics/document/server/PrimitiveValueVariable.java
Removed graph compilation nature from org.simantics.jdbc
[simantics/platform.git] / bundles / org.simantics.document.server / src / org / simantics / document / server / PrimitiveValueVariable.java
1 package org.simantics.document.server;
2
3 import org.simantics.databoard.binding.Binding;
4 import org.simantics.db.ReadGraph;
5 import org.simantics.db.exception.DatabaseException;
6 import org.simantics.db.layer0.variable.ConstantPropertyVariable;
7 import org.simantics.db.layer0.variable.Variable;
8
9 public class PrimitiveValueVariable extends ConstantPropertyVariable {
10
11         final private Variable property;
12
13         public PrimitiveValueVariable(Variable parent, String name, Variable property) {
14                 super(parent, name, null, null);
15                 this.property = property;
16         }
17
18         @Override
19         public <T> T getValue(ReadGraph graph) throws DatabaseException {
20                 return property.getValue(graph);
21         }
22
23         @Override
24         public <T> T getValue(ReadGraph graph, Binding binding) throws DatabaseException {
25                 return property.getValue(graph, binding);
26         }
27
28 }