class ProjectionServiceImpl implements ProjectionService, Constants {

    @Override
    public ProjectionResponse getProjection(String resourceType, int year,
            int quarter) throws ServiceException {
        Long totalAssets = 0l;
        List<Map<String, Object>> projectionList = new ArrayList<>();
        if (projectionTargetTypes.contains(resourceType)) {
            try {
                // get projection from Database
                projectionList = repository.getProjectionDetailsFromDb(
                        resourceType, year, quarter);
                // get total Inscope Assets from ES
                totalAssets = repository
                        .getTotalAssetCountByTargetType(resourceType);
            } catch (DataException e) {
            	logger.error("Error @ getProjection", e);
                throw new ServiceException(e);
            }
        }

        return new ProjectionResponse("", resourceType, totalAssets, year,
                quarter, projectionList);
    }

}