-package org.simantics.db.layer0.variable;\r
-\r
-import org.simantics.databoard.binding.Binding;\r
-import org.simantics.db.WriteGraph;\r
-import org.simantics.db.common.CommentMetadata;\r
-import org.simantics.db.common.request.WriteRequest;\r
-import org.simantics.db.exception.DatabaseException;\r
-import org.simantics.db.layer0.variable.Variable;\r
-\r
-public class VariableWriteWithComment extends WriteRequest {\r
-\r
- private Variable variable;\r
- private Object value;\r
- private Binding binding;\r
- private String comment;\r
-\r
- public VariableWriteWithComment(Variable variable, Object value, Binding binding, String comment) {\r
- this.variable = variable;\r
- this.value = value;\r
- this.binding = binding;\r
- this.comment = comment;\r
- }\r
-\r
- @Override\r
- public void perform(WriteGraph graph) throws DatabaseException {\r
- variable.setValue(graph, value, binding);\r
- if (comment != null) {\r
- CommentMetadata m = graph.getMetadata(CommentMetadata.class);\r
- graph.addMetadata(m.add(comment));\r
- }\r
- }\r
-\r
+package org.simantics.db.layer0.variable;
+
+import org.simantics.databoard.binding.Binding;
+import org.simantics.db.WriteGraph;
+import org.simantics.db.common.CommentMetadata;
+import org.simantics.db.common.request.WriteRequest;
+import org.simantics.db.exception.DatabaseException;
+import org.simantics.db.layer0.variable.Variable;
+
+public class VariableWriteWithComment extends WriteRequest {
+
+ private Variable variable;
+ private Object value;
+ private Binding binding;
+ private String comment;
+
+ public VariableWriteWithComment(Variable variable, Object value, Binding binding, String comment) {
+ this.variable = variable;
+ this.value = value;
+ this.binding = binding;
+ this.comment = comment;
+ }
+
+ @Override
+ public void perform(WriteGraph graph) throws DatabaseException {
+ variable.setValue(graph, value, binding);
+ if (comment != null) {
+ CommentMetadata m = graph.getMetadata(CommentMetadata.class);
+ graph.addMetadata(m.add(comment));
+ }
+ }
+
}
\ No newline at end of file