Revision a4ef0a5a
Added by Andreas Kohlbecker over 6 years ago
src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/RegistrationWorkingsetPresenter.java | ||
---|---|---|
320 | 320 |
TypeDesignationWorkingsetEditorIdSet identifierSet; |
321 | 321 |
Integer typifiedNameId; |
322 | 322 |
if(newRegistrationDTOWithExistingName != null){ |
323 |
typifiedNameId = newRegistrationDTOWithExistingName.getTypifiedName().getId(); |
|
323 |
typifiedNameId = newRegistrationDTOWithExistingName.getTypifiedNameRef().getId();
|
|
324 | 324 |
} else { |
325 | 325 |
RegistrationDTO registrationDTO = workingset.getRegistrationDTO(event.getRegistrationId()).get(); |
326 |
EntityReference typifiedNameRef = registrationDTO.getTypifiedName(); |
|
326 |
EntityReference typifiedNameRef = registrationDTO.getTypifiedNameRef();
|
|
327 | 327 |
if(typifiedNameRef != null){ |
328 | 328 |
// case for registrations without name, in which case the typifiedName is only defined via the typedesignations |
329 | 329 |
typifiedNameId = typifiedNameRef.getId(); |
330 | 330 |
} else { |
331 | 331 |
// case of registrations with a name in the nomenclatural act. |
332 |
typifiedNameId = registrationDTO.getName().getId(); |
|
332 |
typifiedNameId = registrationDTO.getNameRef().getId();
|
|
333 | 333 |
} |
334 | 334 |
} |
335 | 335 |
identifierSet = new TypeDesignationWorkingsetEditorIdSet( |
... | ... | |
414 | 414 |
} else |
415 | 415 |
if(TaxonName.class.isAssignableFrom(event.getEntityType())){ |
416 | 416 |
if(workingset.getRegistrationDTOs().stream().anyMatch(reg -> |
417 |
reg.getTypifiedName() != null |
|
418 |
&& reg.getTypifiedName().getId() == event.getEntityId())){ |
|
417 |
reg.getTypifiedNameRef() != null
|
|
418 |
&& reg.getTypifiedNameRef().getId() == event.getEntityId())){
|
|
419 | 419 |
refreshView(true); |
420 | 420 |
} |
421 | 421 |
} else |
Also available in: Unified diff
SpecimenTypeDesignationWorkingSetDTO with nore knowledge on typifiedName and citation simplifies presenters