Revision 379eb203
Added by Andreas Müller over 3 years ago
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dao/hibernate/validation/EntityValidationDaoHibernateImpl.java | ||
---|---|---|
29 | 29 |
import eu.etaxonomy.cdm.persistence.dao.validation.IEntityValidationDao; |
30 | 30 |
|
31 | 31 |
/** |
32 |
* |
|
33 | 32 |
* @author ayco_holleman |
34 | 33 |
* @since 15 jan. 2015 |
35 |
* |
|
36 | 34 |
*/ |
37 | 35 |
@Repository |
38 | 36 |
@Qualifier("EntityValidationDaoHibernateImpl") |
... | ... | |
90 | 88 |
Query query = getSession().createQuery( |
91 | 89 |
"FROM EntityValidation vr " |
92 | 90 |
+ "ORDER BY vr.validatedEntityClass, vr.validatedEntityId"); |
93 |
@SuppressWarnings("unchecked")
|
|
91 |
@SuppressWarnings("unchecked") |
|
94 | 92 |
List<EntityValidation> result = query.list(); |
95 | 93 |
return result; |
96 | 94 |
} |
... | ... | |
147 | 145 |
return; |
148 | 146 |
} |
149 | 147 |
Set<Class<?>> validationGroupSet = new HashSet<Class<?>>(Arrays.asList(validationGroups)); |
150 |
Set<String> validationGroupNames = new HashSet<String>(validationGroupSet.size());
|
|
148 |
Set<String> validationGroupNames = new HashSet<>(validationGroupSet.size()); |
|
151 | 149 |
for (Class<?> c : validationGroupSet) { |
152 | 150 |
validationGroupNames.add(c.getName()); |
153 | 151 |
} |
... | ... | |
161 | 159 |
for (EntityConstraintViolation ecv : constraintsToDelete){ |
162 | 160 |
fromResult.removeEntityConstraintViolation(ecv); |
163 | 161 |
} |
164 |
|
|
165 | 162 |
} |
166 | 163 |
|
167 | 164 |
private static <T extends ICdmBase> void addNewErrors(EntityValidation toResult, T validatedEntity, |
... | ... | |
199 | 196 |
logger.debug("Deleted " + n + " error records"); |
200 | 197 |
} |
201 | 198 |
} |
202 |
|
|
203 | 199 |
} |
Also available in: Unified diff
cleanup