📅  最后修改于: 2022-03-11 14:52:44.390000             🧑  作者: Mango
CriteriaQuery criteriaQuery =
criteriaBuilder.createQuery(DeptEmployee.class);
Root root = criteriaQuery.from(DeptEmployee.class);
In inClause = criteriaBuilder.in(root.get("title"));
for (String title : titles) {
inClause.value(title);
}
criteriaQuery.select(root).where(inClause);