List of usage examples for javax.persistence.criteria Root get
<Y> Path<Y> get(SingularAttribute<? super X, Y> attribute);
From source file:th.co.geniustree.dental.spec.BillSpec.java
public static Specification<Bill> dateBillLike(final Date keyword) { return new Specification<Bill>() { @Override//from ww w . j a v a 2s . c o m public Predicate toPredicate(Root<Bill> root, CriteriaQuery<?> cq, CriteriaBuilder cb) { return cb.between(root.get(Bill_.dateBill), keyword, keyword); } }; }
From source file:th.co.geniustree.dental.spec.DepartmentSpec.java
public static Specification<Department> idWhere(final Integer keyword) { return new Specification<Department>() { @Override//from www . j ava 2s . c om public Predicate toPredicate(Root<Department> root, CriteriaQuery<?> query, CriteriaBuilder cb) { return cb.equal(root.get(Department_.id), keyword); } }; }
From source file:th.co.geniustree.intenship.advisor.spec.TimetableSpec.java
public static Specification<Timetable> nameLike(final String keyword) { return new Specification() { @Override/*from ww w .j ava2 s . c o m*/ public Predicate toPredicate(Root root, CriteriaQuery cq, CriteriaBuilder cb) { return cb.like(cb.upper(root.get(Timetable_.account).get(Account_.name)), keyword.toUpperCase()); } }; }
From source file:th.co.geniustree.intenship.advisor.spec.TimetableSpec.java
public static Specification<Timetable> nameTeacherLike(final String keyword) { return new Specification() { @Override//from w ww. j av a 2 s.c om public Predicate toPredicate(Root root, CriteriaQuery cq, CriteriaBuilder cb) { return cb.like(cb.upper(root.get(Timetable_.account).get(Account_.name)), keyword.toUpperCase()); } }; }
From source file:th.co.geniustree.intenship.advisor.spec.CategoryAdviseSpec.java
public static Specification<CategoryAdvise> nameCategoryLike(final String keyword) { return new Specification<CategoryAdvise>() { @Override/*from w ww . ja v a 2 s .c o m*/ public Predicate toPredicate(Root<CategoryAdvise> root, CriteriaQuery<?> cq, CriteriaBuilder cb) { return cb.like(cb.upper(root.get(CategoryAdvise_.nameCategory)), keyword.toUpperCase()); } }; }
From source file:th.co.geniustree.intenship.advisor.spec.TimetableSpec.java
public static Specification<Timetable> nameParent(final String keyword) { return new Specification() { @Override//from www . j a v a 2 s . c om public Predicate toPredicate(Root root, CriteriaQuery cq, CriteriaBuilder cb) { return cb.like(cb.upper(root.get(Timetable_.account).get(Student_.parent).get(Parent_.name)), keyword.toUpperCase()); } }; }
From source file:th.co.geniustree.dental.spec.ListSelectHealSpec.java
public static Specification<ListSelectHeal> priceLike(final Double keyword) { return new Specification<ListSelectHeal>() { @Override/*from ww w . j a va2s . c o m*/ public Predicate toPredicate(Root<ListSelectHeal> root, CriteriaQuery<?> cq, CriteriaBuilder cb) { return cb.equal(root.get(ListSelectHeal_.price), keyword); } }; }
From source file:th.co.geniustree.intenship.advisor.spec.TeacherSpec.java
public static Specification<Teacher> nameLike(final String keyword) { return new Specification<Teacher>() { @Override/*from w ww . ja v a 2 s. co m*/ public Predicate toPredicate(Root<Teacher> root, CriteriaQuery<?> cq, CriteriaBuilder cb) { return cb.like(cb.upper(root.get(Teacher_.name)), keyword.toUpperCase()); } }; }
From source file:th.co.geniustree.intenship.advisor.spec.TeacherSpec.java
public static Specification<Teacher> emailLike(final String keyword) { return new Specification<Teacher>() { @Override//from ww w .ja v a 2s. c o m public Predicate toPredicate(Root<Teacher> root, CriteriaQuery<?> cq, CriteriaBuilder cb) { return cb.like(cb.upper(root.get(Teacher_.email)), keyword.toUpperCase()); } }; }
From source file:th.co.geniustree.dental.spec.LotSpec.java
public static Specification<Lot> dateInBetween(final Date keyword) { return new Specification<Lot>() { @Override//from w w w . j ava2 s. com public Predicate toPredicate(Root<Lot> root, CriteriaQuery<?> cq, CriteriaBuilder cb) { return cb.between(root.get(Lot_.dateIn), keyword, keyword); } }; }