From 4353fdb74948eb4713a1f9f1e6e9e4979616ac05 Mon Sep 17 00:00:00 2001 From: rodrigo Date: Fri, 10 Aug 2012 15:05:09 +0000 Subject: [PATCH] git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@20345 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../ventaboletos/entidad/Estado.java | 213 +++++++++--------- 1 file changed, 112 insertions(+), 101 deletions(-) diff --git a/src/com/rjconsultores/ventaboletos/entidad/Estado.java b/src/com/rjconsultores/ventaboletos/entidad/Estado.java index 995a2a542..de745ef3f 100644 --- a/src/com/rjconsultores/ventaboletos/entidad/Estado.java +++ b/src/com/rjconsultores/ventaboletos/entidad/Estado.java @@ -5,8 +5,10 @@ package com.rjconsultores.ventaboletos.entidad; import java.io.Serializable; +import java.math.BigDecimal; import java.util.Date; import java.util.List; + import javax.persistence.Basic; import javax.persistence.Column; import javax.persistence.Entity; @@ -16,13 +18,13 @@ import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.OneToMany; +import javax.persistence.SequenceGenerator; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; -import javax.persistence.SequenceGenerator; /** - * + * * @author Rafius */ @Entity @@ -30,103 +32,105 @@ import javax.persistence.SequenceGenerator; @Table(name = "ESTADO") public class Estado implements Serializable { - private static final long serialVersionUID = 1L; - @Id - @GeneratedValue(strategy = GenerationType.AUTO, generator = "ESTADO_SEQ") - @Basic(optional = false) - @Column(name = "ESTADO_ID") - private Integer estadoId; - @Column(name = "NOMBESTADO") - private String nombestado; - @Column(name = "CVEESTADO") - private String cveestado; - @Column(name = "ACTIVO") - private Boolean activo; - @Column(name = "FECMODIF") - @Temporal(TemporalType.TIMESTAMP) - private Date fecmodif; - @Column(name = "USUARIO_ID") - private Integer usuarioId; - @JoinColumn(name = "PAIS_ID", referencedColumnName = "PAIS_ID") - @ManyToOne - private Pais pais; - @Column(name = "EQUIVALENCIA_ID") - private String equivalenciaId; - @OneToMany(mappedBy = "estado") - private List ciudadList; + private static final long serialVersionUID = 1L; + @Id + @GeneratedValue(strategy = GenerationType.AUTO, generator = "ESTADO_SEQ") + @Basic(optional = false) + @Column(name = "ESTADO_ID") + private Integer estadoId; + @Column(name = "NOMBESTADO") + private String nombestado; + @Column(name = "CVEESTADO") + private String cveestado; + @Column(name = "ACTIVO") + private Boolean activo; + @Column(name = "FECMODIF") + @Temporal(TemporalType.TIMESTAMP) + private Date fecmodif; + @Column(name = "USUARIO_ID") + private Integer usuarioId; + @JoinColumn(name = "PAIS_ID", referencedColumnName = "PAIS_ID") + @ManyToOne + private Pais pais; + @Column(name = "EQUIVALENCIA_ID") + private String equivalenciaId; + @OneToMany(mappedBy = "estado") + private List ciudadList; + @Column(name = "ICMS") + private BigDecimal icms; - public Estado() { - } + public Estado() { + } - public Estado(Integer estadoId) { - this.estadoId = estadoId; - } + public Estado(Integer estadoId) { + this.estadoId = estadoId; + } - public Integer getEstadoId() { - return estadoId; - } + public Integer getEstadoId() { + return estadoId; + } - public void setEstadoId(Integer estadoId) { - this.estadoId = estadoId; - } + public void setEstadoId(Integer estadoId) { + this.estadoId = estadoId; + } - public String getNombestado() { - return nombestado; - } + public String getNombestado() { + return nombestado; + } - public void setNombestado(String nombestado) { - this.nombestado = nombestado; - } + public void setNombestado(String nombestado) { + this.nombestado = nombestado; + } - public Boolean getActivo() { - return activo; - } + public Boolean getActivo() { + return activo; + } - public void setActivo(Boolean activo) { - this.activo = activo; - } + public void setActivo(Boolean activo) { + this.activo = activo; + } - public Date getFecmodif() { - return fecmodif; - } + public Date getFecmodif() { + return fecmodif; + } - public void setFecmodif(Date fecmodif) { - this.fecmodif = fecmodif; - } + public void setFecmodif(Date fecmodif) { + this.fecmodif = fecmodif; + } - public Integer getUsuarioId() { - return usuarioId; - } + public Integer getUsuarioId() { + return usuarioId; + } - public void setUsuarioId(Integer usuarioId) { - this.usuarioId = usuarioId; - } + public void setUsuarioId(Integer usuarioId) { + this.usuarioId = usuarioId; + } - public Pais getPais() { - return pais; - } + public Pais getPais() { + return pais; + } - public void setPais(Pais pais) { - this.pais = pais; - } + public void setPais(Pais pais) { + this.pais = pais; + } - public List getCiudadList() { - return ciudadList; - } + public List getCiudadList() { + return ciudadList; + } - public void setCiudadList(List ciudadList) { - this.ciudadList = ciudadList; - } + public void setCiudadList(List ciudadList) { + this.ciudadList = ciudadList; + } - public String getEquivalenciaId() { - return equivalenciaId; - } + public String getEquivalenciaId() { + return equivalenciaId; + } - public void setEquivalenciaId(String equivalenciaId) { - this.equivalenciaId = equivalenciaId; - } + public void setEquivalenciaId(String equivalenciaId) { + this.equivalenciaId = equivalenciaId; + } - public String getCveestado() { + public String getCveestado() { return cveestado; } @@ -134,28 +138,35 @@ public class Estado implements Serializable { this.cveestado = cveestado; } + public BigDecimal getIcms() { + return icms; + } + + public void setIcms(BigDecimal icms) { + this.icms = icms; + } + @Override - public int hashCode() { - int hash = 0; - hash += (estadoId != null ? estadoId.hashCode() : 0); - return hash; - } + public int hashCode() { + int hash = 0; + hash += (estadoId != null ? estadoId.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 Estado)) { - return false; - } - Estado other = (Estado) object; - if ((this.estadoId == null && other.estadoId != null) || (this.estadoId != null && !this.estadoId.equals(other.estadoId))) { - return false; - } - return true; - } + @Override + public boolean equals(Object object) { + if (!(object instanceof Estado)) { + return false; + } + Estado other = (Estado) object; + if ((this.estadoId == null && other.estadoId != null) || (this.estadoId != null && !this.estadoId.equals(other.estadoId))) { + return false; + } + return true; + } - @Override - public String toString() { - return this.getNombestado(); - } + @Override + public String toString() { + return this.getNombestado(); + } }