33d1f42f |
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 | import java.io.Serializable;\r |
33d1f42f |
8 | import javax.persistence.*;\r |
33d1f42f |
9 | /**\r |
10 | *\r |
11 | * @author pbarros\r |
12 | */\r |
13 | @Entity\r |
aa9088cf |
14 | @Table(name="ProblemasPrincipais")\r |
15 | public class ProblemasPrincipais implements Serializable {\r |
33d1f42f |
16 | private static final long serialVersionUID = 1L;\r |
17 | \r |
aa9088cf |
18 | @SequenceGenerator(name="seqProblemasPrincipais", sequenceName="SQPROPRI")\r |
19 | @GeneratedValue(strategy=GenerationType.AUTO, generator="seqProblemasPrincipais")\r |
33d1f42f |
20 | @Id\r |
aa9088cf |
21 | private Long Codigo;\r |
33d1f42f |
22 | \r |
aa9088cf |
23 | @Column(length=10)\r |
24 | private String Nome;\r |
33d1f42f |
25 | \r |
33d1f42f |
26 | \r |
aa9088cf |
27 | @Column(length=250)\r |
28 | private String Descricao;\r |
33d1f42f |
29 | \r |
30 | \r |
aa9088cf |
31 | public Long getCodigo() { return this.Codigo;}\r |
32 | public void setCodigo(Long Codigo) { this.Codigo = Codigo; }\r |
33 | public String getNome() { return this.Nome; }\r |
34 | public void setNome(String Nome) { this.Nome = Nome; }\r |
35 | public String getDescricao() { return this.Descricao; }\r |
36 | public void setDescricao(String Descricao) { this.Descricao = Descricao; }\r |
33d1f42f |
37 | \r |
38 | \r |
39 | @Override\r |
40 | public int hashCode() {\r |
41 | int hash = 0;\r |
aa9088cf |
42 | hash += (Codigo != null ? Codigo.hashCode() : 0);\r |
33d1f42f |
43 | return hash;\r |
44 | }\r |
45 | \r |
46 | @Override\r |
47 | public boolean equals(Object object) {\r |
48 | // TODO: Warning - this method won't work in the case the id fields are not set\r |
aa9088cf |
49 | if (!(object instanceof ProblemasPrincipais)) {\r |
33d1f42f |
50 | return false;\r |
51 | }\r |
aa9088cf |
52 | ProblemasPrincipais other = (ProblemasPrincipais) object;\r |
53 | if ((this.Codigo == null && other.Codigo != null) || (this.Codigo != null && !this.Codigo.equals(other.Codigo))) {\r |
33d1f42f |
54 | return false;\r |
55 | }\r |
56 | return true;\r |
57 | }\r |
58 | \r |
59 | @Override\r |
60 | public String toString() {\r |
aa9088cf |
61 | return "org.ufcspa.simdecs.entidade.ProblemasPrincipais[ Codigo=" + Codigo + " ]";\r |
33d1f42f |
62 | }\r |
63 | \r |
64 | }\r |