Revision 114cd073
Added by Andreas Müller over 1 year ago
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dao/hibernate/common/DeduplicationHelper.java | ||
---|---|---|
15 | 15 |
import javax.naming.Reference; |
16 | 16 |
|
17 | 17 |
import org.apache.commons.lang.UnhandledException; |
18 |
import org.apache.logging.log4j.LogManager;import org.apache.logging.log4j.Logger; |
|
18 |
import org.apache.logging.log4j.LogManager; |
|
19 |
import org.apache.logging.log4j.Logger; |
|
19 | 20 |
import org.hibernate.MappingException; |
20 | 21 |
import org.hibernate.Session; |
21 | 22 |
import org.hibernate.internal.SessionFactoryImpl; |
... | ... | |
231 | 232 |
return superClass.isAssignableFrom(class1) && superClass.isAssignableFrom(class2); |
232 | 233 |
} |
233 | 234 |
|
234 |
/** |
|
235 |
* @param <T> |
|
236 |
* @param cdmBase1 |
|
237 |
* @param cdmBase2 |
|
238 |
* @param clazz |
|
239 |
* @param sessionFactory |
|
240 |
* @throws MergeException |
|
241 |
* @throws ClassNotFoundException |
|
242 |
* @throws NoSuchFieldException |
|
243 |
*/ |
|
244 | 235 |
private <T extends CdmBase> void mergeExternal(T cdmBase1, T cdmBase2, Class<T> clazz, |
245 | 236 |
Session session) throws MergeException { |
246 | 237 |
// handleAnnotations |
... | ... | |
303 | 294 |
} |
304 | 295 |
} |
305 | 296 |
|
306 |
|
|
307 |
/** |
|
308 |
* @param <T> |
|
309 |
* @param cdmBase1 |
|
310 |
* @param cdmBase2 |
|
311 |
* @param session |
|
312 |
*/ |
|
313 | 297 |
private <T> void handleAnnotationsEtc(T cdmBase1, T cdmBase2, Session session) { |
314 | 298 |
//when handling annotations and other elements linked via @Any an JDBC errors occurs |
315 | 299 |
//due to the unique column constraint in the association table on the column referencing |
Also available in: Unified diff
cleanup