package org.wontovlab.model;

import java.util.ArrayList;
import java.util.List;

import org.wontovlab.model.TO.ExperimentTO;
import org.wontovlab.model.TO.StepTO;


public class Experiment {

	private Long experimentId;
	private String name;
	private String description;
	//private TESTStep firstStep;
	//private TESTStep lastStep;
	private List<Step> stepList;
	
	
	
	public Experiment() {
	}

	public Experiment(ExperimentTO experimentTO) {

		this.experimentId = experimentTO.getExperimentId();
		this.description = experimentTO.getDescription();
		this.name = experimentTO.getName();
		
		if (experimentTO.getStepList() != null) {
			stepList = new ArrayList<Step>();
			for (StepTO step: experimentTO.getStepList()) {
				this.stepList.add(new Step(step)); 
			}	
		}
		
		
		
	}
	
	public Experiment(Long experimentId, String name, String description, List<Step> stepList) {
		super();
		this.experimentId = experimentId;
		this.description = description;
		//this.firstStep = firstStep;
		//this.lastStep = lastStep;
		this.stepList = stepList;
		this.name = name;
	}
	
	public Long getExperimentId() {
		return experimentId;
	}
	public void setExperimentId(Long experimentId) {
		this.experimentId = experimentId;
	}
	
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	
/*	public TESTStep getFirstStep() {
		return firstStep;
	}
	public void setFirstStep(TESTStep firstStep) {
		this.firstStep = firstStep;
	}
	
	public TESTStep getLastStep() {
		return lastStep;
	}
	public void setLastStep(TESTStep lastStep) {
		this.lastStep = lastStep;
	}

	*/
	public List<Step> getStepList() {
		return stepList;
	}
	public void setStepList(List<Step> stepList) {
		this.stepList = stepList;
	}

	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	
	
}
