Long presentStaffId = null;
if (presentStaff == null) { throw new ClientHasNoStaffException(clientId); }
presentStaffId = presentStaff.getId();
final String staffIdParamName = ClientApiConstants.staffIdParamName;
if (!command.isChangeInLongParameterNamed(staffIdParamName, presentStaffId)) {
clientForUpdate.unassignStaff();
}
this.clientRepository.saveAndFlush(clientForUpdate);
actualChanges.put(staffIdParamName, presentStaffId);