1CriteriaQuery<DeptEmployee> criteriaQuery =
2 criteriaBuilder.createQuery(DeptEmployee.class);
3Root<DeptEmployee> root = criteriaQuery.from(DeptEmployee.class);
4In<String> inClause = criteriaBuilder.in(root.get("title"));
5for (String title : titles) {
6 inClause.value(title);
7}
8criteriaQuery.select(root).where(inClause);
9