Revision 692d6943
Added by Katja Luther over 6 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/selection/NamedAreaSelectionDialog.java | ||
---|---|---|
26 | 26 |
|
27 | 27 |
import eu.etaxonomy.cdm.api.service.ITermService; |
28 | 28 |
import eu.etaxonomy.cdm.api.service.IVocabularyService; |
29 |
import eu.etaxonomy.cdm.model.common.CdmBase;
|
|
29 |
import eu.etaxonomy.cdm.model.common.DefinedTermBase;
|
|
30 | 30 |
import eu.etaxonomy.cdm.model.common.TermType; |
31 | 31 |
import eu.etaxonomy.cdm.model.common.TermVocabulary; |
32 | 32 |
import eu.etaxonomy.cdm.model.location.NamedArea; |
... | ... | |
143 | 143 |
/** {@inheritDoc} */ |
144 | 144 |
@Override |
145 | 145 |
protected NamedArea getPersistentObject(UUID uuid) { |
146 |
for(TermVocabulary<NamedArea> vocabulary : selectedVocabularies){ |
|
147 |
for(Object object : vocabulary.getTerms()){ |
|
148 |
CdmBase cdmBaseObject = (CdmBase) object; |
|
149 |
if(uuid.equals(cdmBaseObject.getUuid())){ |
|
150 |
return CdmBase.deproxy(cdmBaseObject, NamedArea.class); |
|
151 |
} |
|
152 |
} |
|
153 |
} |
|
146 |
|
|
147 |
DefinedTermBase area = CdmStore.getService(ITermService.class).find(uuid); |
|
148 |
if (area instanceof NamedArea){ |
|
149 |
return (NamedArea) area; |
|
150 |
} |
|
151 |
|
|
154 | 152 |
return null; |
155 | 153 |
} |
156 | 154 |
|
Also available in: Unified diff
fix performance problem in namedArea selection dialog