Datasets:
ArXiv:
License:
| package br.dsw.pojo; | |
| import java.io.Serializable; | |
| import javax.persistence.CascadeType; | |
| import javax.persistence.Column; | |
| import javax.persistence.Entity; | |
| import javax.persistence.GeneratedValue; | |
| import javax.persistence.GenerationType; | |
| import javax.persistence.Id; | |
| import javax.persistence.JoinColumn; | |
| import javax.persistence.NamedQueries; | |
| import javax.persistence.NamedQuery; | |
| import javax.persistence.OneToOne; | |
| public class Usuario implements Serializable { | |
| private long id = -1; | |
| private String email; | |
| private String senha; | |
| private boolean isAdmin = false; | |
| public long getId() { | |
| return this.id; | |
| } | |
| public void setId(long id) { | |
| this.id = id; | |
| } | |
| public String getEmail() { | |
| return this.email; | |
| } | |
| public void setEmail(String email) { | |
| this.email = email; | |
| } | |
| public String getSenha() { | |
| return this.senha; | |
| } | |
| public void setSenha(String senha) { | |
| this.senha = senha; | |
| } | |
| public boolean getAdmin() { | |
| return this.isAdmin; | |
| } | |
| public void setAdmin(boolean admin) { | |
| this.isAdmin = admin; | |
| } | |
| public String toString() { | |
| return email; | |
| } | |
| public int hashCode() { | |
| final int prime = 31; | |
| int result = 1; | |
| result = prime * result + (int) (id ^ (id >>> 32)); | |
| return result; | |
| } | |
| public boolean equals(Object obj) { | |
| if (this == obj) { | |
| return true; | |
| } | |
| if (obj == null) { | |
| return false; | |
| } | |
| if (getClass() != obj.getClass()) { | |
| return false; | |
| } | |
| Usuario other = (Usuario) obj; | |
| if (id != other.id) { | |
| return false; | |
| } | |
| return true; | |
| } | |
| } | |