Project

General

Profile

« Previous | Next » 

Revision 6460df89

Added by Andreas Müller over 10 years ago

bugfix for integer facts

View differences:

app-import/src/main/java/eu/etaxonomy/cdm/io/berlinModel/in/BerlinModelFactsImport.java
234 234
					
235 235
					int factId = rs.getInt("factId");
236 236
					Object taxonIdObj = rs.getObject("taxonId");
237
					long taxonId = rs.getLong("taxonId");
237
					Number taxonId = (Number)rs.getObject("taxonId");
238 238
					Object factRefFkObj = rs.getObject("factRefFk");
239 239
					Object categoryFkObj = rs.getObject("factCategoryFk");
240 240
					Integer categoryFk = rs.getInt("factCategoryFk");
......
251 251
						success = false;
252 252
					}else{
253 253
						TaxonDescription taxonDescription;
254
						if ( (taxonDescription = getMyTaxonDescripion(taxonBase, state, categoryFk, taxonIdObj, taxonId, factId, fact, sourceRef)) == null){
254
						if ( (taxonDescription = getMyTaxonDescripion(taxonBase, state, categoryFk, taxonIdObj, factId, fact, sourceRef)) == null){
255 255
							success = false;
256 256
							continue;
257 257
						}
......
382 382
		return success;
383 383
	}
384 384

  
385
	private TaxonDescription getMyTaxonDescripion(TaxonBase taxonBase, BerlinModelImportState state, Integer categoryFk, Object taxonIdObj, long taxonId, int factId, String fact, Reference<?> sourceRef) {
385
	private TaxonDescription getMyTaxonDescripion(TaxonBase taxonBase, BerlinModelImportState state, Integer categoryFk, Object taxonIdObj, int factId, String fact, Reference<?> sourceRef) {
386 386
		Taxon taxon = null;
387 387
		if ( taxonBase instanceof Taxon ) {
388 388
			taxon = (Taxon) taxonBase;
......
522 522
		return taxonDescription;
523 523
	}
524 524

  
525
	private TaxonBase getTaxon(Map<String, TaxonBase> taxonMap, Object taxonIdObj, Long taxonId){
525
	private TaxonBase getTaxon(Map<String, TaxonBase> taxonMap, Object taxonIdObj, Number taxonId){
526 526
		if (taxonIdObj != null){
527 527
			return taxonMap.get(String.valueOf(taxonId));
528 528
		}else{

Also available in: Unified diff