Search in sources :

Example 1 with BatchFinderCriteriaResultDecoder

use of com.linkedin.restli.internal.common.BatchFinderCriteriaResultDecoder in project rest.li by linkedin.

the class BatchCollectionResponse method createCollectionFromDecoder.

private List<BatchFinderCriteriaResult<T>> createCollectionFromDecoder(BatchFinderCriteriaResultDecoder<T> decoder) {
    DataList elements = this.data().getDataList(CollectionResponse.ELEMENTS);
    List<BatchFinderCriteriaResult<T>> collection = elements.stream().map(obj -> decoder.makeValue((DataMap) obj)).collect(Collectors.toList());
    return collection;
}
Also used : RecordTemplate(com.linkedin.data.template.RecordTemplate) DataMap(com.linkedin.data.DataMap) Arrays(java.util.Arrays) List(java.util.List) RecordDataSchema(com.linkedin.data.schema.RecordDataSchema) DataList(com.linkedin.data.DataList) BatchFinderCriteriaResultDecoder(com.linkedin.restli.internal.common.BatchFinderCriteriaResultDecoder) ArrayDataSchema(com.linkedin.data.schema.ArrayDataSchema) Collectors(java.util.stream.Collectors) Name(com.linkedin.data.schema.Name) DataList(com.linkedin.data.DataList)

Aggregations

DataList (com.linkedin.data.DataList)1 DataMap (com.linkedin.data.DataMap)1 ArrayDataSchema (com.linkedin.data.schema.ArrayDataSchema)1 Name (com.linkedin.data.schema.Name)1 RecordDataSchema (com.linkedin.data.schema.RecordDataSchema)1 RecordTemplate (com.linkedin.data.template.RecordTemplate)1 BatchFinderCriteriaResultDecoder (com.linkedin.restli.internal.common.BatchFinderCriteriaResultDecoder)1 Arrays (java.util.Arrays)1 List (java.util.List)1 Collectors (java.util.stream.Collectors)1