Project

General

Profile

« Previous | Next » 

Revision b313991f

Added by Andreas Müller over 4 years ago

adapt some classes to new CommonService.getSourcedObjectSByIdInSource and cleanup

View differences:

app-import/src/main/java/eu/etaxonomy/cdm/io/edaphobase/EdaphobaseTaxonImport.java
519 519
    @Override
520 520
    public Map<Object, Map<String, ? extends CdmBase>> getRelatedObjectsForPartition(ResultSet rs,
521 521
            EdaphobaseImportState state) {
522

  
522 523
        Map<Object, Map<String, ? extends CdmBase>> result = new HashMap<>();
523 524
        Map<String, TeamOrPersonBase<?>> authorMap = new HashMap<>();
524 525
        Set<String> authorSet = new HashSet<>();
......
543 544
            UUID uuid = state.getAuthorUuid(authorStr);
544 545
            uuidSet.add(uuid);
545 546
        }
547
        @SuppressWarnings("unchecked")
546 548
        List<TeamOrPersonBase<?>> authors = (List)getAgentService().find(uuidSet);
547 549
        Map<UUID, TeamOrPersonBase<?>> authorUuidMap = new HashMap<>();
548 550
        for (TeamOrPersonBase<?> author : authors){
......
558 560

  
559 561
        //reference map
560 562
        String nameSpace = REFERENCE_NAMESPACE;
561
        Class<?> cdmClass = Reference.class;
562 563
        Set<String> idSet = referenceIdSet;
563
        Map<String, Reference> referenceMap = (Map<String, Reference>)getCommonService().getSourcedObjectsByIdInSource(cdmClass, idSet, nameSpace);
564
        Map<String, Reference> referenceMap = getCommonService().getSourcedObjectsByIdInSourceC(Reference.class, idSet, nameSpace);
564 565
        result.put(nameSpace, referenceMap);
565 566

  
566 567
        //secundum

Also available in: Unified diff