Class PaginatedEntityDTO<D extends GenericDTO>
java.lang.Object
com.bluebell.greenhouse.platform.models.api.dto.PaginatedEntityDTO<D>
- Type Parameters:
D- entity that extendsGenericDTO
- Direct Known Subclasses:
PaginatedActionEventDTO, PaginatedExchangeDTO, PaginatedJobSummaryDTO, PaginatedMarketPriceDTO, PaginatedPositionSummaryDTO, PaginatedStrategyDTO, PaginatedStrategyImplementationDTO, PaginatedSymbolDTO, PaginatedTransactionDTO, PaginatedUserDTO
Class representation of a collection of
GenericDTOs with associated page information.- Version:
- 3.0.5
- Author:
- Stephen Prizio
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <D extends GenericDTO>
PaginatedEntityDTO<D> Creates a newPaginatedEntityDTOfrom aPageand dto list.static <E, D extends GenericDTO>
PaginatedEntityDTO<D> Creates a newPaginatedEntityDTOfrom aPageand mapper function.
-
Constructor Details
-
PaginatedEntityDTO
public PaginatedEntityDTO()
-
-
Method Details
-
from
public static <E, D extends GenericDTO> PaginatedEntityDTO<D> from(org.springframework.data.domain.Page<E> page, Function<List<E>, List<D>> mapper) Creates a newPaginatedEntityDTOfrom aPageand mapper function.- Type Parameters:
E- page entity typeD- dto type- Parameters:
page-Pagemapper- mapper from the page's entities to theirGenericDTOs- Returns:
PaginatedEntityDTO
-
from
public static <D extends GenericDTO> PaginatedEntityDTO<D> from(org.springframework.data.domain.Page<?> page, List<D> entities) Creates a newPaginatedEntityDTOfrom aPageand dto list.- Type Parameters:
D- dto type- Parameters:
page-Pageentities-Listof dto entities- Returns:
PaginatedEntityDTO
-