package net.sourceforge.fenixedu.dataTransferObject.administrativeOffice.equivalencyPlan; import java.io.Serializable; import net.sourceforge.fenixedu.domain.DCPTransitionPlan; import net.sourceforge.fenixedu.domain.DegreeCurricularPlan; import net.sourceforge.fenixedu.domain.DomainReference; import net.sourceforge.fenixedu.domain.ExecutionPeriod; import net.sourceforge.fenixedu.domain.ExecutionYear; import pt.iscte.ci.metadata.ISCTE; @ISCTE public class DCPTransitionPlanBean implements Serializable { static private final long serialVersionUID = -2243282687122764278L; private String name; private DomainReference executionPeriod; private DomainReference originDcp; private DomainReference destinyDcp; private DomainReference dcpTransitionPlan; private DomainReference executionYear; public DCPTransitionPlanBean() { } public DCPTransitionPlanBean(DCPTransitionPlan dcpTransitionPlan) { setDcpTransitionPlan(dcpTransitionPlan); setName(dcpTransitionPlan.getName()); setOriginDcp(dcpTransitionPlan.getOriginDcp()); setDestinyDcp(dcpTransitionPlan.getDestinyDcp()); } /** * @return the name */ public String getName() { return name; } /** * @param name * the name to set */ public void setName(String name) { this.name = name; } /** * @return the executionPeriod */ public ExecutionPeriod getExecutionPeriod() { if (executionPeriod == null) { executionPeriod = new DomainReference(ExecutionYear.readCurrentExecutionYear() .getFirstExecutionPeriod()); } return executionPeriod == null ? null : executionPeriod.getObject(); } /** * @param executionPeriod * the executionPeriod to set */ public void setExecutionPeriod(ExecutionPeriod executionPeriod) { this.executionPeriod = executionPeriod == null ? null : new DomainReference(executionPeriod); } /** * @return the originDcp */ public DegreeCurricularPlan getOriginDcp() { return originDcp == null ? null : originDcp.getObject(); } /** * @param originDcp * the originDcp to set */ public void setOriginDcp(DegreeCurricularPlan originDcp) { this.originDcp = originDcp == null ? null : new DomainReference(originDcp); } /** * @return the destinyDcp */ public DegreeCurricularPlan getDestinyDcp() { return destinyDcp == null ? null : destinyDcp.getObject(); } /** * @param destinyDcp * the destinyDcp to set */ public void setDestinyDcp(DegreeCurricularPlan destinyDcp) { this.destinyDcp = destinyDcp == null ? null : new DomainReference(destinyDcp); } /** * @return the dcpTransitionPlan */ public DCPTransitionPlan getDcpTransitionPlan() { return dcpTransitionPlan == null ? null : dcpTransitionPlan.getObject(); } /** * @param dcpTransitionPlan * the dcpTransitionPlan to set */ private void setDcpTransitionPlan(DCPTransitionPlan dcpTransitionPlan) { this.dcpTransitionPlan = dcpTransitionPlan == null ? null : new DomainReference(dcpTransitionPlan); } public ExecutionYear getExecutionYear() { return executionYear == null ? null : executionYear.getObject(); } public void setExecutionYear(ExecutionYear executionYear) { this.executionYear = (executionYear == null ? null : new DomainReference(executionYear)); } }