Search in sources :

Example 6 with SortSet

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

the class SubjectIdSDVFactory method getStudySubjectSDVSort.

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

Example 7 with SortSet

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

the class SDVUtil method setDataAndLimitVariablesSubjects.

public int setDataAndLimitVariablesSubjects(TableFacade tableFacade, int studyId, int studySubjectId, HttpServletRequest request) {
    Limit limit = tableFacade.getLimit();
    FilterSet filterSet = limit.getFilterSet();
    int totalRows = getTotalRowCountSubjects(filterSet, studyId, studySubjectId);
    tableFacade.setTotalRows(totalRows);
    SortSet sortSet = limit.getSortSet();
    int rowStart = limit.getRowSelect().getRowStart();
    int rowEnd = limit.getRowSelect().getRowEnd();
    Collection<SubjectSDVContainer> items = getFilteredItemsSubject(filterSet, sortSet, rowStart, rowEnd, studyId, studySubjectId, request);
    tableFacade.setItems(items);
    return totalRows;
}
Also used : FilterSet(org.jmesa.limit.FilterSet) Limit(org.jmesa.limit.Limit) SubjectSDVContainer(org.akaza.openclinica.controller.helper.table.SubjectSDVContainer) SortSet(org.jmesa.limit.SortSet)

Example 8 with SortSet

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

the class SDVUtil method getEventCRFSDVSort.

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

Example 9 with SortSet

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

the class StudyAuditLogTableFactory method getAuditLogStudySort.

/**
 * 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 StudyAuditLogSort getAuditLogStudySort(Limit limit) {
    StudyAuditLogSort auditLogStudySort = new StudyAuditLogSort();
    SortSet sortSet = limit.getSortSet();
    Collection<Sort> sorts = sortSet.getSorts();
    for (Sort sort : sorts) {
        String property = sort.getProperty();
        String order = sort.getOrder().toParam();
        auditLogStudySort.addSort(property, order);
    }
    return auditLogStudySort;
}
Also used : StudyAuditLogSort(org.akaza.openclinica.dao.managestudy.StudyAuditLogSort) Sort(org.jmesa.limit.Sort) StudyAuditLogSort(org.akaza.openclinica.dao.managestudy.StudyAuditLogSort) SortSet(org.jmesa.limit.SortSet)

Example 10 with SortSet

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

the class ScheduledJobTableFactory method getScheduledJobSort.

protected ScheduledJobSort getScheduledJobSort(Limit limit) {
    ScheduledJobSort scheduledJobSort = new ScheduledJobSort();
    SortSet sortSet = limit.getSortSet();
    Collection<Sort> sorts = sortSet.getSorts();
    for (Sort sort : sorts) {
        String property = sort.getProperty();
        String order = sort.getOrder().toParam();
        scheduledJobSort.addSort(property, order);
    }
    return scheduledJobSort;
}
Also used : ScheduledJobSort(org.akaza.openclinica.dao.ScheduledJobSort) ScheduledJobSort(org.akaza.openclinica.dao.ScheduledJobSort) 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