Skip to content

Commit

Permalink
Remove pageSize from RestSessionCollection
Browse files Browse the repository at this point in the history
  • Loading branch information
tosametal committed Aug 26, 2019
1 parent ff63080 commit 2fecfdf
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ public interface RestSessionCollection

int getRecordsNumber();

int getPageSize();

static ImmutableRestSessionCollection.Builder builder()
{
return ImmutableRestSessionCollection.builder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ public RestSessionCollection getSessions(
sessions = ss.getSessionsOfProject(proj.getId(), validPageSize, Optional.fromNullable(lastId), page);
}

return RestModels.sessionCollection(ps, sessions, sessionRecordsNumber, validPageSize);
return RestModels.sessionCollection(ps, sessions, sessionRecordsNumber);
}, ResourceNotFoundException.class);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ public static RestSession session(StoredSessionWithLastAttempt session, String p
}

static RestSessionCollection sessionCollection(
ProjectStore ps, List<StoredSessionWithLastAttempt> sessions, int recordsNumber, int pageSize)
ProjectStore ps, List<StoredSessionWithLastAttempt> sessions, int recordsNumber)
{
ProjectMap projs = ps.getProjectsByIdList(
sessions.stream()
Expand All @@ -268,7 +268,6 @@ static RestSessionCollection sessionCollection(
return RestSessionCollection.builder()
.sessions(collection)
.recordsNumber(recordsNumber)
.pageSize(pageSize)
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public RestSessionCollection getSessions(

Integer page = Optional.fromNullable(pageNumber).or(1);
List<StoredSessionWithLastAttempt> sessions = ss.getSessions(validPageSize, Optional.fromNullable(lastId), page);
return RestModels.sessionCollection(rs, sessions, sessionRecordsNumber, validPageSize);
return RestModels.sessionCollection(rs, sessions, sessionRecordsNumber);
});
}

Expand Down

0 comments on commit 2fecfdf

Please sign in to comment.