X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.event%2Fsrc%2Forg%2Fsimantics%2Fevent%2Futil%2FEventUtils.java;h=c4b83aa994c3c3c9585b39f3a503fd28b9b95416;hb=bd5bc6e45f700e755b61bd112631796631330ecb;hp=bb85be21fe878143cb864547df0576043625efc3;hpb=7684baeb8bc7963700676af20db6f4a860581e46;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.event/src/org/simantics/event/util/EventUtils.java b/bundles/org.simantics.event/src/org/simantics/event/util/EventUtils.java index bb85be21f..c4b83aa99 100644 --- a/bundles/org.simantics.event/src/org/simantics/event/util/EventUtils.java +++ b/bundles/org.simantics.event/src/org/simantics/event/util/EventUtils.java @@ -1,10 +1,12 @@ package org.simantics.event.util; +import java.util.List; import java.util.UUID; import org.simantics.databoard.Bindings; import org.simantics.db.Resource; import org.simantics.db.WriteGraph; +import org.simantics.db.common.request.PossibleTypedParent; import org.simantics.db.exception.DatabaseException; import org.simantics.event.ontology.EventResource; import org.simantics.layer0.Layer0; @@ -25,5 +27,46 @@ public class EventUtils { graph.claimLiteral(log, EVENT.HasModificationCounter, 0, Bindings.INTEGER); return log; } - + + /** + * Bumps the modification counter value of the event log of the specified + * events using {@link #bumpModificationCounter(WriteGraph, Resource)}. + *
+ * The code assumes that all events are from the same log.
+ *
+ * @param graph
+ * @param forLogOfEvents
+ * @throws DatabaseException
+ */
+ public static void bumpModificationCounter(WriteGraph graph, List