Class CascadingDeleteServiceImpl
java.lang.Object
ch.tocco.nice2.persist.entity.impl.cascadingdelete.CascadingDeleteServiceImpl
- All Implemented Interfaces:
PersistTask<Entity,
,Boolean> CascadingDeleteService
-
Nested Class Summary
Nested classes/interfaces inherited from interface ch.tocco.nice2.persist.entity.api.cascadingdelete.CascadingDeleteService
CascadingDeleteService.ExcludedEntities
-
Field Summary
Fields inherited from interface ch.tocco.nice2.persist.entity.api.cascadingdelete.CascadingDeleteService
CONTINUE_ON_CASCADE_DELETE_EXCEPTION_KEY, EXCLUDED_ENTITIES_KEY
-
Constructor Summary
ConstructorDescriptionCascadingDeleteServiceImpl
(CascadingDelete cascadingDelete, CommandExecutor executor, BusinessUnitManager businessUnitManager) CascadingDeleteServiceImpl
(CascadingDelete cascadingDelete, CommandExecutor executor, BusinessUnitManager businessUnitManager, Iterable<String> businessUnitIds) -
Method Summary
Modifier and TypeMethodDescriptionvoid
cascadingDelete
(Entity entity, boolean continueOnException) Deletes the entity and all related entities with cascade=yesvoid
cascadingDelete
(Entity entity, CascadingDeleteService.ExcludedEntities excludedEntities, boolean continueOnException) Deletes the entity and all related entities with cascade=yes except of the excluded entities.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.entity.api.cascadingdelete.CascadingDeleteService
cascadingDelete, cascadingDelete, run
Methods inherited from interface ch.tocco.nice2.persist.core.api.exec.PersistTask
andThenDo, compose, compose2, composeWhen, discardResult, expand, expand, getDescription, ifElse, orWhen, orWhenNot, passWhen, passWhenNot, skipErrors, unwrap
-
Constructor Details
-
CascadingDeleteServiceImpl
@Autowired public CascadingDeleteServiceImpl(CascadingDelete cascadingDelete, CommandExecutor executor, BusinessUnitManager businessUnitManager) -
CascadingDeleteServiceImpl
public CascadingDeleteServiceImpl(CascadingDelete cascadingDelete, CommandExecutor executor, BusinessUnitManager businessUnitManager, Iterable<String> businessUnitIds)
-
-
Method Details
-
cascadingDelete
Description copied from interface:CascadingDeleteService
Deletes the entity and all related entities with cascade=yes- Specified by:
cascadingDelete
in interfaceCascadingDeleteService
- Parameters:
entity
- the main entity to deletecontinueOnException
- whether to continue when one entity causes a CascadingDeleteException
-
cascadingDelete
public void cascadingDelete(Entity entity, CascadingDeleteService.ExcludedEntities excludedEntities, boolean continueOnException) Description copied from interface:CascadingDeleteService
Deletes the entity and all related entities with cascade=yes except of the excluded entities.- Specified by:
cascadingDelete
in interfaceCascadingDeleteService
- Parameters:
entity
- the main entity to deleteexcludedEntities
- the entities to exclude.continueOnException
- whether to continue when one entity causes a CascadingDeleteException
-