406 lines
9.8 KiB
Java
406 lines
9.8 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.Date;
|
|
import java.util.List;
|
|
|
|
import javax.persistence.Basic;
|
|
import javax.persistence.CascadeType;
|
|
import javax.persistence.Column;
|
|
import javax.persistence.Entity;
|
|
import javax.persistence.FetchType;
|
|
import javax.persistence.GeneratedValue;
|
|
import javax.persistence.GenerationType;
|
|
import javax.persistence.Id;
|
|
import javax.persistence.JoinColumn;
|
|
import javax.persistence.NamedQueries;
|
|
import javax.persistence.NamedQuery;
|
|
import javax.persistence.OneToMany;
|
|
import javax.persistence.OneToOne;
|
|
import javax.persistence.SequenceGenerator;
|
|
import javax.persistence.Table;
|
|
import javax.persistence.Temporal;
|
|
import javax.persistence.TemporalType;
|
|
import javax.xml.bind.annotation.XmlRootElement;
|
|
|
|
/**
|
|
*
|
|
* @author RJ
|
|
*/
|
|
@Entity
|
|
@SequenceGenerator(name = "CLIENTE_SEQ", sequenceName = "CLIENTE_SEQ", allocationSize = 1)
|
|
@Table(name = "CLIENTE")
|
|
|
|
public class Cliente implements Serializable {
|
|
private static final long serialVersionUID = 1L;
|
|
@Id
|
|
@Basic(optional = false)
|
|
@GeneratedValue(strategy = GenerationType.AUTO, generator = "CLIENTE_SEQ")
|
|
@Column(name = "CLIENTE_ID")
|
|
private Integer clienteId;
|
|
|
|
@Column(name = "NOMBCLIENTE")
|
|
private String nombcliente;
|
|
|
|
@Column(name = "APELLIDOPATERNO")
|
|
private String apellidopaterno;
|
|
|
|
@Column(name = "APELLIDOMATERNO")
|
|
private String apellidomaterno;
|
|
|
|
@Column(name = "FECNACIMIENTO")
|
|
@Temporal(TemporalType.TIMESTAMP)
|
|
private Date fecnacimiento;
|
|
|
|
@Column(name = "NUMRFC")
|
|
private String numrfc;
|
|
|
|
@Column(name = "NUMTELEFONO")
|
|
private String numtelefono;
|
|
|
|
@Column(name = "NUMTELEFONODOS")
|
|
private String numtelefonodos;
|
|
|
|
@Column(name = "NUMFAX")
|
|
private String numfax;
|
|
|
|
@Column(name = "NUMEXTENSION")
|
|
private String numextension;
|
|
|
|
@Column(name = "NUMEXTENSIONDOS")
|
|
private String numextensiondos;
|
|
|
|
|
|
@JoinColumn(name = "TIPOOCUPACION_ID")
|
|
@OneToOne(cascade=CascadeType.ALL)
|
|
private TipoOcupacion tipoocupacionId;
|
|
|
|
@Column(name = "MEDIOINFORMATIVO_ID")
|
|
private Integer medioinformativoId;
|
|
|
|
|
|
@JoinColumn(name = "MOTIVOVIAJE_ID")
|
|
@OneToOne(cascade=CascadeType.ALL)
|
|
private MotivoViaje motivoviajeId;
|
|
|
|
@Column(name = "INDSEXO")
|
|
private String indsexo;
|
|
|
|
@Column(name = "NUMCURP")
|
|
private String numcurp;
|
|
|
|
@Column(name = "CANTHIJOS")
|
|
private Integer canthijos;
|
|
|
|
@Column(name = "DESCCORREO")
|
|
private String desccorreo;
|
|
|
|
@Column(name = "EDAD")
|
|
private Integer edad;
|
|
|
|
@Column(name = "ESTADOCIVIL_ID")
|
|
private Integer estadocivilId;
|
|
|
|
@Column(name = "GRADOESTUDIO_ID")
|
|
private Integer gradoestudioId;
|
|
|
|
@Column(name = "EQUIVALENCIA_ID")
|
|
private String equivalenciaId;
|
|
|
|
@Column(name = "ACTIVO")
|
|
private Boolean activo;
|
|
|
|
@Column(name = "FECMODIF")
|
|
@Temporal(TemporalType.TIMESTAMP)
|
|
private Date fecmodif;
|
|
|
|
@Column(name = "USUARIO_ID")
|
|
private Integer usuarioId;
|
|
|
|
@Column(name = "DESCCONTRASENA")
|
|
private String desccontrasena;
|
|
|
|
@Column(name = "NUMLADA")
|
|
private String numlada;
|
|
|
|
@Column(name = "INDCAMBIOCONTRASENA")
|
|
private Integer indcambiocontrasena;
|
|
|
|
|
|
@OneToMany(cascade = CascadeType.ALL, mappedBy = "clienteId")
|
|
private List<ClienteDireccion> lsClienteDireccion;
|
|
|
|
|
|
|
|
|
|
public Cliente() {
|
|
}
|
|
|
|
public Cliente(Integer clienteId) {
|
|
this.clienteId = clienteId;
|
|
}
|
|
|
|
public Integer getClienteId() {
|
|
return clienteId;
|
|
}
|
|
|
|
public void setClienteId(Integer clienteId) {
|
|
this.clienteId = clienteId;
|
|
}
|
|
|
|
public String getNombcliente() {
|
|
return nombcliente;
|
|
}
|
|
|
|
public void setNombcliente(String nombcliente) {
|
|
this.nombcliente = nombcliente;
|
|
}
|
|
|
|
public String getApellidopaterno() {
|
|
return apellidopaterno;
|
|
}
|
|
|
|
public void setApellidopaterno(String apellidopaterno) {
|
|
this.apellidopaterno = apellidopaterno;
|
|
}
|
|
|
|
public String getApellidomaterno() {
|
|
return apellidomaterno;
|
|
}
|
|
|
|
public void setApellidomaterno(String apellidomaterno) {
|
|
this.apellidomaterno = apellidomaterno;
|
|
}
|
|
|
|
public Date getFecnacimiento() {
|
|
return fecnacimiento;
|
|
}
|
|
|
|
public void setFecnacimiento(Date fecnacimiento) {
|
|
this.fecnacimiento = fecnacimiento;
|
|
}
|
|
|
|
public String getNumrfc() {
|
|
return numrfc;
|
|
}
|
|
|
|
public void setNumrfc(String numrfc) {
|
|
this.numrfc = numrfc;
|
|
}
|
|
|
|
public String getNumtelefono() {
|
|
return numtelefono;
|
|
}
|
|
|
|
public void setNumtelefono(String numtelefono) {
|
|
this.numtelefono = numtelefono;
|
|
}
|
|
|
|
public String getNumtelefonodos() {
|
|
return numtelefonodos;
|
|
}
|
|
|
|
public void setNumtelefonodos(String numtelefonodos) {
|
|
this.numtelefonodos = numtelefonodos;
|
|
}
|
|
|
|
public String getNumfax() {
|
|
return numfax;
|
|
}
|
|
|
|
public void setNumfax(String numfax) {
|
|
this.numfax = numfax;
|
|
}
|
|
|
|
public String getNumextension() {
|
|
return numextension;
|
|
}
|
|
|
|
public void setNumextension(String numextension) {
|
|
this.numextension = numextension;
|
|
}
|
|
|
|
public String getNumextensiondos() {
|
|
return numextensiondos;
|
|
}
|
|
|
|
public void setNumextensiondos(String numextensiondos) {
|
|
this.numextensiondos = numextensiondos;
|
|
}
|
|
|
|
public TipoOcupacion getTipoocupacionId() {
|
|
return tipoocupacionId;
|
|
}
|
|
|
|
public void setTipoocupacionId(TipoOcupacion tipoocupacionId) {
|
|
this.tipoocupacionId = tipoocupacionId;
|
|
}
|
|
|
|
public Integer getMedioinformativoId() {
|
|
return medioinformativoId;
|
|
}
|
|
|
|
public void setMedioinformativoId(Integer medioinformativoId) {
|
|
this.medioinformativoId = medioinformativoId;
|
|
}
|
|
|
|
public MotivoViaje getMotivoviajeId() {
|
|
return motivoviajeId;
|
|
}
|
|
|
|
public void setMotivoviajeId(MotivoViaje motivoviajeId) {
|
|
this.motivoviajeId = motivoviajeId;
|
|
}
|
|
|
|
public String getIndsexo() {
|
|
return indsexo;
|
|
}
|
|
|
|
public void setIndsexo(String indsexo) {
|
|
this.indsexo = indsexo;
|
|
}
|
|
|
|
public String getNumcurp() {
|
|
return numcurp;
|
|
}
|
|
|
|
public void setNumcurp(String numcurp) {
|
|
this.numcurp = numcurp;
|
|
}
|
|
|
|
public Integer getCanthijos() {
|
|
return canthijos;
|
|
}
|
|
|
|
public void setCanthijos(Integer canthijos) {
|
|
this.canthijos = canthijos;
|
|
}
|
|
|
|
public String getDesccorreo() {
|
|
return desccorreo;
|
|
}
|
|
|
|
public void setDesccorreo(String desccorreo) {
|
|
this.desccorreo = desccorreo;
|
|
}
|
|
|
|
public Integer getEdad() {
|
|
return edad;
|
|
}
|
|
|
|
public void setEdad(Integer edad) {
|
|
this.edad = edad;
|
|
}
|
|
|
|
public Integer getEstadocivilId() {
|
|
return estadocivilId;
|
|
}
|
|
|
|
public void setEstadocivilId(Integer estadocivilId) {
|
|
this.estadocivilId = estadocivilId;
|
|
}
|
|
|
|
public Integer getGradoestudioId() {
|
|
return gradoestudioId;
|
|
}
|
|
|
|
public void setGradoestudioId(Integer gradoestudioId) {
|
|
this.gradoestudioId = gradoestudioId;
|
|
}
|
|
|
|
public String getEquivalenciaId() {
|
|
return equivalenciaId;
|
|
}
|
|
|
|
public void setEquivalenciaId(String equivalenciaId) {
|
|
this.equivalenciaId = equivalenciaId;
|
|
}
|
|
|
|
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 String getDesccontrasena() {
|
|
return desccontrasena;
|
|
}
|
|
|
|
public void setDesccontrasena(String desccontrasena) {
|
|
this.desccontrasena = desccontrasena;
|
|
}
|
|
|
|
public String getNumlada() {
|
|
return numlada;
|
|
}
|
|
|
|
public void setNumlada(String numlada) {
|
|
this.numlada = numlada;
|
|
}
|
|
|
|
public Integer getIndcambiocontrasena() {
|
|
return indcambiocontrasena;
|
|
}
|
|
|
|
public void setIndcambiocontrasena(Integer indcambiocontrasena) {
|
|
this.indcambiocontrasena = indcambiocontrasena;
|
|
}
|
|
|
|
|
|
public List<ClienteDireccion> getLsClienteDireccion() {
|
|
return lsClienteDireccion;
|
|
}
|
|
|
|
public void setLsClienteDireccion(List<ClienteDireccion> lsClienteDireccion) {
|
|
this.lsClienteDireccion = lsClienteDireccion;
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
int hash = 0;
|
|
hash += (clienteId != null ? clienteId.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 Cliente)) {
|
|
return false;
|
|
}
|
|
Cliente other = (Cliente) object;
|
|
if ((this.clienteId == null && other.clienteId != null) || (this.clienteId != null && !this.clienteId.equals(other.clienteId))) {
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return "com.rjconsultores.ventaboletos.entidad.Cliente[ clienteId=" + clienteId + " ]";
|
|
}
|
|
|
|
}
|