use of org.olat.modules.portfolio.ui.PageListDataModel.PageCols in project openolat by klemens.
the class PageListSortableDataModelDelegate method sort.
@Override
protected void sort(List<PortfolioElementRow> rows) {
Comparator<PortfolioElementRow> comparator = new PageCreationDateComparator();
if (getOrderBy() != null) {
int columnIndex = getColumnIndex();
PageCols column = PageCols.values()[columnIndex];
switch(column) {
case key:
comparator = new PageCreationDateComparator();
break;
case status:
comparator = new StatusComparator();
break;
case comment:
comparator = new CommentsComparator();
break;
default:
comparator = new DefaultComparator();
break;
}
}
if (!isAsc()) {
comparator = new ReverseComparator(comparator);
}
Collections.sort(rows, new ClassicComparator(comparator));
}
use of org.olat.modules.portfolio.ui.PageListDataModel.PageCols in project OpenOLAT by OpenOLAT.
the class PageListSortableDataModelDelegate method sort.
@Override
protected void sort(List<PortfolioElementRow> rows) {
Comparator<PortfolioElementRow> comparator = new PageCreationDateComparator();
if (getOrderBy() != null) {
int columnIndex = getColumnIndex();
PageCols column = PageCols.values()[columnIndex];
switch(column) {
case key:
comparator = new PageCreationDateComparator();
break;
case status:
comparator = new StatusComparator();
break;
case comment:
comparator = new CommentsComparator();
break;
default:
comparator = new DefaultComparator();
break;
}
}
if (!isAsc()) {
comparator = new ReverseComparator(comparator);
}
Collections.sort(rows, new ClassicComparator(comparator));
}
Aggregations