Skip to content

Commit 9f92ee6

Browse files
committed
Renamed
1 parent 6f3d14d commit 9f92ee6

File tree

5 files changed

+22
-22
lines changed

5 files changed

+22
-22
lines changed

src/main/java/graphql/annotations/connection/AbstarctPaginatedData.java renamed to src/main/java/graphql/annotations/connection/AbstractPaginatedData.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616

1717
import java.util.Iterator;
1818

19-
public abstract class AbstarctPaginatedData<T> implements PaginatedData<T> {
19+
public abstract class AbstractPaginatedData<T> implements PaginatedData<T> {
2020

21-
private boolean hasPreviousPage;
22-
private boolean hasNextPage;
23-
private Iterable<T> data;
21+
boolean hasPreviousPage;
22+
boolean hasNextPage;
23+
Iterable<T> data;
2424

25-
public AbstarctPaginatedData(boolean hasPreviousPage, boolean hasNextPage, Iterable<T> data) {
25+
public AbstractPaginatedData(boolean hasPreviousPage, boolean hasNextPage, Iterable<T> data) {
2626
this.hasNextPage = hasNextPage;
2727
this.hasPreviousPage = hasPreviousPage;
2828
this.data = data;

src/main/java/graphql/annotations/connection/EnhancedConnectionFetcher.java renamed to src/main/java/graphql/annotations/connection/PaginatedDataConnectionFetcher.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@
3232
*
3333
* @param <T> the entity type that is paginated
3434
*/
35-
public class EnhancedConnectionFetcher<T> implements ConnectionFetcher<T> {
35+
public class PaginatedDataConnectionFetcher<T> implements ConnectionFetcher<T> {
3636

3737
private DataFetcher<PaginatedData<T>> paginationDataFetcher;
3838

39-
public EnhancedConnectionFetcher(DataFetcher<PaginatedData<T>> paginationDataFetcher) {
39+
public PaginatedDataConnectionFetcher(DataFetcher<PaginatedData<T>> paginationDataFetcher) {
4040
this.paginationDataFetcher = paginationDataFetcher;
4141
}
4242

src/main/java/graphql/annotations/connection/ConnectionTypeValidator.java renamed to src/main/java/graphql/annotations/connection/PaginatedDataConnectionTypeValidator.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/**
22
* Copyright 2016 Yurii Rashkovskii
3-
*
3+
* <p>
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
66
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
7+
* <p>
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
* <p>
1010
* Unless required by applicable law or agreed to in writing, software
1111
* distributed under the License is distributed on an "AS IS" BASIS,
1212
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,7 +20,7 @@
2020
import java.lang.reflect.Field;
2121
import java.lang.reflect.Method;
2222

23-
public class ConnectionTypeValidator {
23+
public class PaginatedDataConnectionTypeValidator implements ConnectionValidator {
2424

2525
public void validate(AccessibleObject field) {
2626
if (field instanceof Field) {

src/test/java/graphql/annotations/connection/GraphQLConnectionTest.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public TestListField(List<Obj> objs) {
7474
@GraphQLField
7575
@GraphQLConnection
7676
public PaginatedData<Obj> objs() {
77-
return new AbstarctPaginatedData<Obj>(false, true, objs) {
77+
return new AbstractPaginatedData<Obj>(false, true, objs) {
7878
@Override
7979
public String getCursor(Obj entity) {
8080
return entity.id;
@@ -94,7 +94,7 @@ public TestListField2(List<Obj> objs) {
9494
@GraphQLField
9595
@GraphQLConnection
9696
public PaginatedData<Obj> objs() {
97-
return new AbstarctPaginatedData<Obj>(false, true, objs) {
97+
return new AbstractPaginatedData<Obj>(false, true, objs) {
9898
@Override
9999
public String getCursor(Obj entity) {
100100
return entity.id;
@@ -109,7 +109,7 @@ public static class TestConnectionOnField {
109109
public PaginatedData<Obj> objs;
110110

111111
public TestConnectionOnField(List<Obj> objs) {
112-
this.objs = new AbstarctPaginatedData<Obj>(false, true, objs) {
112+
this.objs = new AbstractPaginatedData<Obj>(false, true, objs) {
113113
@Override
114114
public String getCursor(Obj entity) {
115115
return entity.id;
@@ -144,7 +144,7 @@ public PaginatedData<Obj> getObjs(DataFetchingEnvironment environment) {
144144
if (first != null && first < objs.size()) {
145145
actualobjs = actualobjs.subList(0, first);
146146
}
147-
return new AbstarctPaginatedData<Obj>(false, true, actualobjs) {
147+
return new AbstractPaginatedData<Obj>(false, true, actualobjs) {
148148
@Override
149149
public String getCursor(Obj entity) {
150150
return entity.id;
@@ -164,7 +164,7 @@ public PaginatedData<Obj> getObjStream(DataFetchingEnvironment environment) {
164164

165165
Obj[] a = new Obj[actualobjs.size()];
166166
Iterable<Obj> data = Stream.of(actualobjs.toArray(a))::iterator;
167-
return new AbstarctPaginatedData<Obj>(false, true, data) {
167+
return new AbstractPaginatedData<Obj>(false, true, data) {
168168
@Override
169169
public String getCursor(Obj entity) {
170170
return entity.id;
@@ -182,7 +182,7 @@ public PaginatedData<Obj> getObjStreamWithParam(DataFetchingEnvironment environm
182182
filteredObjs = filteredObjs.subList(0, first);
183183
}
184184
Iterable<Obj> objIterable = filteredObjs::iterator;
185-
return new AbstarctPaginatedData<Obj>(false, true, objIterable) {
185+
return new AbstractPaginatedData<Obj>(false, true, objIterable) {
186186
@Override
187187
public String getCursor(Obj entity) {
188188
return entity.id;
@@ -200,7 +200,7 @@ public PaginatedData<Obj> getNonNullObjs(DataFetchingEnvironment environment) {
200200
if (first != null && first < objs.size()) {
201201
actualobjs = actualobjs.subList(0, first);
202202
}
203-
return new AbstarctPaginatedData<Obj>(false, true, actualobjs) {
203+
return new AbstractPaginatedData<Obj>(false, true, actualobjs) {
204204
@Override
205205
public String getCursor(Obj entity) {
206206
return entity.id;
@@ -347,7 +347,7 @@ public TestCustomConnection(List<Obj> objs) {
347347
@GraphQLField
348348
@GraphQLConnection(connection = CustomConnection.class)
349349
public PaginatedData<Obj> getObjs() {
350-
return new AbstarctPaginatedData<Obj>(true, false, objs) {
350+
return new AbstractPaginatedData<Obj>(true, false, objs) {
351351
@Override
352352
public String getCursor(Obj entity) {
353353
return entity.id;

src/test/java/graphql/annotations/connection/GraphQLEnhancedConnectionTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public String getVal() {
7777

7878
public static class TestListField {
7979
@GraphQLField
80-
@GraphQLConnection(connection = EnhancedConnectionFetcher.class)
80+
@GraphQLConnection(connection = PaginatedDataConnectionFetcher.class)
8181
@GraphQLDataFetcher(GoodConnectionDataFetcher.class)
8282
public PaginatedData<Obj> objs;
8383

@@ -96,7 +96,7 @@ public PaginatedData<Obj> get(DataFetchingEnvironment environment) {
9696
if (first != null && first <= 3) {
9797
objs = objs.subList(0, first);
9898
}
99-
return new AbstarctPaginatedData<Obj>(false, true, objs) {
99+
return new AbstractPaginatedData<Obj>(false, true, objs) {
100100
@Override
101101
public String getCursor(Obj entity) {
102102
return entity.getId();

0 commit comments

Comments
 (0)