]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.charts/src/org/simantics/charts/query/SetProperty.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.charts / src / org / simantics / charts / query / SetProperty.java
1 package org.simantics.charts.query;
2
3 import org.simantics.databoard.binding.Binding;
4 import org.simantics.db.Resource;
5 import org.simantics.db.WriteGraph;
6 import org.simantics.db.common.request.WriteRequest;
7 import org.simantics.db.exception.DatabaseException;
8
9 /**
10  * @author Tuukka Lehtonen
11  */
12 public class SetProperty extends WriteRequest {
13
14     private Resource entity;
15     private Resource property;
16     private Object value;
17     private Binding binding;
18
19     public SetProperty(Resource entity, Resource property, Object value, Binding binding) {
20         this.entity = entity;
21         this.property = property;
22         this.value = value;
23         this.binding = binding;
24     }
25
26     @Override
27     public void perform(WriteGraph graph) throws DatabaseException {
28         graph.claimLiteral(entity, property, value, binding);
29     }
30
31 }