final List<E> list = findEntities(criteria, null);
if(list == null || list.size() < 1) {
throw new EntityNotFoundException("No matching entity found.");
}
else if(list.size() > 1) {
throw new NonUniqueResultException("More than one matching entity found.");
}
assert list.size() == 1;
return list.get(0);
}