use of com.netflix.metacat.common.server.connectors.model.PartitionListRequest in project metacat by Netflix.
the class ConverterUtil method toPartitionListRequest.
/**
* Creates the partition list connector request.
*
* @param partitionsRequestDto request containing the filter and other properties used for listing
* @param pageable pageable info
* @param sort sort info
* @return connector request
*/
public PartitionListRequest toPartitionListRequest(final GetPartitionsRequestDto partitionsRequestDto, final Pageable pageable, final Sort sort) {
if (partitionsRequestDto != null) {
if (partitionsRequestDto.getIncludePartitionDetails() == null) {
partitionsRequestDto.setIncludePartitionDetails(false);
}
if (partitionsRequestDto.getIncludeAuditOnly() == null) {
partitionsRequestDto.setIncludeAuditOnly(false);
}
final PartitionListRequest result = mapper.map(partitionsRequestDto, PartitionListRequest.class);
result.setPageable(pageable);
result.setSort(sort);
return result;
} else {
return new PartitionListRequest(null, null, false, pageable, sort, false);
}
}
Aggregations