final KijiTableLayout layout,
final HBaseColumnNameTranslator columnTranslator,
final CellDecoderProvider decoderProvider
) throws IOException {
final Collection<Column> columnRequests = dataRequest.getColumns();
final KijiDataRequestBuilder unpagedRequestBuilder = KijiDataRequest.builder();
final KijiDataRequestBuilder pagedRequestBuilder = KijiDataRequest.builder();
unpagedRequestBuilder.withTimeRange(
dataRequest.getMinTimestamp(),
dataRequest.getMaxTimestamp());
pagedRequestBuilder.withTimeRange(dataRequest.getMinTimestamp(), dataRequest.getMaxTimestamp());
for (Column columnRequest : columnRequests) {
if (columnRequest.isPagingEnabled()) {
pagedRequestBuilder.newColumnsDef(columnRequest);
} else {
unpagedRequestBuilder.newColumnsDef(columnRequest);
}
}
final CellDecoderProvider requestDecoderProvider =
decoderProvider.getDecoderProviderForRequest(dataRequest);
final KijiDataRequest unpagedRequest = unpagedRequestBuilder.build();
final KijiDataRequest pagedRequest = pagedRequestBuilder.build();
if (unpagedRequest.isEmpty() && pagedRequest.isEmpty()) {
return new EmptyKijiResult<T>(entityId, dataRequest);
}