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