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;
}
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;
}
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;
}
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;
}
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;
}
Aggregations