Examples of CollectionResult


Examples of org.springframework.nanotrader.service.domain.CollectionResult

   
    public CollectionResult findQuotes() {
        if (log.isDebugEnabled()) {
            log.debug("TradingServiceFacade: findQuotes");
        }
        CollectionResult  collectionResults = new CollectionResult();
        List<org.springframework.nanotrader.data.domain.Quote> quotes = null;
        Long totalRecords = new Long(tradingService.findAllQuotes().size());
        collectionResults.setTotalRecords(totalRecords);
        quotes = tradingService.findAllQuotes(); //get all quotes
        List<Quote> responseQuotes = new ArrayList<Quote>();
        if (quotes != null && quotes.size() > 0 ) {
            for(org.springframework.nanotrader.data.domain.Quote o: quotes) {
                Quote quote = new Quote();
                mapper.map(o, quote, QUOTE_MAPPING);
                responseQuotes.add(quote);
            }
        }
        collectionResults.setResults(responseQuotes);
        return collectionResults;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.