Search in sources :

Example 1 with ScheduledJobSort

use of org.akaza.openclinica.dao.ScheduledJobSort in project OpenClinica by OpenClinica.

the class ScheduledJobTableFactory method setDataAndLimitVariables.

public void setDataAndLimitVariables(TableFacade tableFacade, List<ScheduledJobs> jobs) {
    Limit limit = tableFacade.getLimit();
    WebContext context = tableFacade.getWebContext();
    if (context != null) {
        studyId = Integer.parseInt(context.getParameter("studyId"));
        contextPath = context.getContextPath();
    }
    ScheduledJobSort scheduledJobSort = getScheduledJobSort(limit);
    int rowStart = limit.getRowSelect().getRowStart();
    int rowEnd = limit.getRowSelect().getRowEnd();
    Collection<ScheduledJobs> items = getFilteredItems(jobs, scheduledJobSort, rowStart, rowEnd);
}
Also used : ScheduledJobSort(org.akaza.openclinica.dao.ScheduledJobSort) WebContext(org.jmesa.web.WebContext) Limit(org.jmesa.limit.Limit)

Example 2 with ScheduledJobSort

use of org.akaza.openclinica.dao.ScheduledJobSort 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

ScheduledJobSort (org.akaza.openclinica.dao.ScheduledJobSort)2 Limit (org.jmesa.limit.Limit)1 Sort (org.jmesa.limit.Sort)1 SortSet (org.jmesa.limit.SortSet)1 WebContext (org.jmesa.web.WebContext)1