View Javadoc
1   package de.dlr.shepard.common.search.services;
2   
3   import de.dlr.shepard.common.search.endpoints.BasicCollectionAttributes;
4   import de.dlr.shepard.context.collection.entities.Collection;
5   import java.util.List;
6   import java.util.Optional;
7   import lombok.Data;
8   import lombok.EqualsAndHashCode;
9   
10  @Data
11  @EqualsAndHashCode
12  public class PaginatedCollectionList {
13  
14    private List<Collection> results;
15    private Integer totalResults;
16    private String query;
17    private Optional<Integer> page;
18    private Optional<Integer> pageSize;
19    private BasicCollectionAttributes orderBy;
20    private Boolean orderDesc;
21  
22    public PaginatedCollectionList(
23      List<Collection> results,
24      Integer totalResults,
25      String query,
26      Optional<Integer> page,
27      Optional<Integer> pageSize,
28      BasicCollectionAttributes orderBy,
29      Boolean orderDesc
30    ) {
31      this.results = results;
32      this.totalResults = totalResults;
33      this.query = query;
34      this.page = page;
35      this.pageSize = pageSize;
36      this.orderBy = orderBy;
37      this.orderDesc = orderDesc;
38    }
39  }