Example usage for java.lang String toUpperCase

List of usage examples for java.lang String toUpperCase

Introduction

In this page you can find the example usage for java.lang String toUpperCase.

Prototype

public String toUpperCase() 

Source Link

Document

Converts all of the characters in this String to upper case using the rules of the default locale.

Usage

From source file:eu.freme.bpt.Main.java

/**
 * Finds and removes the service from the arguments array. This helps
 * processing the rest of the parameters using the Apache Commons CLI
 * library (and thus needs to be called before processing the arguments).
 *
 * @param args The arguments of the program.
 * @param services The list of registered services.
 * @return   The service name if found, or {@code null} if not found.
 *///from  w w w.  j ava2s .  c  o m
private static Pair<EService, String[]> extractService(String[] args, final List<String> services) {
    EService foundService = null;
    List<String> newArgs = new ArrayList<>(args.length);
    for (String arg : args) {
        if (!services.contains(arg)) {
            newArgs.add(arg);
        } else {
            String serviceName = arg.toUpperCase().replace('-', '_');
            foundService = EService.valueOf(serviceName);
        }
    }
    return new Pair<>(foundService, newArgs.toArray(new String[newArgs.size()]));
}

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

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

        @Override/*w  ww .  j  a v a 2s . c o  m*/
        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.TeacherSpec.java

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

        @Override//from   w w w .  j  av  a2  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:com.baifendian.swordfish.execserver.engine.hive.HiveUtil.java

/**
 * ?//w  w w.  j a va  2  s .c  o m
 */
public static boolean isTokQuery(String sql) {
    if (StringUtils.isEmpty(sql)) {
        return false;
    }

    sql = sql.toUpperCase();

    if (sql.startsWith("SELECT")) {
        return true;
    }

    return false;
}

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 .j a v a 2 s .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:com.baifendian.swordfish.execserver.engine.hive.HiveUtil.java

/**
 * ? show ?show/desc/describe <p>/*w w  w  .  j  a va 2s  .c  o  m*/
 *
 * @return  'show/desc/describe' ? true, ? false
 */
public static boolean isLikeShowStm(String sql) {
    if (StringUtils.isEmpty(sql)) {
        return false;
    }

    sql = sql.toUpperCase();

    if (sql.startsWith("SHOW") || sql.startsWith("ANALYZE") || sql.startsWith("EXPLAIN")
            || sql.startsWith("DESC") || sql.startsWith("DESCRIBE")) {
        return true;
    }

    return false;
}

From source file:net.ontopia.topicmaps.query.utils.QueryUtils.java

/**
 * PUBLIC: Returns the {@link QueryProcessorFactoryIF} instance associated
 * with a specific query language. If the language is not available, null will
 * be returned. /*from  w w  w  .  j a v  a 2 s.  com*/
 * 
 * @param language the query language to be used (case insensitive).
 * @return the {@link QueryProcessorFactoryIF} instance for this language, or
 *         null, if not available.
 * @since 5.1
 */
public static QueryProcessorFactoryIF getQueryProcessorFactory(String language) {
    return qpFactoryMap.get(language.toUpperCase());
}

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

public static Specification<Appointment> nameLike(final String keyword) {
    return new Specification() {
        @Override/*w w  w  . j  a  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.  j a v a2s  .  com
        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.dental.spec.TypeProductSpec.java

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

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