2626import org .springframework .data .domain .Pageable ;
2727import org .springframework .data .domain .Sort ;
2828
29- public class UnifiedQueryPageableTest {
29+ public class UnifiedCriteriaPageableTest {
3030 @ ParameterizedTest
3131 @ CsvSource (value = {
3232 "0 | 10 | 0 | 10" ,
@@ -36,7 +36,7 @@ public class UnifiedQueryPageableTest {
3636 public void testOffsetAndLimit (
3737 int pageNumber , int pageSize , int expectedOffset , int expectedLimit ) {
3838 Pageable pageable = PageRequest .of (pageNumber , pageSize );
39- UnifiedQueryPageable p = UnifiedQueryPageable .of (pageable , c -> Optional .empty ());
39+ UnifiedCriteriaPageable p = UnifiedCriteriaPageable .of (pageable , c -> Optional .empty ());
4040
4141 Integer offset = p .offset ();
4242 Integer limit = p .limit ();
@@ -48,7 +48,7 @@ public void testOffsetAndLimit(
4848 @ Test
4949 public void testOffsetAndLimitWhenUnpaged () {
5050 Pageable pageable = Pageable .unpaged ();
51- UnifiedQueryPageable p = UnifiedQueryPageable .of (pageable , c -> Optional .empty ());
51+ UnifiedCriteriaPageable p = UnifiedCriteriaPageable .of (pageable , c -> Optional .empty ());
5252
5353 Integer offset = p .offset ();
5454 Integer limit = p .limit ();
@@ -61,7 +61,7 @@ public void testOffsetAndLimitWhenUnpaged() {
6161 public void testOrderBy () {
6262 Pageable pageable = PageRequest .of (0 , 10 , Sort .by ("name" ).ascending ());
6363 Person_ entity = new Person_ ();
64- UnifiedQueryPageable p = UnifiedQueryPageable .of (
64+ UnifiedCriteriaPageable p = UnifiedCriteriaPageable .of (
6565 pageable ,
6666 propertyName -> switch (propertyName ) {
6767 case "name" -> Optional .of (entity .name );
@@ -80,7 +80,7 @@ public void testOrderBy2() {
8080 Pageable pageable = PageRequest .of (0 , 10 ,
8181 Sort .by ("name" ).descending ().and (Sort .by ("age" ).ascending ()));
8282 Person_ entity = new Person_ ();
83- UnifiedQueryPageable p = UnifiedQueryPageable .of (
83+ UnifiedCriteriaPageable p = UnifiedCriteriaPageable .of (
8484 pageable ,
8585 propertyName -> switch (propertyName ) {
8686 case "name" -> Optional .of (entity .name );
@@ -100,7 +100,7 @@ public void testOrderBy2() {
100100 @ Test
101101 public void testOrderByWhenNonSort () {
102102 Pageable pageable = PageRequest .of (0 , 10 );
103- UnifiedQueryPageable p = UnifiedQueryPageable .of (
103+ UnifiedCriteriaPageable p = UnifiedCriteriaPageable .of (
104104 pageable ,
105105 propertyName -> Optional .empty ());
106106
@@ -116,7 +116,7 @@ public void testOrderByWhenNonSortAndSetDefault() {
116116 Pageable pageable = PageRequest .of (0 , 10 );
117117 Person_ entity = new Person_ ();
118118 Consumer <OrderByNameDeclaration > defaultOrder = c -> c .asc (entity .id );
119- UnifiedQueryPageable p = UnifiedQueryPageable .of (
119+ UnifiedCriteriaPageable p = UnifiedCriteriaPageable .of (
120120 pageable ,
121121 propertyName -> Optional .empty (),
122122 defaultOrder );
@@ -131,7 +131,7 @@ public void testOrderBySingleEntity() {
131131 Pageable pageable = PageRequest .of (0 , 10 ,
132132 Sort .by ("name" ).descending ().and (Sort .by ("age" ).ascending ()));
133133 Person_ entity = new Person_ ();
134- UnifiedQueryPageable p = UnifiedQueryPageable .from (pageable , entity );
134+ UnifiedCriteriaPageable p = UnifiedCriteriaPageable .from (pageable , entity );
135135
136136 Consumer <OrderByNameDeclaration > consumer = p .orderBy ();
137137
@@ -147,7 +147,7 @@ public void testOrderByWhenMissingProperties() {
147147 Pageable pageable = PageRequest .of (0 , 10 ,
148148 Sort .by ("dog" ).and (Sort .by ("name" )).and (Sort .by ("cat" )));
149149 Person_ entity = new Person_ ();
150- UnifiedQueryPageable p = UnifiedQueryPageable .from (pageable , entity );
150+ UnifiedCriteriaPageable p = UnifiedCriteriaPageable .from (pageable , entity );
151151
152152 Consumer <OrderByNameDeclaration > consumer = p .orderBy ();
153153
@@ -162,7 +162,7 @@ public void testOrderByWhenMissingAllProperties() {
162162 Sort .by ("dog" ).and (Sort .by ("cat" )));
163163 Person_ entity = new Person_ ();
164164 Consumer <OrderByNameDeclaration > defaultOrder = c -> c .desc (entity .age );
165- UnifiedQueryPageable p = UnifiedQueryPageable .from (pageable , entity , defaultOrder );
165+ UnifiedCriteriaPageable p = UnifiedCriteriaPageable .from (pageable , entity , defaultOrder );
166166
167167 Consumer <OrderByNameDeclaration > consumer = p .orderBy ();
168168
@@ -174,7 +174,7 @@ public void testOrderByWhenMissingPropertiesHandle() {
174174 Pageable pageable = PageRequest .of (0 , 10 ,
175175 Sort .by ("dog" ).and (Sort .by ("name" )).and (Sort .by ("cat" )));
176176 Person_ entity = new Person_ ();
177- UnifiedQueryPageable p = UnifiedQueryPageable .from (pageable , entity );
177+ UnifiedCriteriaPageable p = UnifiedCriteriaPageable .from (pageable , entity );
178178
179179 assertThatThrownBy (() -> p .orderBy (missingProperties -> {
180180 throw new IllegalArgumentException (
0 commit comments