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