package net.sourceforge.fenixedu.dataTransferObject.messaging; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import net.sourceforge.fenixedu.domain.DomainReference; import net.sourceforge.fenixedu.domain.student.Registration; public class RegistrationsBean implements Serializable { private DomainReference selected; private List> registrations; public RegistrationsBean(){ this.selected = new DomainReference(null); } public List getRegistrations() { List result = new ArrayList(); for (DomainReference registration : registrations){ result.add(registration.getObject()); } return result; } public void setRegistrations(List registrations) { this.registrations = new ArrayList>(); for (Registration registration : registrations){ this.registrations.add(new DomainReference(registration)); } } public Registration getSelected() { return selected.getObject(); } public void setSelected(Registration selected) { this.selected = new DomainReference(selected); } }