package jp.ac.nii.prl.mape.autoscaling.analysis.model.dto;

import jp.ac.nii.prl.mape.autoscaling.analysis.model.Adaptation;
import jp.ac.nii.prl.mape.autoscaling.analysis.model.Deployment;
import jp.ac.nii.prl.mape.autoscaling.analysis.model.Instance;
import jp.ac.nii.prl.mape.autoscaling.analysis.model.InstanceType;

public class DeploymentFactory {

	public static Deployment createDeployment(DeploymentDTO dto) {
		return null;
	}
	
	public static DeploymentDTO createDeploymentDTO(Deployment deployment) {
		return null;
	}
	
	public static Adaptation createAdaptation(AdaptationDTO dto) {
		return null;
	}
	
	public static AdaptationDTO createAdaptationDTO(Adaptation adaptation) {
		return null;
	}
	
	public static Instance createInstance(InstanceDTO dto) {
		return null;
	}
	
	public static InstanceDTO createInstanceDTO(Instance instance) {
		return null;
	}
	
	public static InstanceType createInstanceType(InstanceTypeDTO dto) {
		return null;
	}
	
	public static InstanceTypeDTO createInstanceTypeDTO(InstanceType instanceType) {
		return null;
	}

}

@@ -590,119 +590,536 @@
  dto
-) %7B%0A%09%09return null;%0A%09%7D%0A%09%0A%09public static AdaptationDTO createAdaptationDTO(Adaptation adaptation) %7B%0A%09%09return null
+, Deployment deployment) %7B%0A%09%09Adaptation adaptation = new Adaptation();%0A%09%09%0A%09%09adaptation.setAdapt(dto.isAdapt());%0A%09%09adaptation.setCpuCount(dto.getCpuCount());%0A%09%09adaptation.setScaleUp(dto.isScaleUp());%0A%09%09adaptation.setDeployment(deployment);%0A%09%09%0A%09%09return adaptation;%0A%09%7D%0A%09%0A%09public static AdaptationDTO createAdaptationDTO(Adaptation adaptation) %7B%0A%09%09AdaptationDTO dto = new AdaptationDTO();%0A%09%09%0A%09%09dto.setAdapt(adaptation.isAdapt());%0A%09%09dto.setCpuCount(adaptation.getCpuCount());%0A%09%09dto.setScaleUp(adaptation.isScaleUp());%0A%09%09%0A%09%09return dto
 ;%0A%09%7D

Implement Adaptation to AdaptationDTO and back