use of com.emc.storageos.model.compute.ComputeElementBulkRep in project coprhd-controller by CoprHD.
the class ComputeElementService method queryBulkResourceReps.
@Override
public ComputeElementBulkRep queryBulkResourceReps(List<URI> ids) {
Iterator<ComputeElement> _dbIterator = _dbClient.queryIterativeObjects(getResourceClass(), ids);
return new ComputeElementBulkRep(BulkList.wrapping(_dbIterator, new Function<ComputeElement, ComputeElementRestRep>() {
@Override
public ComputeElementRestRep apply(ComputeElement ce) {
Host associatedHost = getAssociatedHost(ce, _dbClient);
Cluster cluster = null;
if (associatedHost != null && !NullColumnValueGetter.isNullURI(associatedHost.getCluster())) {
cluster = _dbClient.queryObject(Cluster.class, associatedHost.getCluster());
}
ComputeElementRestRep restRep = ComputeMapper.map(ce, associatedHost, cluster);
return restRep;
}
}));
}
Aggregations