2 * To change this template, choose Tools | Templates
3 * and open the template in the editor.
5 package org.ufcspa.simdecs.entities;
7 import java.io.Serializable;
8 import javax.persistence.Column;
9 import javax.persistence.Entity;
10 import javax.persistence.GeneratedValue;
11 import javax.persistence.GenerationType;
12 import javax.persistence.Id;
13 import javax.persistence.SequenceGenerator;
14 import org.hibernate.annotations.Table;
21 @Table(appliesTo="Usuario")
22 public class Usuario implements Serializable {
23 private static final long serialVersionUID = 1L;
27 @SequenceGenerator(name="seqUsuario", sequenceName="SQ_USUARIO")
28 @GeneratedValue(strategy = GenerationType.AUTO, generator="seqUsuario")
31 @Column(length=50, nullable=false)
34 @Column(length=30, nullable=false, unique=true)
37 @Column(length=50, nullable=false)
44 public void setId(Long id) {
48 public String getLogin() {
52 public void setLogin(String login) {
56 public String getNome() {
60 public void setNome(String nome) {
64 public String getSenha() {
68 public void setSenha(String senha) {
73 public int hashCode() {
75 hash += (id != null ? id.hashCode() : 0);
80 public boolean equals(Object object) {
81 if (!(object instanceof Usuario)) {
84 Usuario other = (Usuario) object;
85 if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
92 public String toString() {
93 return "org.ufcspa.simdecs.entities.Usuario[ id=" + id + " ]";