Example usage for javax.persistence.criteria CriteriaBuilder upper

List of usage examples for javax.persistence.criteria CriteriaBuilder upper

Introduction

In this page you can find the example usage for javax.persistence.criteria CriteriaBuilder upper.

Prototype

Expression<String> upper(Expression<String> x);

Source Link

Document

Create expression for converting a string to uppercase.

Usage

From source file:th.co.geniustree.intenship.advisor.spec.StudentSpec.java

public static Specification<Student> emailLike(final String keyword) {
    return new Specification<Student>() {

        @Override/*  w w w .j  a  va 2 s . c  o  m*/
        public Predicate toPredicate(Root<Student> root, CriteriaQuery<?> query, CriteriaBuilder cb) {
            return cb.like(cb.upper(root.get(Student_.email)), keyword.toUpperCase());
        }
    };
}

From source file:th.co.geniustree.intenship.advisor.spec.ParentSpec.java

public static Specification<Parent> emailLike(final String keyword) {
    return new Specification<Parent>() {

        @Override//from  w w  w.  ja  v  a 2s.c o m
        public Predicate toPredicate(Root<Parent> root, CriteriaQuery<?> query, CriteriaBuilder cb) {
            return cb.like(cb.upper(root.get(Parent_.email)), keyword.toUpperCase());
        }
    };
}

From source file:th.co.geniustree.intenship.advisor.spec.StudentSpec.java

public static Specification<Student> nameLike(final String keyword) {
    return new Specification<Student>() {

        @Override// w w w.j  ava  2  s.  co  m
        public Predicate toPredicate(Root<Student> root, CriteriaQuery<?> query, CriteriaBuilder cb) {
            return cb.like(cb.upper(root.get(Student_.name)), keyword.toUpperCase());

        }
    };
}

From source file:th.co.geniustree.intenship.advisor.spec.InformationSpec.java

public static Specification<Information> titleLike(final String keyword) {
    return new Specification<Information>() {

        @Override// w  w  w . j  ava  2s . com
        public Predicate toPredicate(Root<Information> root, CriteriaQuery<?> cq, CriteriaBuilder cb) {
            return cb.like(cb.upper(root.get(Information_.title)), keyword.toUpperCase());
        }
    };
}

From source file:th.co.geniustree.intenship.advisor.spec.ParentSpec.java

public static Specification<Parent> nameLike(final String keyword) {
    return new Specification<Parent>() {

        @Override//from   w  ww . j  a va2 s  .  c om
        public Predicate toPredicate(Root<Parent> root, CriteriaQuery<?> cq, CriteriaBuilder cb) {
            return cb.like(cb.upper(root.get(Parent_.name)), keyword.toUpperCase());
        }

    };
}

From source file:th.co.geniustree.intenship.advisor.spec.AccountSpec.java

public static Specification<Account> emailLike(final String keyword) {
    return new Specification<Account>() {

        @Override/*from   w w w .  ja  va2  s.c om*/
        public Predicate toPredicate(Root<Account> root, CriteriaQuery<?> query, CriteriaBuilder cb) {
            return cb.like(cb.upper(root.get(Account_.email)), keyword.toUpperCase());
        }
    };
}

From source file:th.co.geniustree.intenship.advisor.spec.AccountSpec.java

public static Specification<Account> nameLike(final String keyword) {
    return new Specification<Account>() {

        @Override/*from   w w w  .j  a v  a  2  s . c  o  m*/
        public Predicate toPredicate(Root<Account> root, CriteriaQuery<?> cq, CriteriaBuilder cb) {
            return cb.like(cb.upper(root.get(Account_.name)), keyword.toUpperCase());
        }

    };
}

From source file:th.co.geniustree.dental.spec.EmployeeSpec.java

public static Specification<Employee> nameLike(final String keyword) {
    return new Specification<Employee>() {

        @Override//from   w  w w.  j  a v  a2  s  .c  o m
        public Predicate toPredicate(Root<Employee> root, CriteriaQuery<?> cq, CriteriaBuilder cb) {

            return cb.like(cb.upper(root.get(Employee_.nameTh)), keyword.toUpperCase());
        }
    };
}

From source file:th.co.geniustree.intenship.advisor.spec.TimetableSpec.java

public static Specification<Timetable> nameLike(final String keyword) {
    return new Specification() {
        @Override/* w  w  w.  j ava 2s  .  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/* w w  w .j  av  a 2  s .co m*/
        public Predicate toPredicate(Root root, CriteriaQuery cq, CriteriaBuilder cb) {
            return cb.like(cb.upper(root.get(Timetable_.account).get(Account_.name)), keyword.toUpperCase());
        }
    };
}