use of eu.bcvsolutions.idm.acc.dto.filter.AccContractAccountFilter in project CzechIdMng by bcvsolutions.
the class IdentityContractDeleteProcessor method process.
@Override
public EventResult<IdmIdentityContractDto> process(EntityEvent<IdmIdentityContractDto> event) {
// delete relations on account (includes delete of account )
AccContractAccountFilter filter = new AccContractAccountFilter();
filter.setEntityId(event.getContent().getId());
entityAccountService.find(filter, null).forEach(entityAccount -> {
LOG.debug("Remove contract-account for account [{}]", entityAccount.getId());
entityAccountService.delete(entityAccount);
});
return new DefaultEventResult<>(event, this);
}
Aggregations