protected Object filter(Object response) {
if (response instanceof MultiMapResponse) {
Collection<MultiMapRecord> responseCollection = ((MultiMapResponse) response).getCollection();
if (responseCollection == null) {
return new PortableCollection();
}
Collection<Data> collection = createCollection(responseCollection);
for (MultiMapRecord record : responseCollection) {
collection.add(serializationService.toData(record.getObject()));
}
return new PortableCollection(collection);
}
return super.filter(response);
}