Project

General

Profile

Revision 3262af01

ID3262af01a0da56365eb7c1ec75d9eb6b96c8a43a
Parent ee8978f6
Child 0831d056

Added by Patrick Plitzner 2 months ago

ref #8233 Add barcode and catalog number to clone type service method

View differences:

cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/INameService.java
69 69
	 * to the same {@link FieldUnit}
70 70
	 * @param name the name where this type designation will be added to
71 71
	 * @param baseDesignation the type specimen of this designation is cloned to create the new specimen
72
 	 * @param accessionNumber the accession number of the clones specimen
72
 	 * @param accessionNumber the accession number of the cloned specimen
73
 	 * @param barcode the barcode of the cloned specimen
74
 	 * @param catalogNumber the catalog number of the cloned specimen
73 75
	 * @param collectionUuid the collection the cloned specimen belongs to
74 76
	 * @param typeStatus the type status of the cloned specimen
75 77
	 * @return an {@link UpdateResult}
76 78
	 */
77 79
    public UpdateResult cloneTypeDesignation(UUID nameUuid, SpecimenTypeDesignation baseDesignation,
78
            String accessionNumber, UUID collectionUuid, SpecimenTypeDesignationStatus typeStatus);
80
            String accessionNumber, String barcode, String catalogNumber,
81
            UUID collectionUuid, SpecimenTypeDesignationStatus typeStatus);
79 82

  
80 83
	/**
81 84
	 * Removes the given type designation from the given taxon name and deletes it from
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/NameServiceImpl.java
208 208
    @Override
209 209
    @Transactional(readOnly = false)
210 210
    public UpdateResult cloneTypeDesignation(UUID nameUuid, SpecimenTypeDesignation baseDesignation,
211
            String accessionNumber, UUID collectionUuid, SpecimenTypeDesignationStatus typeStatus){
211
            String accessionNumber, String barcode, String catalogNumber,
212
            UUID collectionUuid, SpecimenTypeDesignationStatus typeStatus){
212 213
        UpdateResult result = new UpdateResult();
213 214

  
214 215
        DerivedUnit baseSpecimen = HibernateProxyHelper.deproxy(occurrenceService.load(baseDesignation.getTypeSpecimen().getUuid(), Arrays.asList("collection")), DerivedUnit.class);
......
224 225
            DerivationEvent.NewSimpleInstance(original, duplicate, derivedFrom.getType());
225 226
        }
226 227
        duplicate.setAccessionNumber(accessionNumber);
228
        duplicate.setBarcode(barcode);
229
        duplicate.setCatalogNumber(catalogNumber);
227 230
        duplicate.setCollection(collectionService.load(collectionUuid));
228 231
        SpecimenTypeDesignation typeDesignation = SpecimenTypeDesignation.NewInstance();
229 232
        typeDesignation.setTypeSpecimen(duplicate);

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)