package src.hibernatebb.discussion;

/**
 * A user in the bulletin board. <code>User</code>'s have <code>Post</code>s in
 * a <code>Topic</code>.  A <code>User</code> is comprised of an id and 
 * password.
 * 
 * The design of this class was heavily based on the example code in Better, Faster, Lighter Java
 *  by authors Bruce Tate and Justin Gehtland.
 * 
 * @author Peter Deschere
 * @version 1.0
 * @see <a>http://www.hibernate.org</a>
 * @see src.hibernatebb.discussion.Post
 * @see src.hibernatebb.discussion.Topic
 */
public class User {
	String id = new String();
	String password = new String();
	
	// class constructor
	public User (String userID, String pw) {
		id = userID;
		password = pw;
	}
	
	// copy constructor
	public User (User u) {
		this.id = new String(u.getID());
		this.password = new String(u.getPassword());
	}
	
	// default constructor
	User () {}
	
	public String getID() {
		return id;
	}
	
	public void setID(String newUser) {
		id = newUser;
	}
	
	public String getPassword() {
		return password;
	}
	
	public void setPassword(String pw) {
		password = pw;
	}
}