Search in sources :

Example 1 with SortSet

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

the class AuditUserLoginTableFactory method getAuditUserLoginSort.

/**
 * 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 AuditUserLoginSort getAuditUserLoginSort(Limit limit) {
    AuditUserLoginSort auditUserLoginSort = new AuditUserLoginSort();
    SortSet sortSet = limit.getSortSet();
    if (sortSet != null) {
        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 : AuditUserLoginSort(org.akaza.openclinica.dao.hibernate.AuditUserLoginSort) Sort(org.jmesa.limit.Sort) AuditUserLoginSort(org.akaza.openclinica.dao.hibernate.AuditUserLoginSort) SortSet(org.jmesa.limit.SortSet)

Example 2 with SortSet

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

the class ListEventsForSubjectTableFactory method getListEventsForSubjectSort.

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

Example 3 with SortSet

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

the class DiscNotesSubjectStatisticsFactory method getSubjectSort.

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

Example 4 with SortSet

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

the class ViewRuleAssignmentTableFactory method getViewRuleAssignmentSort.

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

Example 5 with SortSet

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

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