Refactor OAI-PMH queries into shared CriteriaQuery