package net.sourceforge.fenixedu.dataTransferObject; import net.sourceforge.fenixedu.domain.complain.EvaluationComplain; import com.linkare.commons.metainfo.Linkare; @Linkare(author = "Sérgio Bogas") public class InfoEvaluationComplain extends InfoObject { private String name; private String studentName; private String teacherName; private String studentEmail; private String teacherEmail; private String description; private String teacherAnswer; private Integer evaluationComplainId; public String getName() { return name; } public void setName(String name) { this.name = name; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public String getStudentName() { return studentName; } public void setStudentName(String studentName) { this.studentName = studentName; } public String getTeacherName() { return teacherName; } public void setTeacherName(String teacherName) { this.teacherName = teacherName; } public String getTeacherEmail() { return teacherEmail; } public void setTeacherEmail(String teacherEmail) { this.teacherEmail = teacherEmail; } public String getStudentEmail() { return studentEmail; } public void setStudentEmail(String studentEmail) { this.studentEmail = studentEmail; } public String getTeacherAnswer() { return teacherAnswer; } public void setTeacherAnswer(String teacherAnswer) { this.teacherAnswer = teacherAnswer; } public Integer getEvaluationComplainId() { return evaluationComplainId; } public void setEvaluationComplainId(Integer evaluationComplainId) { this.evaluationComplainId = evaluationComplainId; } public void copyFromDomain(EvaluationComplain evaluationComplain) { super.copyFromDomain(evaluationComplain); if (evaluationComplain != null) { setName(evaluationComplain.getExecutionCourse().getNome()); setDescription(evaluationComplain.getDescription()); setStudentName(evaluationComplain.getStudent().getPerson().getName()); setTeacherName(evaluationComplain.getTeacher().getPerson().getName()); setStudentEmail(evaluationComplain.getStudent().getPerson().getEmail()); setTeacherEmail(evaluationComplain.getTeacher().getPerson().getEmail()); setTeacherAnswer(evaluationComplain.getTeacherAnswer()); setEvaluationComplainId(evaluationComplain.getIdInternal()); } } public static InfoEvaluationComplain newInfoFromDomain(EvaluationComplain evaluationComplain) { InfoEvaluationComplain infoEvaluationComplain = null; if (evaluationComplain != null) { infoEvaluationComplain = new InfoEvaluationComplain(); infoEvaluationComplain.copyFromDomain(evaluationComplain); } return infoEvaluationComplain; } }