From 9c1d930fb8752ee6e15cefca1c56e61d82d38dd6 Mon Sep 17 00:00:00 2001 From: rob bygrave Date: Fri, 15 May 2020 14:06:06 +1200 Subject: [PATCH] #2012 - Change ExpressionList.orderBy(String) to return ExpressionList Plus #2011 remove @Deprecated for orderBy --- src/main/java/io/ebean/ExpressionList.java | 30 ++++++++++++++-------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/src/main/java/io/ebean/ExpressionList.java b/src/main/java/io/ebean/ExpressionList.java index b3e3f8b6c..5c7750cd3 100644 --- a/src/main/java/io/ebean/ExpressionList.java +++ b/src/main/java/io/ebean/ExpressionList.java @@ -70,30 +70,40 @@ public interface ExpressionList { */ ExpressionList order(String orderByClause); + /** + * Set the order by clause replacing the existing order by clause if there is + * one. + *

+ * This follows SQL syntax using commas between each property with the + * optional asc and desc keywords representing ascending and descending order + * respectively. + */ + ExpressionList orderBy(String orderBy); + /** * Return the OrderBy so that you can append an ascending or descending * property to the order by clause. *

* This will never return a null. If no order by clause exists then an 'empty' * OrderBy object is returned. - *

+ *

+ * This is the same as orderBy() */ OrderBy order(); /** - * Deprecated migrate to order(). + * Return the OrderBy so that you can append an ascending or descending + * property to the order by clause. + *

+ * This will never return a null. If no order by clause exists then an 'empty' + * OrderBy object is returned. + *

+ * This is the same as order() */ - @Deprecated OrderBy orderBy(); /** - * Deprecated migrate to {@link #order(String)} - */ - @Deprecated - Query orderBy(String orderBy); - - /** - * Deprecated migrate to {@link #order(String)} + * Deprecated migrate to {@link #orderBy(String)} */ @Deprecated Query setOrderBy(String orderBy);