public DemandOutcome createDemandOutcome( final List<AreaRequirement> outcome, final String projectId) throws WifInvalidInputException, WifInvalidConfigException { final DemandOutcome newDemandOutcome = new DemandOutcome(); newDemandOutcome.setLabel("automated-manualdemand"); LOGGER.debug("creating a new ManualDemandScenario={}", newDemandOutcome.getLabel()); final WifProject project = projectService.getProject(projectId); newDemandOutcome.setProjectId(project.getId()); for (final AreaRequirement areaRequirement : outcome) { // final ManualAreaRequirement manualAreaRequirement = new // ManualAreaRequirement(); // manualAreaRequirement.setAllocationLU(areaRequirement.getAllocationLU()); // manualAreaRequirement.setRequiredArea(areaRequirement.getRequiredArea()); // manualAreaRequirement.setProjection(areaRequirement.getProjection()); areaRequirement.setProjectionLabel(areaRequirement.getProjection().getLabel()); newDemandOutcome.addAreaRequirenment(areaRequirement); LOGGER.info( "recreating manually required area for land use {} in projection " + areaRequirement.getProjection().getLabel() + " is : {}", areaRequirement.getAllocationLU().getLabel(), areaRequirement.getRequiredArea()); } final DemandOutcome savedDemandOutcome = demandOutcomeDao.persistDemandOutcome(newDemandOutcome); LOGGER.debug("returning the ManualDemandScenario with id={}", savedDemandOutcome.getId()); return savedDemandOutcome; }