@@ -7,11 +7,29 @@ public class DefaultPageInfo implements PageInfo {
77 private boolean hasPreviousPage ;
88 private boolean hasNextPage ;
99
10+ /**
11+ * @deprecated prefer {@link #DefaultPageInfo(ConnectionCursor, ConnectionCursor, boolean, boolean)}
12+ */
13+ @ Deprecated
14+ public DefaultPageInfo () {
15+ }
16+
17+ public DefaultPageInfo (ConnectionCursor startCursor , ConnectionCursor endCursor , boolean hasPreviousPage , boolean hasNextPage ) {
18+ this .startCursor = startCursor ;
19+ this .endCursor = endCursor ;
20+ this .hasPreviousPage = hasPreviousPage ;
21+ this .hasNextPage = hasNextPage ;
22+ }
23+
1024 @ Override
1125 public ConnectionCursor getStartCursor () {
1226 return startCursor ;
1327 }
1428
29+ /**
30+ * @deprecated prefer {@link #DefaultPageInfo(ConnectionCursor, ConnectionCursor, boolean, boolean)} and avoid mutation
31+ */
32+ @ Deprecated
1533 public void setStartCursor (ConnectionCursor startCursor ) {
1634 this .startCursor = startCursor ;
1735 }
@@ -21,6 +39,10 @@ public ConnectionCursor getEndCursor() {
2139 return endCursor ;
2240 }
2341
42+ /**
43+ * @deprecated prefer {@link #DefaultPageInfo(ConnectionCursor, ConnectionCursor, boolean, boolean)} and avoid mutation
44+ */
45+ @ Deprecated
2446 public void setEndCursor (ConnectionCursor endCursor ) {
2547 this .endCursor = endCursor ;
2648 }
@@ -30,6 +52,10 @@ public boolean isHasPreviousPage() {
3052 return hasPreviousPage ;
3153 }
3254
55+ /**
56+ * @deprecated prefer {@link #DefaultPageInfo(ConnectionCursor, ConnectionCursor, boolean, boolean)} and avoid mutation
57+ */
58+ @ Deprecated
3359 public void setHasPreviousPage (boolean hasPreviousPage ) {
3460 this .hasPreviousPage = hasPreviousPage ;
3561 }
@@ -39,6 +65,10 @@ public boolean isHasNextPage() {
3965 return hasNextPage ;
4066 }
4167
68+ /**
69+ * @deprecated prefer {@link #DefaultPageInfo(ConnectionCursor, ConnectionCursor, boolean, boolean)}
70+ */
71+ @ Deprecated
4272 public void setHasNextPage (boolean hasNextPage ) {
4373 this .hasNextPage = hasNextPage ;
4474 }
0 commit comments