Revision 8c2c3497
Added by Andreas Müller almost 6 years ago
cdmlib-model/src/main/java/eu/etaxonomy/cdm/strategy/cache/agent/PersonDefaultCacheStrategy.java | ||
---|---|---|
65 | 65 |
return result; |
66 | 66 |
}else{ |
67 | 67 |
result = person.getNomenclaturalTitle(); |
68 |
if (StringUtils.isNotBlank(result)){
|
|
68 |
if (isNotBlank(result)){ |
|
69 | 69 |
return result; |
70 | 70 |
} |
71 | 71 |
result = addInitials("", person); |
72 |
if (StringUtils.isNotBlank(result)){
|
|
72 |
if (isNotBlank(result)){ |
|
73 | 73 |
return result; |
74 | 74 |
} |
75 | 75 |
} |
cdmlib-services/src/test/java/eu/etaxonomy/cdm/api/utility/DerivedUnitConverterIntegrationTest.java | ||
---|---|---|
61 | 61 |
DerivedUnitConverter<MediaSpecimen> converter = new DerivedUnitConverter<MediaSpecimen>(std); |
62 | 62 |
SpecimenTypeDesignation newDu = converter.convertTo(MediaSpecimen.class, SpecimenOrObservationType.StillImage); |
63 | 63 |
assertEquals(du, converter.oldDerivedUnit()); |
64 |
printDataSet(System.err, new String[]{"SpecimenOrObservationBase", "TypeDesignationBase"}); |
|
64 |
// printDataSet(System.err, new String[]{"SpecimenOrObservationBase", "TypeDesignationBase"});
|
|
65 | 65 |
service.saveOrUpdate(newDu.getTypeSpecimen()); |
66 | 66 |
service.delete(du); |
67 |
printDataSet(System.err, new String[]{"SpecimenOrObservationBase", "TypeDesignationBase"}); |
|
67 |
// printDataSet(System.err, new String[]{"SpecimenOrObservationBase", "TypeDesignationBase"});
|
|
68 | 68 |
assertEquals(1, service.list(null, null, null, null, null).size()); |
69 | 69 |
assertEquals(1, service.list(MediaSpecimen.class, null, null, null, null).size()); |
70 | 70 |
} |
... | ... | |
97 | 97 |
* Test with DerivedUnit which is used in a couple of associations to prevent from |
98 | 98 |
* org.hibernate.ObjectDeletedException: deleted object would be re-saved by cascade ... |
99 | 99 |
*/ |
100 |
@DataSet("DerivedUnitConverterIntegrationTest.cascadeDelete.xml") |
|
101 | 100 |
@Test |
101 |
@DataSet("DerivedUnitConverterIntegrationTest.cascadeDelete.xml") |
|
102 | 102 |
public void cascadeDelete() throws DerivedUnitConversionException{ |
103 | 103 |
|
104 | 104 |
// NOTE: |
Also available in: Unified diff
cleanup