/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package org.ufcspa.simdecs.entidade; import java.io.Serializable; import javax.persistence.*; /** * * @author pbarros */ @Entity @Table(name="RedeAluno") public class RedeAluno implements Serializable { private static final long serialVersionUID = 1L; @SequenceGenerator(name="seqRedeAluno", sequenceName="SQREDALU") @GeneratedValue(strategy=GenerationType.AUTO, generator="seqRedeAluno") @Id private Long Codigo; @Column(length=10) private String Nome; @Column(length=250) private String Descricao; public Long getCodigo() { return this.Codigo; } public void setCodigo(Long Codigo) { this.Codigo = Codigo; } public String getNome() { return this.Nome; } public void setNome(String Nome) { this.Nome = Nome; } public String getDescricao() { return this.Descricao; } public void setDescricao(String Descricao) { this.Descricao = Descricao; } @Override public int hashCode() { int hash = 0; hash += (Codigo != null ? Codigo.hashCode() : 0); return hash; } @Override public boolean equals(Object object) { // TODO: Warning - this method won't work in the case the id fields are not set if (!(object instanceof RedeAluno)) { return false; } RedeAluno other = (RedeAluno) object; if ((this.Codigo == null && other.Codigo != null) || (this.Codigo != null && !this.Codigo.equals(other.Codigo))) { return false; } return true; } @Override public String toString() { return "org.ufcspa.simdecs.entidade.RedeAluno[ Codigo=" + Codigo + " ]"; } }