List of usage examples for javax.persistence.criteria CriteriaBuilder like
Predicate like(Expression<String> x, String pattern);
From source file:th.co.geniustree.dental.spec.TypeOfMedicalSpec.java
public static Specification<TypeOfMedical> userName(final String keyword) { return new Specification<TypeOfMedical>() { @Override/*ww w.ja v a 2s . co m*/ public Predicate toPredicate(Root<TypeOfMedical> root, CriteriaQuery<?> query, CriteriaBuilder cb) { return cb.like(root.get(TypeOfMedical_.userName), keyword); } }; }
From source file:th.co.geniustree.dental.spec.TypeProductSpec.java
public static Specification<TypeProduct> nameLike(final String keyword) { return new Specification<TypeProduct>() { @Override// w w w.j ava 2 s. c o m public Predicate toPredicate(Root<TypeProduct> root, CriteriaQuery<?> cq, CriteriaBuilder cb) { return cb.like(cb.upper(root.get(TypeProduct_.name)), keyword.toUpperCase()); } }; }
From source file:th.co.geniustree.dental.spec.UnitProductSpec.java
public static Specification<UnitProduct> nameLike(final String keyword) { return new Specification<UnitProduct>() { @Override/*from w w w. j a va 2 s .co m*/ public Predicate toPredicate(Root<UnitProduct> root, CriteriaQuery<?> cq, CriteriaBuilder cb) { return cb.like(cb.upper(root.get(UnitProduct_.name)), keyword.toUpperCase()); } }; }
From source file:th.co.geniustree.intenship.advisor.spec.FacultySpec.java
public static Specification<Faculty> nameLike(final String keyword) { return new Specification<Faculty>() { @Override// w w w . j a v a2s.com public Predicate toPredicate(Root<Faculty> root, CriteriaQuery<?> cq, CriteriaBuilder cb) { return cb.like(cb.upper(root.get(Faculty_.name)), keyword.toUpperCase()); } }; }
From source file:th.co.geniustree.dental.spec.TmpProductSpec.java
public static Specification<TmpProduct> nameUser(final String keyword) { return new Specification<TmpProduct>() { @Override//from w w w . j a v a2s .c o m public Predicate toPredicate(Root<TmpProduct> root, CriteriaQuery<?> cq, CriteriaBuilder cb) { return cb.like(root.get(TmpProduct_.user), keyword); } }; }
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 www .j a 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.AppointmentSpec.java
public static Specification<Appointment> nameLike(final String keyword) { return new Specification() { @Override/*from w w w . ja v a 2 s. co m*/ public Predicate toPredicate(Root root, CriteriaQuery cq, CriteriaBuilder cb) { return cb.like(cb.upper(root.get(Appointment_.student).get(Student_.name)), keyword.toUpperCase()); } }; }
From source file:th.co.geniustree.intenship.advisor.spec.AppointmentSpec.java
public static Specification<Appointment> nameTeacherLike(final String keyword) { return new Specification() { @Override/* ww w .jav a 2s .c o m*/ public Predicate toPredicate(Root root, CriteriaQuery cq, CriteriaBuilder cb) { return cb.like(cb.upper(root.get(Appointment_.teacher).get(Student_.name)), keyword.toUpperCase()); } }; }
From source file:th.co.geniustree.intenship.advisor.spec.TeacherSpec.java
public static Specification<Teacher> nameLike(final String keyword) { return new Specification<Teacher>() { @Override/* ww w . ja v a2s . com*/ 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 w w w. ja va 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()); } }; }