List of usage examples for org.apache.commons.lang StringUtils lowerCase
public static String lowerCase(String str)
Converts a String to lower case as per String#toLowerCase() .
From source file:jp.co.tis.gsp.tools.dba.dialect.PostgresqlDialect.java
@Override public String normalizeUserName(String userName) { return StringUtils.lowerCase(userName); }
From source file:nc.noumea.mairie.organigramme.viewmodel.TreeViewModel.java
/** * Cre une feuille unitaire et lui ajoute un vnement onClick qui * permettra d'effecture des oprations sur cette feuille * /* w ww . java 2s .c o m*/ * @param ul * : le {@link Ul} parent * @param entiteDto * : l'{@link EntiteDto} a transformer en {@link Li} * @return le composant {@link Li} reprsentant l'entit */ public Li creeLiEntite(Ul ul, final EntiteDto entiteDto) { Li li = new Li(); String sigleSplit = OrganigrammeUtil.splitByNumberAndSeparator(entiteDto.getSigle(), 8, "\n"); li.appendChild(new Label(sigleSplit)); li.setParent(ul); li.setSclass("statut-" + StringUtils.lowerCase(entiteDto.getStatut().name())); li.setDynamicProperty("title", creeTooltipEntite(entiteDto)); boolean couleurEntiteTypeEntiteRenseigne = entiteDto.getTypeEntite() != null && !StringUtils.isBlank(entiteDto.getTypeEntite().getCouleurEntite()); if (couleurEntiteTypeEntiteRenseigne) { String style = "background-color:" + entiteDto.getTypeEntite().getCouleurEntite() + "; color:" + entiteDto.getTypeEntite().getCouleurTexte() + ";"; if (entiteDto.getStatut().equals(Statut.PREVISION)) { style += "border-color: " + entiteDto.getTypeEntite().getCouleurTexte() + ";"; } li.setStyle(style); } else { li.setStyle("background-color:#FFFFCF; color:#000000;"); } li.setId("entite-id-" + entiteDto.getId().toString()); // On maintient une map permettant d'aller plus vite lors d'un click // event pour retrouver l'EntiteDto correspondant l'id du Li organigrammeViewModel.mapIdLiEntiteDto.put(li.getId(), entiteDto); return li; }
From source file:jp.co.tis.gsp.tools.dba.dialect.PostgresqlDialect.java
@Override public String normalizeSchemaName(String schemaName) { return StringUtils.lowerCase(schemaName); }
From source file:jp.co.tis.gsp.tools.dba.dialect.PostgresqlDialect.java
@Override public String normalizeTableName(String tableName) { return StringUtils.lowerCase(tableName); }
From source file:jp.co.tis.gsp.tools.dba.dialect.PostgresqlDialect.java
@Override public String normalizeColumnName(String colmunName) { return StringUtils.lowerCase(colmunName); }
From source file:com.googlecode.jmxtrans.model.output.InfluxDbWriterTests.java
private String enumValueToAttribute(ResultAttribute attribute) { String[] split = attribute.name().split("_"); return StringUtils.lowerCase(split[0]) + WordUtils.capitalizeFully(split[1]); }
From source file:com.ah.ui.actions.teacherView.TvRedirectionAction.java
/** * Get classes which are taught by the current teacher user. * * @return a <code>List</code> of <code>CheckItem</code> objects, <code>id</code> is the index ID of class * in database table, <code>value</code> is spelled by CLASS_NAME + (SUBJECT). * @author Joseph Chen//from ww w . jav a2 s.c o m */ public List<CheckItem> getTeacherClassList() { List<CheckItem> items = new ArrayList<CheckItem>(); /* * find classes from database */ List<TvClass> bos = QueryUtil.executeQuery(TvClass.class, null, // new FilterParams("teacherId", this.getUserContext().getUserName()), new FilterParams("lower(teacherId)", StringUtils.lowerCase(this.getUserContext().getEmailAddress())), // fix bug 23956 in Geneva,make VHM with IDM can create teacher this.getDomainId(), this); if (bos.isEmpty()) { items.add(new CheckItem((long) CHECK_ITEM_ID_NONE, MgrUtil.getUserMessage("config.optionsTransfer.none"))); return items; } /* * put the most wanted class at the first place */ List<TvClass> orderedClass; if (bos.size() > 1) { orderedClass = moveTopClass(bos); } else { orderedClass = bos; } /* * set initial subject and teacher */ TvClass currentClass = orderedClass.get(0); this.subject = currentClass.getSubject(); this.teacher = currentClass.getTeacherId(); /* * add class info to CheckItem list */ for (TvClass tvClass : orderedClass) { String itemValue = new StringBuffer(tvClass.getClassName()).append("(").append(tvClass.getSubject()) .append(")").toString(); items.add(new CheckItem(tvClass.getId(), itemValue)); } return items; }
From source file:net.sourceforge.fenixedu.util.UniqueAcronymCreator.java
private static boolean isValidRejection(String string) { if (rejectionSet.contains(StringUtils.lowerCase(string))) { if (logger.isDebugEnabled()) { logger.info("isValidRejection, true -> " + string); }//ww w .j a v a2 s . co m return true; } if (logger.isDebugEnabled()) { logger.info("isValidRejection, false -> " + string); } return false; }
From source file:name.marcelomorales.siqisiqi.openjpa.impl.OrmFinderImpl.java
protected Predicate newFullTextPredicate(CriteriaBuilder cb, Root<T> p, String terms) { LinkedList<Predicate> predicatesOr = Lists.newLinkedList(); Iterable<Path<String>> fullTexts = settings.getFullTexts(p, persistentClass); if (fullTexts != null) { for (Path<String> x : fullTexts) { StringTokenizer tokenizer = new StringTokenizer(terms, " \t\n\r\f,.;:/"); LinkedList<Predicate> predicatesAnd = Lists.newLinkedList(); while (tokenizer.hasMoreTokens()) { String token = "%" + tokenizer.nextToken() + "%"; predicatesAnd.add(cb.like(cb.lower(x), StringUtils.lowerCase(token))); }/*w w w. ja v a 2 s . c o m*/ predicatesOr.add(cb.and(predicatesAnd.toArray(new Predicate[predicatesAnd.size()]))); } } final Predicate[] restrictions = predicatesOr.toArray(new Predicate[predicatesOr.size()]); return cb.or(restrictions); }
From source file:com.vecna.dbDiff.hibernate.HibernateMappingsConverter.java
/** * Convert a Hibernate index representation to a {@link RelationalIndex}. * @param mappedIndex hibernate index.//from ww w . java2 s . co m * @param table the table the index applies to. * @return a {@link RelationalIndex} representation of the index. */ private RelationalIndex convertIndex(Index mappedIndex, RelationalTable table) { @SuppressWarnings("unchecked") Iterator<org.hibernate.mapping.Column> mappedColumns = mappedIndex.getColumnIterator(); return convertIndex(StringUtils.lowerCase(mappedIndex.getName()), mappedColumns, table); }