Revision 134e317a
Added by Andreas Kohlbecker about 5 years ago
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/RegistrationServiceImpl.java | ||
---|---|---|
395 | 395 |
registration.getTypeDesignations().add(nameTypeDesignation); |
396 | 396 |
} |
397 | 397 |
|
398 |
@Override |
|
399 |
@Transactional(readOnly=false) |
|
400 |
public void addTypeDesignation(Registration registration, UUID typeDesignationUuid){ |
|
401 |
|
|
402 |
if(registration == null){ |
|
403 |
registration = newRegistration(); |
|
404 |
registration = assureIsPersisted(registration); |
|
405 |
} else { |
|
406 |
if(registration.isPersited()){ |
|
407 |
// make sure the the typeDesignations are loaded with the registration so that typified names can not be twice in detached sessions |
|
408 |
// otherwise multiple representation problems might occur |
|
409 |
registration.getTypeDesignations(); |
|
410 |
} |
|
411 |
} |
|
412 |
TypeDesignationBase<?> nameTypeDesignation = nameService.loadTypeDesignation(typeDesignationUuid, Arrays.asList("")); |
|
413 |
registration.getTypeDesignations().add(nameTypeDesignation); |
|
414 |
} |
|
415 |
|
|
398 | 416 |
/** |
399 | 417 |
* Sets the registration identifier and submitter in case the registration is not yet persisted. |
400 | 418 |
* |
Also available in: Unified diff
ref #8039 additional addTypeDesignation method in RegistrationService