try {
this.fromApiJsonDeserializer.validateForUpdate(command.json());
final Staff staffForUpdate = this.staffRepository.findOne(staffId);
if (staffForUpdate == null) { throw new StaffNotFoundException(staffId); }
final Map<String, Object> changesOnly = staffForUpdate.update(command);
if (changesOnly.containsKey("officeId")) {
final Long officeId = (Long) changesOnly.get("officeId");