241 lines
6.0 KiB
Java
241 lines
6.0 KiB
Java
/*
|
|
* To change this template, choose Tools | Templates
|
|
* and open the template in the editor.
|
|
*/
|
|
package com.rjconsultores.ventaboletos.entidad;
|
|
|
|
import java.io.Serializable;
|
|
import java.util.ArrayList;
|
|
import java.util.Date;
|
|
import java.util.List;
|
|
|
|
import javax.persistence.Basic;
|
|
import javax.persistence.CascadeType;
|
|
import javax.persistence.Column;
|
|
import javax.persistence.Entity;
|
|
import javax.persistence.Id;
|
|
import javax.persistence.JoinColumn;
|
|
import javax.persistence.ManyToOne;
|
|
import javax.persistence.NamedQueries;
|
|
import javax.persistence.NamedQuery;
|
|
import javax.persistence.OneToMany;
|
|
import javax.persistence.Table;
|
|
import javax.persistence.Temporal;
|
|
import javax.persistence.TemporalType;
|
|
|
|
/**
|
|
*
|
|
* @author Rafael
|
|
*/
|
|
@Entity
|
|
@Table(name = "PTOVTA_AGENCIABANCARIA")
|
|
@NamedQueries({
|
|
@NamedQuery(name = "PtovtaAgenciaBancaria.findAll", query = "SELECT p FROM PtovtaAgenciaBancaria p")})
|
|
public class PtovtaAgenciaBancaria implements Serializable {
|
|
private static final long serialVersionUID = 1L;
|
|
@Id
|
|
@Basic(optional = false)
|
|
@Column(name = "ID")
|
|
private Integer id;
|
|
@Basic(optional = false)
|
|
@Column(name = "NUMAGENCIA")
|
|
private String numagencia;
|
|
@Basic(optional = false)
|
|
@Column(name = "NUMCONTA")
|
|
private String numconta;
|
|
@Basic(optional = false)
|
|
@Column(name = "PESSOA")
|
|
private String pessoa;
|
|
@Basic(optional = false)
|
|
@Column(name = "TIPO")
|
|
private String tipo;
|
|
@Basic(optional = false)
|
|
@Column(name = "BILHETES")
|
|
private String bilhetes;
|
|
@Basic(optional = false)
|
|
@Column(name = "CARGA")
|
|
private String carga;
|
|
@Basic(optional = false)
|
|
@Column(name = "ACTIVO")
|
|
private Boolean activo;
|
|
@Basic(optional = false)
|
|
@Column(name = "FECMODIF")
|
|
@Temporal(TemporalType.TIMESTAMP)
|
|
private Date fecmodif;
|
|
@Basic(optional = false)
|
|
@Column(name = "USUARIO_ID")
|
|
private int usuarioId;
|
|
|
|
@JoinColumn(name = "BANCO_ID", referencedColumnName = "ID")
|
|
@ManyToOne(optional = false)
|
|
private PtovtaBanco bancoId;
|
|
|
|
|
|
@OneToMany(cascade = CascadeType.ALL, mappedBy = "agenciaId")
|
|
private List<PuntoVenta> puntoVentaList;
|
|
|
|
public PtovtaAgenciaBancaria() {
|
|
}
|
|
|
|
public PtovtaAgenciaBancaria(Integer id) {
|
|
this.id = id;
|
|
}
|
|
|
|
private static List<String> pessoaList = new ArrayList<String>();
|
|
private static List<String> tpContaList = new ArrayList<String>();
|
|
|
|
static{
|
|
pessoaList.add("blue");
|
|
pessoaList.add("black");
|
|
|
|
tpContaList.add("small");
|
|
tpContaList.add("medium");
|
|
}
|
|
|
|
public PtovtaAgenciaBancaria(Integer id, String numagencia, String numconta, String pessoa, String tipo, String bilhetes, String carga, Boolean activo, Date fecmodif, int usuarioId) {
|
|
this.id = id;
|
|
this.numagencia = numagencia;
|
|
this.numconta = numconta;
|
|
this.pessoa = pessoa;
|
|
this.tipo = tipo;
|
|
this.bilhetes = bilhetes;
|
|
this.carga = carga;
|
|
this.activo = activo;
|
|
this.fecmodif = fecmodif;
|
|
this.usuarioId = usuarioId;
|
|
}
|
|
|
|
public Integer getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(Integer id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public String getNumagencia() {
|
|
return numagencia;
|
|
}
|
|
|
|
public void setNumagencia(String numagencia) {
|
|
this.numagencia = numagencia;
|
|
}
|
|
|
|
public String getNumconta() {
|
|
return numconta;
|
|
}
|
|
|
|
public void setNumconta(String numconta) {
|
|
this.numconta = numconta;
|
|
}
|
|
|
|
public String getPessoa() {
|
|
return pessoa;
|
|
}
|
|
|
|
public void setPessoa(String pessoa) {
|
|
this.pessoa = pessoa;
|
|
}
|
|
|
|
public String getTipo() {
|
|
return tipo;
|
|
}
|
|
|
|
public void setTipo(String tipo) {
|
|
this.tipo = tipo;
|
|
}
|
|
|
|
public String getBilhetes() {
|
|
return bilhetes;
|
|
}
|
|
|
|
public void setBilhetes(String bilhetes) {
|
|
this.bilhetes = bilhetes;
|
|
}
|
|
|
|
public String getCarga() {
|
|
return carga;
|
|
}
|
|
|
|
public void setCarga(String carga) {
|
|
this.carga = carga;
|
|
}
|
|
|
|
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 int getUsuarioId() {
|
|
return usuarioId;
|
|
}
|
|
|
|
public void setUsuarioId(int usuarioId) {
|
|
this.usuarioId = usuarioId;
|
|
}
|
|
|
|
|
|
|
|
public PtovtaBanco getBancoId() {
|
|
return bancoId;
|
|
}
|
|
|
|
public void setBancoId(PtovtaBanco bancoId) {
|
|
this.bancoId = bancoId;
|
|
}
|
|
|
|
public List<PuntoVenta> getPuntoVentaList() {
|
|
return puntoVentaList;
|
|
}
|
|
|
|
public void setPuntoVentaList(List<PuntoVenta> puntoVentaList) {
|
|
this.puntoVentaList = puntoVentaList;
|
|
}
|
|
|
|
|
|
public static List<String> getPessoaList() {
|
|
return pessoaList;
|
|
}
|
|
|
|
public static List<String> getTipoContaList() {
|
|
return tpContaList;
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
int hash = 0;
|
|
hash += (id != null ? id.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 PtovtaAgenciaBancaria)) {
|
|
return false;
|
|
}
|
|
PtovtaAgenciaBancaria other = (PtovtaAgenciaBancaria) object;
|
|
if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return "com.rjconsultores.ventaboletos.entidad.PtovtaAgencia[ id=" + id + " ]";
|
|
}
|
|
|
|
}
|