Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package ManagedBean;
- import javax.faces.bean.ManagedBean;
- import javax.faces.bean.RequestScoped;
- @ManagedBean
- @RequestScoped
- public class Usuario {
- private static int contador = 0;
- private int id;
- private String username;
- private String password;
- private String nombres;
- private String apellidoMaterno;
- private String apellidoPaterno;
- private int edad;
- private String sexo;
- private String ciudad;
- public Usuario() {
- this.setId(contador++);
- }
- public int getId() {
- return id;
- }
- public void setId(int id) {
- this.id = id;
- }
- public String getUsername() {
- return username;
- }
- public void setUsername(String username) {
- this.username = username;
- }
- public String getPassword() {
- return password;
- }
- public void setPassword(String password) {
- this.password = password;
- }
- public String getNombres() {
- return nombres;
- }
- public void setNombres(String nombres) {
- this.nombres = nombres;
- }
- public String getApellidoMaterno() {
- return apellidoMaterno;
- }
- public void setApellidoMaterno(String apellidoMaterno) {
- this.apellidoMaterno = apellidoMaterno;
- }
- public String getApellidoPaterno() {
- return apellidoPaterno;
- }
- public void setApellidoPaterno(String apellidoPaterno) {
- this.apellidoPaterno = apellidoPaterno;
- }
- public int getEdad() {
- return edad;
- }
- public void setEdad(int edad) {
- this.edad = edad;
- }
- public String getSexo() {
- return sexo;
- }
- public void setSexo(String sexo) {
- this.sexo = sexo;
- }
- public String getCiudad() {
- return ciudad;
- }
- public void setCiudad(String ciudad) {
- this.ciudad = ciudad;
- }
- @Override
- public int hashCode() {
- int hash = 5;
- hash = 47 * hash + this.id;
- return hash;
- }
- @Override
- public boolean equals(Object obj) {
- if (obj == null) {
- return false;
- }
- if (getClass() != obj.getClass()) {
- return false;
- }
- final Usuario other = (Usuario) obj;
- if (this.id != other.id) {
- return false;
- }
- return true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement