Convert to JPA Criteria API.