protected CDCQueryResult getCDCQueryResult ( CDCResponse cdcResponse ) { CDCQueryResult cdcQueryResult = new CDCQueryResult ( ) ; List < QueryResponse > queryResponses = cdcResponse . getQueryResponse ( ) ; if ( queryResponses != null ) { Map < String , QueryResult > queryResults = new HashMap < String , QueryResult > ( ) ; Iterator < QueryResponse > queryResponseItr = queryResponses . iterator ( ) ; while ( queryResponseItr . hasNext ( ) ) { QueryResponse queryResponse = queryResponseItr . next ( ) ; QueryResult queryResult = getQueryResult ( queryResponse ) ; populateQueryResultsInCDC ( queryResults , queryResult ) ; populateFaultInCDC ( cdcQueryResult , queryResult ) ; } if ( queryResults != null && ! queryResults . isEmpty ( ) ) { cdcQueryResult . setQueryResults ( queryResults ) ; cdcQueryResult . setSize ( cdcResponse . getSize ( ) ) ; } } else if ( cdcResponse . getFault ( ) != null ) { cdcQueryResult . setFalut ( cdcResponse . getFault ( ) ) ; } return cdcQueryResult ; }
Method to construct and return the CDCQueryResult object from CDCResponse