/*
 * Created on May 10, 2004
 *
 * To change the template for this generated file go to
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
 */
package modelo;

import java.util.Collection;
/**
 * @author gas y jpg
 *
 * To change the template for this generated type comment go to
 * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
 */
public class Usuario {
	protected String nombre;
	protected String apellido;
	protected Collection roles;
	protected String user;
	protected String password;
	
	public Usuario () {
		this (null, null, null, null, null);
	}
	
	public Usuario(String nombre, String apellido, String user, String password, Collection roles){
		this.setNombre(nombre);
		this.setApellido(apellido);
		this.setUser(user);
		this.setPassword(password);
		this.setRoles(roles);
		
	}

	public Collection getRoles() {
		return roles;
	}

	public void setRoles(Collection roles) {
		this.roles = roles;
	}

	/**
	 * @return
	 */
	public String getApellido() {
		return apellido;
	}

	/**
	 * @return
	 */
	public String getNombre() {
		return nombre;
	}

	/**
	 * @param string
	 */
	public void setApellido(String string) {
		apellido = string;
	}

	/**
	 * @param string
	 */
	public void setNombre(String string) {
		nombre = string;
	}

	/**
	 * @return
	 */
	public String getPassword() {
		return password;
	}

	/**
	 * @return
	 */
	public String getUser() {
		return user;
	}

	/**
	 * @param string
	 */
	public void setPassword(String string) {
		password = string;
	}

	/**
	 * @param string
	 */
	public void setUser(String string) {
		user = string;
	}

	public void addRol(Rol rol){
		this.getRoles().add(rol);
	}
}
