public String deleteContactDetail()

in service/src/main/java/org/apache/fineract/cn/office/internal/command/handler/EmployeeAggregate.java [181:196]


  public String deleteContactDetail(final DeleteContactDetailCommand deleteContactDetailCommand)
      throws ServiceException {

    final EmployeeEntity employeeEntity = this.employeeRepository.findByIdentifier(deleteContactDetailCommand.identifier());
    if (employeeEntity == null) {
      throw ServiceException.notFound("Employee {0} not found.", deleteContactDetailCommand.identifier());
    }

    if (this.deleteContactDetails(employeeEntity)) {
      employeeEntity.setLastModifiedBy(UserContextHolder.checkedGetUser());
      employeeEntity.setLastModifiedOn(Utils.utcNow());
      this.employeeRepository.save(employeeEntity);
    }

    return deleteContactDetailCommand.identifier();
  }