Class DeleteSnippetWidgetSectionVisibilitiesListener
java.lang.Object
ch.tocco.nice2.persist.core.api.entity.events.InterruptibleEntityFacadeAdapter
ch.tocco.nice2.optional.cms.impl.entitylistener.DeleteSnippetWidgetSectionVisibilitiesListener
- All Implemented Interfaces:
EntityFacadeListener
,EventListener
public class DeleteSnippetWidgetSectionVisibilitiesListener
extends InterruptibleEntityFacadeAdapter
When a Page_content_to_section is deleted (every time a section or snippet is deleted),
all Section_visibility entities which are pointing to a widget which the deleted
section contained should be deleted.
If the Page_content_to_section entity pointed to a Section entity, this is done
automatically by cascading delete: Page_content_to_section → Section → Widget → Section_visibility.
If the Page_content_to_section entity pointed to a Snippet, the Snippet (and thus its Section and the
Widget entities) won't be deleted.
Therefore we need to delete the Section_visibility entities manually.
-
Constructor Summary
ConstructorDescriptionDeleteSnippetWidgetSectionVisibilitiesListener
(CascadingDeleteService cascadingDeleteService, QueryBuilderFactory queryBuilderFactory, Context context) -
Method Summary
Methods inherited from class ch.tocco.nice2.persist.core.api.entity.events.InterruptibleEntityFacadeAdapter
entityChanging, entityChangingInterruptible, entityCreating, entityCreatingInterruptible, entityDeleting, entityReceivedValues, entityReceivedValuesInterruptible, entityRelationChanging, entityRelationChangingInterruptible
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ch.tocco.nice2.persist.core.api.entity.events.EntityFacadeListener
handleSessionOnlyEntity
-
Constructor Details
-
DeleteSnippetWidgetSectionVisibilitiesListener
public DeleteSnippetWidgetSectionVisibilitiesListener(CascadingDeleteService cascadingDeleteService, QueryBuilderFactory queryBuilderFactory, Context context)
-
-
Method Details
-
entityDeletingInterruptible
- Overrides:
entityDeletingInterruptible
in classInterruptibleEntityFacadeAdapter
-