244 lines
6.5 KiB
Java
244 lines
6.5 KiB
Java
package com.rjconsultores.ventaboletos.entidad;
|
|
|
|
import java.io.Serializable;
|
|
import java.math.BigDecimal;
|
|
import java.util.Date;
|
|
|
|
import javax.persistence.Basic;
|
|
import javax.persistence.Column;
|
|
import javax.persistence.Entity;
|
|
import javax.persistence.GeneratedValue;
|
|
import javax.persistence.GenerationType;
|
|
import javax.persistence.Id;
|
|
import javax.persistence.JoinColumn;
|
|
import javax.persistence.ManyToOne;
|
|
import javax.persistence.SequenceGenerator;
|
|
import javax.persistence.Table;
|
|
import javax.persistence.Temporal;
|
|
import javax.persistence.TemporalType;
|
|
import javax.persistence.Transient;
|
|
|
|
import org.hibernate.Hibernate;
|
|
|
|
import br.com.rjconsultores.auditador.annotations.AuditarClasse;
|
|
import br.com.rjconsultores.auditador.annotations.NaoAuditar;
|
|
import br.com.rjconsultores.auditador.interfaces.Auditavel;
|
|
@AuditarClasse(nome = "OrgaoEmpParam", tela = "auditarClasse.OrgaoEmpParam")
|
|
@Entity
|
|
@SequenceGenerator(name = "ORGAO_EMP_PARAM_SEQ", sequenceName = "ORGAO_EMP_PARAM_SEQ", allocationSize = 1)
|
|
@Table(name = "ORGAO_EMP_PARAM")
|
|
public class OrgaoEmpParam implements Serializable, Auditavel<OrgaoEmpParam> {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
@Id
|
|
@Basic(optional = false)
|
|
@GeneratedValue(strategy = GenerationType.AUTO, generator = "ORGAO_EMP_PARAM_SEQ")
|
|
@Column(name = "ORGAOEMPPARAM_ID")
|
|
private Integer orgaoempparamId;
|
|
|
|
@Column(name = "INDEMITESEGUNDAVIA")
|
|
private Boolean indemitesegundavia;
|
|
|
|
@Column(name = "INDDOISCUPOMEMBARQUE")
|
|
private Boolean inddoiscupomembarque;
|
|
|
|
@Column(name = "INDNAORESTRINGE2VIABPE")
|
|
private Boolean indNaoRestringe2ViaBPe;
|
|
|
|
@ManyToOne
|
|
@JoinColumn(name = "ORGAOCONCEDENTE_ID", referencedColumnName = "ORGAOCONCEDENTE_ID")
|
|
private OrgaoConcedente orgaoConcedente;
|
|
|
|
@ManyToOne
|
|
@JoinColumn(name = "EMPRESA_ID", referencedColumnName = "EMPRESA_ID")
|
|
private Empresa empresa;
|
|
|
|
@Column(name = "ACTIVO")
|
|
private Boolean activo;
|
|
|
|
@Column(name = "FECMODIF")
|
|
@Temporal(TemporalType.TIMESTAMP)
|
|
private Date fecmodif;
|
|
|
|
@Column(name = "USUARIO_ID")
|
|
private Integer usuarioId;
|
|
|
|
@Column(name = "CODEMPRESAPORORGAO", length=30)
|
|
private String codEmpresaPorOrgao;
|
|
|
|
@Column(name = "INDICEEXCESSODEPAGAGEM")
|
|
private BigDecimal indiceExcessoDeBagagem;
|
|
|
|
@Column(name = "PESOEXCESSODEBAGAGEMFRANQUIA")
|
|
private Integer pesoExcessoDeBagagemFranquia;
|
|
|
|
@Column(name = "PESOEXTRAEXCESSODEBAGAGEM")
|
|
private Integer pesoExtraExcessoDeBagagem;
|
|
|
|
@Column(name = "INDEMITE2VIAAPOSSAIDA")
|
|
private Boolean chkIndEmite2ViaAposSaida;
|
|
|
|
@Transient
|
|
@NaoAuditar
|
|
private OrgaoEmpParam orgaoEmpParamClone;
|
|
|
|
public String getCodEmpresaPorOrgao() {
|
|
return codEmpresaPorOrgao;
|
|
}
|
|
|
|
public void setCodEmpresaPorOrgao(String codEmpresaPorOrgao) {
|
|
this.codEmpresaPorOrgao = codEmpresaPorOrgao;
|
|
}
|
|
|
|
public Integer getOrgaoempparamId() {
|
|
return orgaoempparamId;
|
|
}
|
|
|
|
public void setOrgaoempparamId(Integer orgaoempparamId) {
|
|
this.orgaoempparamId = orgaoempparamId;
|
|
}
|
|
|
|
public Boolean getIndemitesegundavia() {
|
|
return indemitesegundavia;
|
|
}
|
|
|
|
public void setIndemitesegundavia(Boolean indemitesegundavia) {
|
|
this.indemitesegundavia = indemitesegundavia;
|
|
}
|
|
|
|
public Boolean getInddoiscupomembarque() {
|
|
return inddoiscupomembarque;
|
|
}
|
|
|
|
public void setInddoiscupomembarque(Boolean inddoiscupomembarque) {
|
|
this.inddoiscupomembarque = inddoiscupomembarque;
|
|
}
|
|
|
|
public OrgaoConcedente getOrgaoConcedente() {
|
|
return orgaoConcedente;
|
|
}
|
|
|
|
public void setOrgaoConcedente(OrgaoConcedente orgaoConcedente) {
|
|
this.orgaoConcedente = orgaoConcedente;
|
|
}
|
|
|
|
public Empresa getEmpresa() {
|
|
return empresa;
|
|
}
|
|
|
|
public void setEmpresa(Empresa empresa) {
|
|
this.empresa = empresa;
|
|
}
|
|
|
|
public Boolean getActivo() {
|
|
return activo;
|
|
}
|
|
|
|
public void setActivo(Boolean activo) {
|
|
this.activo = activo;
|
|
}
|
|
|
|
public Date getFecmodif() {
|
|
return fecmodif;
|
|
}
|
|
|
|
public void setFecmodif(Date fecmodif) {
|
|
this.fecmodif = fecmodif;
|
|
}
|
|
|
|
public Integer getUsuarioId() {
|
|
return usuarioId;
|
|
}
|
|
|
|
public void setUsuarioId(Integer usuarioId) {
|
|
this.usuarioId = usuarioId;
|
|
}
|
|
|
|
public Boolean getIndNaoRestringe2ViaBPe() {
|
|
return indNaoRestringe2ViaBPe == null ? false : indNaoRestringe2ViaBPe;
|
|
}
|
|
|
|
public void setIndNaoRestringe2ViaBPe(Boolean indNaoRestringe2ViaBPe) {
|
|
this.indNaoRestringe2ViaBPe = indNaoRestringe2ViaBPe;
|
|
}
|
|
|
|
|
|
|
|
public BigDecimal getIndiceExcessoDeBagagem() {
|
|
return indiceExcessoDeBagagem;
|
|
}
|
|
|
|
public void setIndiceExcessoDeBagagem(BigDecimal indiceExcessoDeBagagem) {
|
|
this.indiceExcessoDeBagagem = indiceExcessoDeBagagem;
|
|
}
|
|
|
|
|
|
public Integer getPesoExcessoDeBagagemFranquia() {
|
|
return pesoExcessoDeBagagemFranquia;
|
|
}
|
|
|
|
public void setPesoExcessoDeBagagemFranquia(Integer pesoExcessoDeBagagemFranquia) {
|
|
this.pesoExcessoDeBagagemFranquia = pesoExcessoDeBagagemFranquia;
|
|
}
|
|
|
|
public Integer getPesoExtraExcessoDeBagagem() {
|
|
return pesoExtraExcessoDeBagagem;
|
|
}
|
|
|
|
public void setPesoExtraExcessoDeBagagem(Integer pesoExtraExcessoDeBagagem) {
|
|
this.pesoExtraExcessoDeBagagem = pesoExtraExcessoDeBagagem;
|
|
}
|
|
|
|
public Boolean getChkIndEmite2ViaAposSaida() {
|
|
return chkIndEmite2ViaAposSaida == null ? false : chkIndEmite2ViaAposSaida;
|
|
}
|
|
|
|
public void setChkIndEmite2ViaAposSaida(Boolean chkIndEmite2ViaAposSaida) {
|
|
this.chkIndEmite2ViaAposSaida = chkIndEmite2ViaAposSaida;
|
|
}
|
|
|
|
@Override
|
|
public void clonar() throws CloneNotSupportedException {
|
|
orgaoEmpParamClone = new OrgaoEmpParam();
|
|
orgaoEmpParamClone = (OrgaoEmpParam) this.clone();
|
|
Hibernate.initialize(orgaoEmpParamClone.getOrgaoConcedente());
|
|
}
|
|
|
|
@Override
|
|
public OrgaoEmpParam getCloneObject() throws CloneNotSupportedException {
|
|
return orgaoEmpParamClone;
|
|
}
|
|
|
|
@Override
|
|
public String getTextoInclusaoExclusao() {
|
|
return String.format("ID [%s]", getOrgaoempparamId());
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
final int prime = 31;
|
|
int result = 1;
|
|
result = prime * result + ((orgaoempparamId == null) ? 0 : orgaoempparamId.hashCode());
|
|
return result;
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(Object obj) {
|
|
if (this == obj)
|
|
return true;
|
|
if (obj == null)
|
|
return false;
|
|
if (!(obj instanceof OrgaoEmpParam))
|
|
return false;
|
|
OrgaoEmpParam other = (OrgaoEmpParam) obj;
|
|
if (getOrgaoempparamId() == null) {
|
|
if (other.getOrgaoempparamId() != null)
|
|
return false;
|
|
} else if (!getOrgaoempparamId().equals(other.getOrgaoempparamId()))
|
|
return false;
|
|
return true;
|
|
}
|
|
|
|
}
|