git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@20345 d1611594-4594-4d17-8e1d-87c2c4800839
parent
45b9d70dd5
commit
4353fdb749
|
@ -5,8 +5,10 @@
|
||||||
package com.rjconsultores.ventaboletos.entidad;
|
package com.rjconsultores.ventaboletos.entidad;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.persistence.Basic;
|
import javax.persistence.Basic;
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
@ -16,10 +18,10 @@ import javax.persistence.Id;
|
||||||
import javax.persistence.JoinColumn;
|
import javax.persistence.JoinColumn;
|
||||||
import javax.persistence.ManyToOne;
|
import javax.persistence.ManyToOne;
|
||||||
import javax.persistence.OneToMany;
|
import javax.persistence.OneToMany;
|
||||||
|
import javax.persistence.SequenceGenerator;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
import javax.persistence.Temporal;
|
import javax.persistence.Temporal;
|
||||||
import javax.persistence.TemporalType;
|
import javax.persistence.TemporalType;
|
||||||
import javax.persistence.SequenceGenerator;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -30,103 +32,105 @@ import javax.persistence.SequenceGenerator;
|
||||||
@Table(name = "ESTADO")
|
@Table(name = "ESTADO")
|
||||||
public class Estado implements Serializable {
|
public class Estado implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.AUTO, generator = "ESTADO_SEQ")
|
@GeneratedValue(strategy = GenerationType.AUTO, generator = "ESTADO_SEQ")
|
||||||
@Basic(optional = false)
|
@Basic(optional = false)
|
||||||
@Column(name = "ESTADO_ID")
|
@Column(name = "ESTADO_ID")
|
||||||
private Integer estadoId;
|
private Integer estadoId;
|
||||||
@Column(name = "NOMBESTADO")
|
@Column(name = "NOMBESTADO")
|
||||||
private String nombestado;
|
private String nombestado;
|
||||||
@Column(name = "CVEESTADO")
|
@Column(name = "CVEESTADO")
|
||||||
private String cveestado;
|
private String cveestado;
|
||||||
@Column(name = "ACTIVO")
|
@Column(name = "ACTIVO")
|
||||||
private Boolean activo;
|
private Boolean activo;
|
||||||
@Column(name = "FECMODIF")
|
@Column(name = "FECMODIF")
|
||||||
@Temporal(TemporalType.TIMESTAMP)
|
@Temporal(TemporalType.TIMESTAMP)
|
||||||
private Date fecmodif;
|
private Date fecmodif;
|
||||||
@Column(name = "USUARIO_ID")
|
@Column(name = "USUARIO_ID")
|
||||||
private Integer usuarioId;
|
private Integer usuarioId;
|
||||||
@JoinColumn(name = "PAIS_ID", referencedColumnName = "PAIS_ID")
|
@JoinColumn(name = "PAIS_ID", referencedColumnName = "PAIS_ID")
|
||||||
@ManyToOne
|
@ManyToOne
|
||||||
private Pais pais;
|
private Pais pais;
|
||||||
@Column(name = "EQUIVALENCIA_ID")
|
@Column(name = "EQUIVALENCIA_ID")
|
||||||
private String equivalenciaId;
|
private String equivalenciaId;
|
||||||
@OneToMany(mappedBy = "estado")
|
@OneToMany(mappedBy = "estado")
|
||||||
private List<Ciudad> ciudadList;
|
private List<Ciudad> ciudadList;
|
||||||
|
@Column(name = "ICMS")
|
||||||
|
private BigDecimal icms;
|
||||||
|
|
||||||
public Estado() {
|
public Estado() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Estado(Integer estadoId) {
|
public Estado(Integer estadoId) {
|
||||||
this.estadoId = estadoId;
|
this.estadoId = estadoId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getEstadoId() {
|
public Integer getEstadoId() {
|
||||||
return estadoId;
|
return estadoId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setEstadoId(Integer estadoId) {
|
public void setEstadoId(Integer estadoId) {
|
||||||
this.estadoId = estadoId;
|
this.estadoId = estadoId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getNombestado() {
|
public String getNombestado() {
|
||||||
return nombestado;
|
return nombestado;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setNombestado(String nombestado) {
|
public void setNombestado(String nombestado) {
|
||||||
this.nombestado = nombestado;
|
this.nombestado = nombestado;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Boolean getActivo() {
|
public Boolean getActivo() {
|
||||||
return activo;
|
return activo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setActivo(Boolean activo) {
|
public void setActivo(Boolean activo) {
|
||||||
this.activo = activo;
|
this.activo = activo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getFecmodif() {
|
public Date getFecmodif() {
|
||||||
return fecmodif;
|
return fecmodif;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFecmodif(Date fecmodif) {
|
public void setFecmodif(Date fecmodif) {
|
||||||
this.fecmodif = fecmodif;
|
this.fecmodif = fecmodif;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getUsuarioId() {
|
public Integer getUsuarioId() {
|
||||||
return usuarioId;
|
return usuarioId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUsuarioId(Integer usuarioId) {
|
public void setUsuarioId(Integer usuarioId) {
|
||||||
this.usuarioId = usuarioId;
|
this.usuarioId = usuarioId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Pais getPais() {
|
public Pais getPais() {
|
||||||
return pais;
|
return pais;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPais(Pais pais) {
|
public void setPais(Pais pais) {
|
||||||
this.pais = pais;
|
this.pais = pais;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Ciudad> getCiudadList() {
|
public List<Ciudad> getCiudadList() {
|
||||||
return ciudadList;
|
return ciudadList;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCiudadList(List<Ciudad> ciudadList) {
|
public void setCiudadList(List<Ciudad> ciudadList) {
|
||||||
this.ciudadList = ciudadList;
|
this.ciudadList = ciudadList;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getEquivalenciaId() {
|
public String getEquivalenciaId() {
|
||||||
return equivalenciaId;
|
return equivalenciaId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setEquivalenciaId(String equivalenciaId) {
|
public void setEquivalenciaId(String equivalenciaId) {
|
||||||
this.equivalenciaId = equivalenciaId;
|
this.equivalenciaId = equivalenciaId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getCveestado() {
|
public String getCveestado() {
|
||||||
return cveestado;
|
return cveestado;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -134,28 +138,35 @@ public class Estado implements Serializable {
|
||||||
this.cveestado = cveestado;
|
this.cveestado = cveestado;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public BigDecimal getIcms() {
|
||||||
|
return icms;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIcms(BigDecimal icms) {
|
||||||
|
this.icms = icms;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
int hash = 0;
|
int hash = 0;
|
||||||
hash += (estadoId != null ? estadoId.hashCode() : 0);
|
hash += (estadoId != null ? estadoId.hashCode() : 0);
|
||||||
return hash;
|
return hash;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object object) {
|
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)) {
|
||||||
if (!(object instanceof Estado)) {
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
Estado other = (Estado) object;
|
||||||
Estado other = (Estado) object;
|
if ((this.estadoId == null && other.estadoId != null) || (this.estadoId != null && !this.estadoId.equals(other.estadoId))) {
|
||||||
if ((this.estadoId == null && other.estadoId != null) || (this.estadoId != null && !this.estadoId.equals(other.estadoId))) {
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
return true;
|
||||||
return true;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return this.getNombestado();
|
return this.getNombestado();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue