| 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 |
| 8 | import javax.persistence.*;\r |
| 9 | /**\r |
| 10 | *\r |
| 11 | * @author pbarros\r |
| 12 | */\r |
| 13 | @Entity\r |
| 14 | @Table(name="ProblemasPrincipais")\r |
| 15 | public class ProblemasPrincipais implements Serializable {\r |
| 16 | private static final long serialVersionUID = 1L;\r |
| 17 | \r |
| 18 | @SequenceGenerator(name="seqProblemasPrincipais", sequenceName="SQPROPRI")\r |
| 19 | @GeneratedValue(strategy=GenerationType.AUTO, generator="seqProblemasPrincipais")\r |
| 20 | @Id\r |
| 21 | private Long Codigo;\r |
| 22 | \r |
| 23 | @Column(length=10)\r |
| 24 | private String Nome;\r |
| 25 | \r |
| 26 | \r |
| 27 | @Column(length=250)\r |
| 28 | private String Descricao;\r |
| 29 | \r |
| 30 | \r |
| 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 |
| 37 | \r |
| 38 | \r |
| 39 | @Override\r |
| 40 | public int hashCode() {\r |
| 41 | int hash = 0;\r |
| 42 | hash += (Codigo != null ? Codigo.hashCode() : 0);\r |
| 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 |
| 49 | if (!(object instanceof ProblemasPrincipais)) {\r |
| 50 | return false;\r |
| 51 | }\r |
| 52 | ProblemasPrincipais other = (ProblemasPrincipais) object;\r |
| 53 | if ((this.Codigo == null && other.Codigo != null) || (this.Codigo != null && !this.Codigo.equals(other.Codigo))) {\r |
| 54 | return false;\r |
| 55 | }\r |
| 56 | return true;\r |
| 57 | }\r |
| 58 | \r |
| 59 | @Override\r |
| 60 | public String toString() {\r |
| 61 | return "org.ufcspa.simdecs.entidade.ProblemasPrincipais[ Codigo=" + Codigo + " ]";\r |
| 62 | }\r |
| 63 | \r |
| 64 | }\r |