My Application currently serves requests for data, and can order the data to the users requirements, using RequestParams
@RequestParam(value = "orderBy", required = false, defaultValue = "severity") String orderBy,
@RequestParam(value = "order", required = false, defaultValue = "desc") String order,
You get the idea.
However, I want to implement multi sorting, (ordering by severity, then matching severities are ordered by date). Code wise, this is easy (google-collections to the rescue), but how would I expose this to the user calling the service?
Ideally, I wouldn't want multiple orderBy @RequestParams (orderBy2, orderBy3, orderBy4) , as that's just plain ugly.
Thoughts?
Cheers