Allow combining Sort and TypedSort using Sort.and(…).
We now retain properly the collection of orders by using accessor methods instead of relying on using the orders field. TypedSort orders are not using the orders field, instead they iterate over recorded persistent property paths.
Closes#2103
Original pull request: #2377.
@ -170,7 +170,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
@@ -170,7 +170,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
}
publicbooleanisSorted(){
return!orders.isEmpty();
return!isEmpty();
}
publicbooleanisUnsorted(){
@ -188,7 +188,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
@@ -188,7 +188,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
@ -240,7 +240,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
@@ -240,7 +240,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
Sortthat=(Sort)obj;
returnthis.orders.equals(that.orders);
returntoList().equals(that.toList());
}
/*
@ -261,7 +261,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
@@ -261,7 +261,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
@ -272,7 +272,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord
@@ -272,7 +272,7 @@ public class Sort implements Streamable<org.springframework.data.domain.Sort.Ord