if (ex instanceof QueryException) {
return new InvalidDataAccessResourceUsageException(ex.getMessage(), ex);
}
if (ex instanceof NonUniqueResultException) {
return new IncorrectResultSizeDataAccessException(ex.getMessage(), 1, ex);
}
if (ex instanceof NonUniqueObjectException) {
return new DuplicateKeyException(ex.getMessage(), ex);
}
if (ex instanceof PropertyValueException) {