Example usage for org.apache.commons.lang3 StringUtils equalsIgnoreCase

List of usage examples for org.apache.commons.lang3 StringUtils equalsIgnoreCase

Introduction

In this page you can find the example usage for org.apache.commons.lang3 StringUtils equalsIgnoreCase.

Prototype

public static boolean equalsIgnoreCase(final CharSequence str1, final CharSequence str2) 

Source Link

Document

Compares two CharSequences, returning true if they represent equal sequences of characters, ignoring case.

null s are handled without exceptions.

Usage

From source file:com.inkubator.hrm.web.search.MedicalCareSearchParameter.java

public String getJabatan() {
    if (StringUtils.equalsIgnoreCase(getKeyParam(), "jabatan")) {
        jabatan = getParameter();/*  w  ww.ja  v a  2  s . c  o m*/
    } else {
        jabatan = null;
    }
    return jabatan;
}

From source file:com.qcadoo.mes.materialFlowResources.constants.ProductsToUpdate.java

public static ProductsToUpdate parseString(final String type) {
    for (ProductsToUpdate productsToUpdate : ProductsToUpdate.values()) {
        if (StringUtils.equalsIgnoreCase(type, productsToUpdate.getStringValue())) {
            return productsToUpdate;
        }/*from   w ww.  ja v a2 s  .  c om*/
    }
    throw new IllegalArgumentException("Couldn't parse ProductsToUpdate from string '" + type + "'");
}

From source file:com.inkubator.hrm.web.search.LoanNewTypeSearchParameter.java

public String getLoanTypeCode() {
    if (StringUtils.equalsIgnoreCase(getKeyParam(), "loanTypeCode")) {
        loanTypeCode = getParameter();//from   w  w w.  j a  va  2  s.  c  o  m
    } else {
        loanTypeCode = null;
    }
    return loanTypeCode;
}

From source file:net.eledge.android.europeana.search.model.enums.Language.java

public static Language safeValueOf(String name) {
    for (Language language : values()) {
        if (StringUtils.equalsIgnoreCase(language.toString(), name)) {
            return language;
        }/*from   w  w w.  ja v a 2 s  . c  o m*/
    }
    return null;
}

From source file:com.inkubator.hrm.web.search.PayTempUploadDataSearchParameter.java

public String getName() {
    name = StringUtils.equalsIgnoreCase(getKeyParam(), "name") ? getParameter() : null;
    return name;
}

From source file:com.iorga.iraj.util.QueryDSLUtils.java

@SuppressWarnings("unchecked")
public static <T extends Comparable<?>> OrderSpecifier<T> parseOrderSpecifier(final String orderByPath,
        final String orderByDirection, final Expression<?> baseExpression) {
    final String[] orderByPaths = orderByPath.split("\\.");
    Expression<?> listExpression = baseExpression;

    for (final String orderByPathElement : orderByPaths) {
        // get that public field part
        try {// w w w .jav  a  2s. c  om
            listExpression = (Expression<?>) listExpression.getClass().getField(orderByPathElement)
                    .get(listExpression);
        } catch (final Exception e) {
            throw new IllegalStateException("Cannot get " + listExpression + "." + orderByPathElement, e);
        }
    }

    if (StringUtils.equalsIgnoreCase(orderByDirection, "DESC")) {
        return ((ComparableExpressionBase<T>) listExpression).desc();
    } else {
        return ((ComparableExpressionBase<T>) listExpression).asc();
    }
}

From source file:com.inkubator.hrm.web.search.RecrutimentLetterSearchParameter.java

public String getSelectionType() {
    if (StringUtils.equalsIgnoreCase(getKeyParam(), "selectionType")) {
        selectionType = getParameter();/*from www  . ja  va 2 s . com*/
    } else {
        selectionType = null;
    }
    return selectionType;
}

From source file:com.qcadoo.mes.orders.constants.OrderType.java

public static OrderType parseString(final String rawOrderType) {
    String orderType = StringUtils.trim(rawOrderType);
    for (OrderType type : values()) {
        if (StringUtils.equalsIgnoreCase(type.getStringValue(), orderType)) {
            return type;
        }//  w w w.j  a va 2s  .  c o  m
    }

    return OTHER;
}

From source file:com.inkubator.hrm.web.search.RecruitMppApplyDetailSearchParameter.java

public String getJabatanName() {

    if (StringUtils.equalsIgnoreCase(getKeyParam(), "jabatanName")) {
        jabatanName = getParameter();//from  w  w w. j  av  a  2s  .  c  o  m
    } else {
        jabatanName = null;
    }
    return jabatanName;
}

From source file:com.qcadoo.mes.materialFlowResources.constants.DocumentType.java

public static DocumentType parseString(final String type) {
    for (DocumentType documentType : values()) {
        if (StringUtils.equalsIgnoreCase(type, documentType.getStringValue())) {
            return documentType;
        }/*w  ww .  j  a va2 s . c o m*/
    }
    throw new IllegalArgumentException("Couldn't parse DocumentType from string '" + type + "'");
}