String getOrderDirectionFromSort(String sort) { switch (sort) { case 'END DATE': return 'ascending'; default: return 'descending'; } }