AggregationService aggregationService = null;
if (resultSetProcessorPrototype.getAggregationServiceFactoryDesc() != null) {
aggregationService = resultSetProcessorPrototype.getAggregationServiceFactoryDesc().getAggregationServiceFactory().makeService(agentInstanceContext, agentInstanceContext.getStatementContext().getMethodResolutionService());
}
OrderByProcessor orderByProcessor = null;
if (resultSetProcessorPrototype.getOrderByProcessorFactory() != null) {
orderByProcessor = resultSetProcessorPrototype.getOrderByProcessorFactory().instantiate(aggregationService, agentInstanceContext);
}
ResultSetProcessor resultSetProcessor = resultSetProcessorPrototype.getResultSetProcessorFactory().instantiate(orderByProcessor, aggregationService, agentInstanceContext);