Class SeminarEventStructureHelper
java.lang.Object
ch.tocco.nice2.optional.seminar.impl.entitylistener.helpers.SeminarEventStructureHelper
-
Method Summary
Modifier and TypeMethodDescriptioneventForClearingDataLoader
(BiFunction<Entity, String, List<EntityRelationChangedEvent>> relationChangeLoader) used to figure out an "old" related Event from an Event_relationship or Seminar_event where some fields / relations need to be cleared.
-
Method Details
-
eventForClearingDataLoader
public static Function<Entity,Entity> eventForClearingDataLoader(BiFunction<Entity, String, List<EntityRelationChangedEvent>> relationChangeLoader) used to figure out an "old" related Event from an Event_relationship or Seminar_event where some fields / relations need to be cleared. either the source entity was deleted, so the currently related Event needs to be cleaned, or the relation to the Event was changed, so the previously related Event needs to cleaned- Parameters:
relationChangeLoader
- a function that returns relation changed events for an entity and a relation name- Returns:
- a function that returns the currently or previously related Event from an Event_relationship or Seminar_event depending on its state
-