adicionado classes definidas por marta e cecilia, que serĂ£o utilizadas no agente...
[simdecs.git] / src / java / org / ufcspa / simdecs / entidade / NivelConfianca.java
1 /*\r
2  * To change this template, choose Tools | Templates\r
3  * and open the template in the editor.\r
4  */\r
5 package org.ufcspa.simdecs.entidade;\r
6 \r
7 \r
8 import java.io.Serializable;\r
9 import javax.persistence.*;\r
10 \r
11 /**\r
12  *\r
13  * @author pbarros\r
14  */\r
15 @Entity\r
16 @Table(name="NivelConfianca")\r
17 public class NivelConfianca implements Serializable {\r
18     private static final long serialVersionUID = 1L;\r
19     \r
20     @SequenceGenerator(name="seqNivelConfianca", sequenceName="SQNIVCON")\r
21     @GeneratedValue(strategy=GenerationType.AUTO, generator="seqNivelConfianca")\r
22     @Id\r
23     private Long Codigo;\r
24     \r
25     @Column(length=10)\r
26     private String Nome;\r
27     \r
28     \r
29     @Column(length=250)\r
30     private String Descricao;\r
31     \r
32 \r
33     public Long getCodigo() { return this.Codigo;  }\r
34     public void setCodigo(Long Codigo) { this.Codigo = Codigo; }\r
35     public String getNome() { return this.Nome; }\r
36     public void setNome(String Nome) { this.Nome = Nome; }\r
37     public String getDescricao() { return this.Descricao; }\r
38     public void setDescricao(String Descricao) { this.Descricao = Descricao; }\r
39     \r
40     \r
41     @Override\r
42     public int hashCode() {\r
43         int hash = 0;\r
44         hash += (Codigo != null ? Codigo.hashCode() : 0);\r
45         return hash;\r
46     }\r
47 \r
48     @Override\r
49     public boolean equals(Object object) {\r
50         // TODO: Warning - this method won't work in the case the id fields are not set\r
51         if (!(object instanceof NivelConfianca)) {\r
52             return false;\r
53         }\r
54         NivelConfianca other = (NivelConfianca) object;\r
55         if ((this.Codigo == null && other.Codigo != null) || (this.Codigo != null && !this.Codigo.equals(other.Codigo))) {\r
56             return false;\r
57         }\r
58         return true;\r
59     }\r
60 \r
61     @Override\r
62     public String toString() {\r
63         return "org.ufcspa.simdecs.entidade.NivelConfianca[ Codigo=" + Codigo + " ]";\r
64     }\r
65     \r
66 }\r