Example usage for com.liferay.portal.kernel.util.comparator TeamNameComparator TeamNameComparator

List of usage examples for com.liferay.portal.kernel.util.comparator TeamNameComparator TeamNameComparator

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.util.comparator TeamNameComparator TeamNameComparator.

Prototype

public TeamNameComparator(boolean ascending) 

Source Link

Usage

From source file:com.liferay.site.teams.web.internal.search.TeamSearch.java

License:Open Source License

protected static OrderByComparator<Team> getOrderByComparator(String orderByCol, String orderByType) {

    OrderByComparator<Team> orderByComparator = null;

    boolean orderByAsc = false;

    if (orderByType.equals("asc")) {
        orderByAsc = true;/*from  w  w  w .ja  v a2  s.c o m*/
    }

    if (orderByCol.equals("name")) {
        orderByComparator = new TeamNameComparator(orderByAsc);
    }

    return orderByComparator;
}