use of com.zzkun.model.Contest in project ACManager by kun368.
the class ContestRepoTest method findAll.
@Test
public void findAll() throws Exception {
// List<Contest> all = contestRepo.findAll();
// for (Contest contest : all) {
// System.out.println(contest);
// System.out.println(contest.getRanks());
// }
// Contest contest = new Contest();
// contest.setAddUid(1);
// List<Contest> all = contestRepo.findAll(Example.of(contest));
// System.out.println(all);
List<Contest> list = contestRepo.findAll((root, query, cb) -> {
Predicate p1 = cb.equal(root.get("addUid").as(Integer.class), 1);
return query.where(p1).getRestriction();
});
System.out.println(list);
}
Aggregations