Search in sources :

Example 1 with ListNotesSort

use of org.akaza.openclinica.dao.managestudy.ListNotesSort in project OpenClinica by OpenClinica.

the class ListNotesTableFactory method getListSubjectSort.

/**
     * A very custom way to sort the items. The AuditUserLoginSort acts as a command for the Hibernate criteria object. Take the Limit information and sort the
     * rows.
     *
     * @param limit
     *            The Limit to use.
     */
protected ListNotesSort getListSubjectSort(Limit limit) {
    ListNotesSort listNotesSort = new ListNotesSort();
    SortSet sortSet = limit.getSortSet();
    Collection<Sort> sorts = sortSet.getSorts();
    for (Sort sort : sorts) {
        String property = sort.getProperty();
        String order = sort.getOrder().toParam();
        listNotesSort.addSort(property, order);
    }
    return listNotesSort;
}
Also used : Sort(org.jmesa.limit.Sort) ListNotesSort(org.akaza.openclinica.dao.managestudy.ListNotesSort) ListNotesSort(org.akaza.openclinica.dao.managestudy.ListNotesSort) SortSet(org.jmesa.limit.SortSet)

Aggregations

ListNotesSort (org.akaza.openclinica.dao.managestudy.ListNotesSort)1 Sort (org.jmesa.limit.Sort)1 SortSet (org.jmesa.limit.SortSet)1