List of usage examples for org.apache.commons.lang StringUtils EMPTY
String EMPTY
To view the source code for org.apache.commons.lang StringUtils EMPTY.
Click Source Link
""
. From source file:com.tera.common.util.ConsolePrinter.java
/** * @param data ByteBuffer or ChannelBuffer * @return//ww w . j av a 2 s. c o m */ public static String toHex(Object data) { if (data instanceof ByteBuffer) { return toHex((ByteBuffer) data); } else if (data instanceof ChannelBuffer) { return toHex((ChannelBuffer) data); } return StringUtils.EMPTY; }
From source file:com.careerly.utils.TextUtils.java
/** * ? /*from ww w . ja v a2 s .c o m*/ * * @param text ?? * @return ?? */ public static String convertTraditionalChineseNumber2ArabicNumber(String text) { if (StringUtils.isBlank(text)) { return StringUtils.EMPTY; } return StringUtils.replaceEach(text, new String[] { "", "", "", "??", "", "?", "", "", "?", "" }, new String[] { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" }); }
From source file:com.nec.harvest.util.StringUtil.java
/** * Remove comma character in a string/*from w ww . java 2 s .co m*/ * * @param text * @return */ public static String removeCommaChar(String text) { if (StringUtils.isEmpty(text)) { return StringUtils.EMPTY; } return text.replaceAll(",", StringUtils.EMPTY); }
From source file:com.sugaronrest.restapicalls.QueryBuilder.java
/** * Build the where clause part of a SugarCRM query. * * @param predicates The json predicates. * @return The formatted query.// w w w . j a v a 2 s .c o m */ public static String getWhereClause(List<JsonPredicate> predicates) { if ((predicates == null) || (predicates.size() == 0)) { return StringUtils.EMPTY; } StringBuilder queryBuilder = new StringBuilder(); String subQuery = StringUtils.EMPTY; for (JsonPredicate predicate : predicates) { switch (predicate.operator) { case Equal: subQuery = predicate.isNumeric ? String.format("%s = %s", predicate.jsonName, predicate.value) : String.format("%s = '%s'", predicate.jsonName, predicate.value); break; case GreaterThan: subQuery = predicate.isNumeric ? String.format("%s > %s", predicate.jsonName, predicate.value) : String.format("%s > '%s'", predicate.jsonName, predicate.value); break; case GreaterThanOrEqualTo: subQuery = predicate.isNumeric ? String.format("%s >= %s", predicate.jsonName, predicate.value) : String.format("%s >= '%s'", predicate.jsonName, predicate.value); break; case LessThan: subQuery = predicate.isNumeric ? String.format("%s < %s", predicate.jsonName, predicate.value) : String.format("%s < '%s'", predicate.jsonName, predicate.value); break; case LessThanOrEqualTo: subQuery = predicate.isNumeric ? String.format("%s <= %s", predicate.jsonName, predicate.value) : String.format("%s <= '%s'", predicate.jsonName, predicate.value); break; case Contains: subQuery = predicate.jsonName + " LIKE '%" + predicate.value + "%'"; break; case StartsWith: subQuery = predicate.jsonName + " LIKE '" + predicate.value + "%'"; break; case EndsWith: subQuery = predicate.jsonName + " LIKE '%" + predicate.value + "'"; break; case Between: subQuery = predicate.isNumeric ? String.format("%s BETWEEN %s AND %s", predicate.jsonName, predicate.fromValue, predicate.toValue) : String.format("%s BETWEEN '%s' AND '%s'", predicate.jsonName, predicate.fromValue, predicate.toValue); break; case WhereIn: subQuery = String.format("%s IN (%s)", predicate.jsonName, predicate.value); break; } queryBuilder.append(subQuery); queryBuilder.append(" AND "); } String query = queryBuilder.toString(); if (!StringUtils.isNotBlank(query)) { return StringUtils.EMPTY; } query = StringUtils.removeEnd(query.trim(), "AND"); query = " " + query.trim() + " "; return query; }
From source file:com.amalto.core.history.accessor.NoOpAccessor.java
public String get() { return StringUtils.EMPTY; }
From source file:com.nec.harvest.provider.PageTitleProvider.java
/** * Get the title of page for every HTTP Request * /*from w ww .j a va 2s .c om*/ * @return */ public String getTitle() { final String title = (String) getRequest().getAttribute(BaseController.TITLE); if (StringUtils.isNotEmpty(title)) { return title; } return StringUtils.EMPTY; }
From source file:com.ms.commons.utilities.StaticContentDeploy.java
public static synchronized void init() { String staticVersion = getStaticVersion(); if (StringUtils.isBlank(staticVersion) || StringUtils.equals(staticVersion, "0") || !staticVersion.matches("\\d+")) { staticVersion = StringUtils.EMPTY; }// w w w . j a v a 2s.co m StaticContentDeploy.jsVersion = staticVersion; StaticContentDeploy.imgVersion = staticVersion; StaticContentDeploy.cssVersion = staticVersion; }
From source file:com.zb.app.web.tools.WebUserTools.java
public static String getSiteName() { return current() == null ? StringUtils.EMPTY : current().getSiteName(); }
From source file:com.amalto.core.load.process.ProcessedEndElement.java
public ProcessedEndElement(String uri, String localName, String qName) { this.uri = uri == null ? StringUtils.EMPTY : uri; // SAX consumer (such as Qizx) doesn't like null NS. this.localName = localName; this.qName = qName; }
From source file:com.amalto.core.storage.hibernate.NotIndexedBridge.java
public String objectToString(Object object) { return StringUtils.EMPTY; }