List<MarketPlacePojo> marketPlaces = new ArrayList<MarketPlacePojo>();
// HACK TEMPORARY BEFORE GOOD FETCH STATEGY
List<MarketPlacePojo> allMarketPlaces = marketPojoService.getMarketPlaces();
for (Iterator<MarketPlacePojo> iterator = allMarketPlaces.iterator(); iterator.hasNext();) {
MarketPlacePojo marketPlacePojo = (MarketPlacePojo) iterator.next();
if(selectedMarketPlace != null
&& marketPlacePojo.getCode().equals(selectedMarketPlace.getCode())){
marketPlacePojo.setSelected(true);
selectedMarketPlace = marketPlacePojo;
}
marketPlacePojo.setMarkets(null);
}
marketPlaces.addAll(allMarketPlaces);
context.setMarketPlaces(marketPlaces);
}