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