Revision a9b7ea5d
Added by Andreas Müller almost 3 years ago
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/dto/SpecimenOrObservationBaseDTO.java | ||
---|---|---|
24 | 24 |
import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper; |
25 | 25 |
import eu.etaxonomy.cdm.model.agent.AgentBase; |
26 | 26 |
import eu.etaxonomy.cdm.model.agent.TeamOrPersonBase; |
27 |
import eu.etaxonomy.cdm.model.common.CdmBase; |
|
27 | 28 |
import eu.etaxonomy.cdm.model.common.IdentifiableSource; |
28 | 29 |
import eu.etaxonomy.cdm.model.description.DescriptionBase; |
29 | 30 |
import eu.etaxonomy.cdm.model.description.DescriptionElementBase; |
... | ... | |
99 | 100 |
collector = fieldUnit.getGatheringEvent().getCollector(); |
100 | 101 |
} |
101 | 102 |
String fieldNumberString = CdmUtils.Nz(fieldUnit.getFieldNumber()); |
102 |
if (collector != null && collector instanceof TeamOrPersonBase){ |
|
103 |
collectorsString = ((TeamOrPersonBase)collector).getCollectorTitleCache(); |
|
103 |
if (collector != null){ |
|
104 |
if (collector.isInstanceOf(TeamOrPersonBase.class)){ |
|
105 |
collectorsString = CdmBase.deproxy(collector, TeamOrPersonBase.class).getCollectorTitleCache(); |
|
106 |
}else{ |
|
107 |
collectorsString = collector.getTitleCache(); //institutions |
|
108 |
} |
|
104 | 109 |
} |
105 | 110 |
collectorsString = CdmUtils.concat(" - ", collectorsString, fieldNumberString); |
106 | 111 |
} |
Also available in: Unified diff
ref #9772 add deproxy to collector title computation