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/algaterra/AlgaTerraTypeImagesImport.java
162 162

  
163 163
	@Override
164 164
	public Map<Object, Map<String, ? extends CdmBase>> getRelatedObjectsForPartition(ResultSet rs, BerlinModelImportState state) {
165
		String nameSpace;
166
		Class<?> cdmClass;
165

  
166
	    String nameSpace;
167 167
		Set<String> idSet;
168
		Map<Object, Map<String, ? extends CdmBase>> result = new HashMap<Object, Map<String, ? extends CdmBase>>();
168
		Map<Object, Map<String, ? extends CdmBase>> result = new HashMap<>();
169 169

  
170 170
		try{
171
			Set<String> typeSpecimenIdSet = new HashSet<String>();
171
			Set<String> typeSpecimenIdSet = new HashSet<>();
172 172

  
173 173
			while (rs.next()){
174 174
				handleForeignKey(rs, typeSpecimenIdSet, "TypeSpecimenFk");
......
176 176

  
177 177
			//type specimen map
178 178
			nameSpace = AlgaTerraSpecimenImportBase.TYPE_SPECIMEN_DERIVED_UNIT_NAMESPACE;
179
			cdmClass = SpecimenOrObservationBase.class;
180 179
			idSet = typeSpecimenIdSet;
181
			Map<String, DerivedUnit> typeSpecimenMap = (Map<String, DerivedUnit>)getCommonService().getSourcedObjectsByIdInSource(cdmClass, idSet, nameSpace);
180
			Map<String, DerivedUnit> typeSpecimenMap = getCommonService().getSourcedObjectsByIdInSourceC(DerivedUnit.class, idSet, nameSpace);
182 181
			result.put(nameSpace, typeSpecimenMap);
183 182

  
184 183

  

Also available in: Unified diff