X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.charts%2Fsrc%2Forg%2Fsimantics%2Fcharts%2Fquery%2FSetProperty.java;fp=bundles%2Forg.simantics.charts%2Fsrc%2Forg%2Fsimantics%2Fcharts%2Fquery%2FSetProperty.java;h=0d9b84376d9799b5e26133a37884df2950ad79de;hb=969bd23cab98a79ca9101af33334000879fb60c5;hp=0000000000000000000000000000000000000000;hpb=866dba5cd5a3929bbeae85991796acb212338a08;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.charts/src/org/simantics/charts/query/SetProperty.java b/bundles/org.simantics.charts/src/org/simantics/charts/query/SetProperty.java new file mode 100644 index 000000000..0d9b84376 --- /dev/null +++ b/bundles/org.simantics.charts/src/org/simantics/charts/query/SetProperty.java @@ -0,0 +1,31 @@ +package org.simantics.charts.query; + +import org.simantics.databoard.binding.Binding; +import org.simantics.db.Resource; +import org.simantics.db.WriteGraph; +import org.simantics.db.common.request.WriteRequest; +import org.simantics.db.exception.DatabaseException; + +/** + * @author Tuukka Lehtonen + */ +public class SetProperty extends WriteRequest { + + private Resource entity; + private Resource property; + private Object value; + private Binding binding; + + public SetProperty(Resource entity, Resource property, Object value, Binding binding) { + this.entity = entity; + this.property = property; + this.value = value; + this.binding = binding; + } + + @Override + public void perform(WriteGraph graph) throws DatabaseException { + graph.claimLiteral(entity, property, value, binding); + } + +}