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.TimetableSpec.java

public static Specification<Timetable> nameParent(final String keyword) {
    return new Specification() {
        @Override/*from   w  w w  .j av a 2  s.  com*/
        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.LotSpec.java

public static Specification<Lot> nameStaffReamLike(final String keyword) {
    return new Specification<Lot>() {

        @Override// w w w. j  a v a  2  s .  c om
        public Predicate toPredicate(Root<Lot> root, CriteriaQuery<?> cq, CriteriaBuilder cb) {
            return cb.like(cb.upper(root.get(Lot_.nameStaffReam)), keyword.toUpperCase());
        }
    };
}

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

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

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

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

public static Specification<Product> unitLike(final String keyword) {
    return new Specification<Product>() {

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

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

public static Specification<Product> typeProductLike(final String keyword) {
    return new Specification<Product>() {

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

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

public static Specification<Patient> hmLike(final String keyword) {
    return new Specification<Patient>() {

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

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

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

        @Override//from  w w w .java 2  s  .  co  m
        public Predicate toPredicate(Root<Patient> root, CriteriaQuery<?> query, CriteriaBuilder cb) {
            return cb.like(cb.upper(root.get(Patient_.name)), keyword.toUpperCase());
        }
    };
}

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

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

        @Override//from w w  w . java2s.  c om
        public Predicate toPredicate(Root<Patient> root, CriteriaQuery<?> query, CriteriaBuilder cb) {
            return cb.like(cb.upper(root.get(Patient_.email)), keyword.toUpperCase());
        }
    };
}

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

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

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

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

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

        @Override/*ww w. j  ava  2 s . co  m*/
        public Predicate toPredicate(Root<Staff> root, CriteriaQuery<?> cq, CriteriaBuilder cb) {
            return cb.like(cb.upper(root.get(Staff_.email)), keyword.toUpperCase());
        }
    };
}