#413 - ENH: Add ability to clear the OrderBy ... so that a default order by can be set in code and then cleared / overwritten

This commit is contained in:
Robin Bygrave
2015-09-18 11:39:47 +12:00
parent 9fc5d8a201
commit 5b26e77cfd
2 changed files with 57 additions and 0 deletions
@@ -198,6 +198,18 @@ public final class OrderBy<T> implements Serializable {
return list.hashCode();
}
/**
* Clear the orderBy removing any current order by properties.
* <p>
* This is intended to be used when some code creates a query with a
* 'default' order by clause and some other code may clear the 'default'
* order by clause and replace.
* </p>
*/
public void clear() {
list.clear();
}
/**
* A property and its ascending descending order.
*/