public Holding findHolding(Integer id, Integer accountId) {
if (log.isDebugEnabled()) {
log.debug("TradingServiceFacade.findHolding: id=" + id);
}
Holding holdingResponse = new Holding();
org.springframework.nanotrader.data.domain.Holding holding = tradingService.findHolding(id, accountId);
if (holding == null) {
throw new NoRecordsFoundException();
}
Set<String> symbol = new HashSet<String>();
symbol.add(holding.getQuoteSymbol());
Map<String, Quote> currentQuote = getCurrentQuotes(symbol);
mapper.map(holding, holdingResponse);
holdingResponse.setQuote(currentQuote.get(holding.getQuoteSymbol()));
if (log.isDebugEnabled()) {
log.debug("TradingServiceFacade.findHolding - after service call. Payload is: " + holdingResponse);
}
return holdingResponse;
}