package org.cloudcoder.app.shared.model;

import java.io.Serializable;

/**
 * Data about a {@link User} that is being edited in the context
 * of a {@link Course}.
 * 
 * @author David Hovemeyer
 */
public class EditedUser implements Serializable {
	private static final long serialVersionUID = 1L;
	
	private User user;
	private String currentPassword;
	private String password;
	private int section;
	private CourseRegistrationType registrationType;
	
	public EditedUser() {
		
	}
	
	public void setUser(User user) {
		this.user = user;
	}
	
	public User getUser() {
		return user;
	}
	
	public void setCurrentPassword(String currentPassword) {
		this.currentPassword = currentPassword;
	}
	
	public String getCurrentPassword() {
		return currentPassword;
	}
	
	public void setPassword(String password) {
		this.password = password;
	}
	
	public String getPassword() {
		return password;
	}
	
	public void setSection(int section) {
		this.section = section;
	}
	
	public int getSection() {
		return section;
	}
	
	public void setRegistrationType(CourseRegistrationType registrationType) {
		this.registrationType = registrationType;
	}
	
	public CourseRegistrationType getRegistrationType() {
		return registrationType;
	}
}

@@ -1219,10 +1219,589 @@
 ype;%0A%09%7D%0A
+%09%0A%09@Override%0A%09public boolean equals(Object obj) %7B%0A%09%09if (obj == null %7C%7C !(obj instanceof EditedUser)) %7B%0A%09%09%09return false;%0A%09%09%7D%0A%09%09EditedUser other = (EditedUser) obj;%0A%09%09return ModelObjectUtil.equals(this.user, other.user)%0A%09%09%09%09&& ModelObjectUtil.equals(this.currentPassword, other.currentPassword)%0A%09%09%09%09&& ModelObjectUtil.equals(this.password, other.password)%0A%09%09%09%09&& this.section == other.section%0A%09%09%09%09&& this.registrationType == other.registrationType;%0A%09%7D%0A%09%0A%09@Override%0A%09public int hashCode() %7B%0A%09%09// This object should really not be used as the key in%0A%09%09// a hash table.%0A%09%09return 0;%0A%09%7D%0A
 %7D%0A

implement equals and hashCode