Search in sources :

Example 11 with SortSet

use of org.jmesa.limit.SortSet in project OpenClinica by OpenClinica.

the class ListSubjectTableFactory 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 ListSubjectSort getListSubjectSort(Limit limit) {
    ListSubjectSort listSubjectSort = new ListSubjectSort();
    SortSet sortSet = limit.getSortSet();
    Collection<Sort> sorts = sortSet.getSorts();
    for (Sort sort : sorts) {
        String property = sort.getProperty();
        String order = sort.getOrder().toParam();
        listSubjectSort.addSort(property, order);
    }
    return listSubjectSort;
}
Also used : ListSubjectSort(org.akaza.openclinica.dao.submit.ListSubjectSort) Sort(org.jmesa.limit.Sort) ListSubjectSort(org.akaza.openclinica.dao.submit.ListSubjectSort) SortSet(org.jmesa.limit.SortSet)

Example 12 with SortSet

use of org.jmesa.limit.SortSet in project OpenClinica by OpenClinica.

the class ListDiscNotesForCRFTableFactory method getListEventsForSubjectSort.

protected ListDiscNotesForCRFSort getListEventsForSubjectSort(Limit limit) {
    ListDiscNotesForCRFSort listDiscNotesForCRFSort = new ListDiscNotesForCRFSort();
    SortSet sortSet = limit.getSortSet();
    Collection<Sort> sorts = sortSet.getSorts();
    for (Sort sort : sorts) {
        String property = sort.getProperty();
        String order = sort.getOrder().toParam();
        listDiscNotesForCRFSort.addSort(property, order);
    }
    return listDiscNotesForCRFSort;
}
Also used : ListDiscNotesForCRFSort(org.akaza.openclinica.dao.managestudy.ListDiscNotesForCRFSort) ListDiscNotesForCRFSort(org.akaza.openclinica.dao.managestudy.ListDiscNotesForCRFSort) Sort(org.jmesa.limit.Sort) SortSet(org.jmesa.limit.SortSet)

Example 13 with SortSet

use of org.jmesa.limit.SortSet 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)

Example 14 with SortSet

use of org.jmesa.limit.SortSet in project OpenClinica by OpenClinica.

the class ListStudySubjectTableFactory method getSubjectSort.

/**
 * A very custom way to sort the items. The PresidentSort acts as a command for the Hibernate criteria object. There
 * are probably many ways to do this, but this is the most flexible way I have found. The point is you need to
 * somehow take the Limit information and sort the rows.
 *
 * @param limit
 *            The Limit to use.
 */
protected FindSubjectsSort getSubjectSort(Limit limit) {
    FindSubjectsSort auditUserLoginSort = new FindSubjectsSort();
    SortSet sortSet = limit.getSortSet();
    Collection<Sort> sorts = sortSet.getSorts();
    for (Sort sort : sorts) {
        String property = sort.getProperty();
        String order = sort.getOrder().toParam();
        auditUserLoginSort.addSort(property, order);
    }
    return auditUserLoginSort;
}
Also used : FindSubjectsSort(org.akaza.openclinica.dao.managestudy.FindSubjectsSort) FindSubjectsSort(org.akaza.openclinica.dao.managestudy.FindSubjectsSort) Sort(org.jmesa.limit.Sort) SortSet(org.jmesa.limit.SortSet)

Aggregations

SortSet (org.jmesa.limit.SortSet)14 Sort (org.jmesa.limit.Sort)13 ListDiscNotesSubjectSort (org.akaza.openclinica.dao.managestudy.ListDiscNotesSubjectSort)2 SubjectSDVContainer (org.akaza.openclinica.controller.helper.table.SubjectSDVContainer)1 EventCRFSDVSort (org.akaza.openclinica.dao.EventCRFSDVSort)1 ScheduledJobSort (org.akaza.openclinica.dao.ScheduledJobSort)1 StudySubjectSDVSort (org.akaza.openclinica.dao.StudySubjectSDVSort)1 AuditUserLoginSort (org.akaza.openclinica.dao.hibernate.AuditUserLoginSort)1 ViewRuleAssignmentSort (org.akaza.openclinica.dao.hibernate.ViewRuleAssignmentSort)1 FindSubjectsSort (org.akaza.openclinica.dao.managestudy.FindSubjectsSort)1 ListDiscNotesForCRFSort (org.akaza.openclinica.dao.managestudy.ListDiscNotesForCRFSort)1 ListEventsForSubjectSort (org.akaza.openclinica.dao.managestudy.ListEventsForSubjectSort)1 ListNotesSort (org.akaza.openclinica.dao.managestudy.ListNotesSort)1 StudyAuditLogSort (org.akaza.openclinica.dao.managestudy.StudyAuditLogSort)1 ListSubjectSort (org.akaza.openclinica.dao.submit.ListSubjectSort)1 FilterSet (org.jmesa.limit.FilterSet)1 Limit (org.jmesa.limit.Limit)1