Revision 5b2db12a
Added by Andreas Müller about 3 years ago
cdmlib-remote/src/main/java/eu/etaxonomy/cdm/remote/dto/assembler/converter/HibernateProxyFieldMapper.java | ||
---|---|---|
19 | 19 |
|
20 | 20 |
public class HibernateProxyFieldMapper implements CustomFieldMapper { |
21 | 21 |
|
22 |
|
|
23 | 22 |
@Override |
24 | 23 |
public boolean mapField(Object source, Object destination, Object sourceFieldValue, ClassMap classMap, FieldMap fieldMapping) { |
25 | 24 |
|
26 | 25 |
if(sourceFieldValue instanceof CollectionProxy) { |
27 | 26 |
try { |
28 |
((CollectionProxy)sourceFieldValue).hashCode(); |
|
27 |
((CollectionProxy<?,?>)sourceFieldValue).hashCode();
|
|
29 | 28 |
} catch(SessionException se) { // currently no way to tell if is initialized |
30 | 29 |
return true; |
31 | 30 |
} |
... | ... | |
35 | 34 |
}else { |
36 | 35 |
return true; |
37 | 36 |
} |
38 |
|
|
39 | 37 |
} |
40 |
} |
|
38 |
} |
Also available in: Unified diff
cleanup