Revision 9dc896c9
Added by Andreas Müller almost 7 years ago
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dao/hibernate/common/DeduplicationHelper.java | ||
---|---|---|
45 | 45 |
import eu.etaxonomy.cdm.model.common.Identifier; |
46 | 46 |
import eu.etaxonomy.cdm.model.common.IntextReference; |
47 | 47 |
import eu.etaxonomy.cdm.model.common.Marker; |
48 |
import eu.etaxonomy.cdm.model.name.TaxonNameBase;
|
|
48 |
import eu.etaxonomy.cdm.model.name.TaxonName; |
|
49 | 49 |
import eu.etaxonomy.cdm.model.name.TaxonNameFactory; |
50 | 50 |
import eu.etaxonomy.cdm.model.taxon.Taxon; |
51 | 51 |
import eu.etaxonomy.cdm.persistence.dao.hibernate.common.CdmGenericDaoImpl.ReferenceHolder; |
... | ... | |
215 | 215 |
* Checks if 2 can be merged and reallocation of referencing objects is allowed. |
216 | 216 |
* This is <code>true</code> if |
217 | 217 |
* classes are same or for some explicit cases like both |
218 |
* inherit form {@link TeamOrPersonBase} or from {@link TaxonNameBase}.
|
|
218 |
* inherit form {@link TeamOrPersonBase} or from {@link TaxonName}. |
|
219 | 219 |
* Necessary condition is that both classes are mapped to the same table. |
220 | 220 |
* |
221 | 221 |
* @param class1 |
... | ... | |
229 | 229 |
}else{ |
230 | 230 |
if (classesAssignableFrom(TeamOrPersonBase.class, class1, class2)){ |
231 | 231 |
return true; |
232 |
}else if (classesAssignableFrom(TaxonNameBase.class, class1, class2)){
|
|
232 |
}else if (classesAssignableFrom(TaxonName.class, class1, class2)){ |
|
233 | 233 |
return true; |
234 | 234 |
}else{ |
235 | 235 |
return false; |
... | ... | |
265 | 265 |
//TODO cast |
266 | 266 |
getCollectionRoles(clazz, sessionFactory); |
267 | 267 |
|
268 |
TaxonNameBase<?,?> name1 = TaxonNameFactory.NewBotanicalInstance(null);
|
|
268 |
TaxonName<?,?> name1 = TaxonNameFactory.NewBotanicalInstance(null); |
|
269 | 269 |
name1.getTaxonBases(); |
270 | 270 |
|
271 |
Type propType = sessionFactory.getReferencedPropertyType(TaxonNameBase.class.getCanonicalName(), "taxonBases");
|
|
271 |
Type propType = sessionFactory.getReferencedPropertyType(TaxonName.class.getCanonicalName(), "taxonBases"); |
|
272 | 272 |
// Map<?,?> collMetadata = sessionFactory.getAllCollectionMetadata(); |
273 | 273 |
//roles = sessionFactory.getCollectionRolesByEntityParticipant("eu.etaxonomy.cdm.model.name.BotanicalName"); |
274 | 274 |
CollectionPersister collPersister; |
275 | 275 |
try { |
276 |
collPersister = sessionFactory.getCollectionPersister(TaxonNameBase.class.getCanonicalName()+".annotations");
|
|
276 |
collPersister = sessionFactory.getCollectionPersister(TaxonName.class.getCanonicalName()+".annotations"); |
|
277 | 277 |
} catch (MappingException e) { |
278 | 278 |
// TODO Auto-generated catch block |
279 | 279 |
e.printStackTrace(); |
Also available in: Unified diff
fix #6368 rename table and class TaxonNameBase