Revision 4cd946d8
Added by Patrick Plitzner over 7 years ago
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/dataimport/transientServices/TransientNameService.java | ||
---|---|---|
293 | 293 |
* @see eu.etaxonomy.cdm.api.service.INameService#deleteTypeDesignation(eu.etaxonomy.cdm.model.name.TaxonNameBase, eu.etaxonomy.cdm.model.name.TypeDesignationBase) |
294 | 294 |
*/ |
295 | 295 |
@Override |
296 |
public void deleteTypeDesignation(TaxonNameBase name, TypeDesignationBase typeDesignation) { |
|
297 |
defaultService.deleteTypeDesignation(name, typeDesignation); |
|
296 |
public DeleteResult deleteTypeDesignation(TaxonNameBase name, TypeDesignationBase typeDesignation) { |
|
297 |
return defaultService.deleteTypeDesignation(name, typeDesignation); |
|
298 |
} |
|
299 |
|
|
300 |
@Override |
|
301 |
public DeleteResult deleteTypeDesignation(UUID arg0, UUID arg1) { |
|
302 |
return defaultService.deleteTypeDesignation(arg0, arg1); |
|
298 | 303 |
} |
299 | 304 |
|
300 | 305 |
/** |
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/TypeDesignationSection.java | ||
---|---|---|
1 | 1 |
// $Id$ |
2 | 2 |
/** |
3 | 3 |
* Copyright (C) 2007 EDIT |
4 |
* European Distributed Institute of Taxonomy
|
|
4 |
* European Distributed Institute of Taxonomy |
|
5 | 5 |
* http://www.e-taxonomy.eu |
6 |
*
|
|
6 |
* |
|
7 | 7 |
* The contents of this file are subject to the Mozilla Public License Version 1.1 |
8 | 8 |
* See LICENSE.TXT at the top of this package for the full license terms. |
9 | 9 |
*/ |
... | ... | |
53 | 53 |
ICdmFormElement parentElement, int style) { |
54 | 54 |
super(formFactory, conversation, parentElement, "Type Designations", style); |
55 | 55 |
} |
56 |
|
|
56 |
|
|
57 | 57 |
/** {@inheritDoc} */ |
58 | 58 |
@Override |
59 | 59 |
public void addElement(TypeDesignationBase element) { |
... | ... | |
96 | 96 |
public void removeElement(TypeDesignationBase element) { |
97 | 97 |
boolean removeTypeDesignationFromAllTypifiedNames = PreferencesUtil.getPreferenceStore().getBoolean(IPreferenceKeys.ADD_TYPES_TO_ALL_NAMES); |
98 | 98 |
TaxonNameBase entity = removeTypeDesignationFromAllTypifiedNames ? null : getEntity(); |
99 |
CdmStore.getService(INameService.class).deleteTypeDesignation(entity, element);
|
|
99 |
CdmStore.getService(INameService.class).deleteTypeDesignation(entity!=null?entity.getUuid():null, element!=null?element.getUuid():null);
|
|
100 | 100 |
} |
101 | 101 |
|
102 | 102 |
/* |
... | ... | |
104 | 104 |
* @see eu.etaxonomy.taxeditor.section.ITaxonDetailSection#setTaxon(eu.etaxonomy.cdm.model.taxon.TaxonBase) |
105 | 105 |
*/ |
106 | 106 |
/** {@inheritDoc} */ |
107 |
public void setTaxonBase(TaxonBase entity) { |
|
107 |
@Override |
|
108 |
public void setTaxonBase(TaxonBase entity) { |
|
108 | 109 |
this.taxonBase = entity; |
109 | 110 |
NonViralName name = (NonViralName) HibernateProxyHelper.deproxy(entity.getName()); |
110 | 111 |
setEntity(name); |
111 | 112 |
} |
112 |
|
|
113 |
|
|
113 | 114 |
private boolean isSpecimenType(){ |
114 | 115 |
Rank rank = getEntity().getRank(); |
115 | 116 |
return rank.isSpecies() || rank.isInfraSpecific(); |
Also available in: Unified diff
Use uuid based service method #5490