Revision 592ccd9f
Added by Patrick Plitzner about 8 years ago
app-import/src/main/java/eu/etaxonomy/cdm/io/redlist/gefaesspflanzen/RedListGefaesspflanzenImportTaxa.java | ||
---|---|---|
92 | 92 |
private void makeSingleTaxon(RedListGefaesspflanzenImportState state, ResultSet rs, Set<TaxonBase> taxaToSave) |
93 | 93 |
throws SQLException { |
94 | 94 |
long id = rs.getLong("NAMNR"); |
95 |
String gueltString = rs.getString("GUELT"); |
|
95 | 96 |
|
96 |
BotanicalName name = state.getRelatedObject("name", String.valueOf(id), BotanicalName.class);
|
|
97 |
BotanicalName name = state.getRelatedObject("name",String.valueOf(id), BotanicalName.class); |
|
97 | 98 |
TaxonBase taxon = Taxon.NewInstance(name, null); |
98 | 99 |
|
99 | 100 |
taxaToSave.add(taxon); |
... | ... | |
107 | 108 |
RedListGefaesspflanzenImportState state) { |
108 | 109 |
Map<Object, Map<String, ? extends CdmBase>> result = new HashMap<>(); |
109 | 110 |
Map<String, BotanicalName> nameMap = new HashMap<String, BotanicalName>(); |
110 |
|
|
111 |
|
|
112 | 111 |
try { |
113 | 112 |
while (rs.next()){ |
114 | 113 |
long id = rs.getLong("NAMNR"); |
115 |
BotanicalName name = (BotanicalName) getCommonService().getSourcedObjectByIdInSource(BotanicalName.class, String.valueOf(id), "name"); |
|
116 |
nameMap.put(String.valueOf(id), name); |
|
117 |
|
|
114 |
nameMap.put(String.valueOf(id), (BotanicalName) getNameService().load(state.getNameMap().get(id))); |
|
118 | 115 |
} |
119 | 116 |
} catch (SQLException e) { |
120 | 117 |
e.printStackTrace(); |
Also available in: Unified diff
Speed up assembly of related names