fixes bug #5847
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@39881 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
8f145a0912
commit
ce175d6e3e
|
@ -0,0 +1,11 @@
|
|||
package com.rjconsultores.ventaboletos.dao;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.TipoIdentificacion;
|
||||
|
||||
public interface TipoIdentificacionDAO extends GenericDAO<TipoIdentificacion, Integer> {
|
||||
|
||||
public List<TipoIdentificacion> obtenerTodos();
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package com.rjconsultores.ventaboletos.dao.hibernate;
|
||||
|
||||
import org.hibernate.SessionFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.rjconsultores.ventaboletos.dao.TipoIdentificacionDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.TipoIdentificacion;
|
||||
|
||||
@Repository("tipoIdentificacionDAO")
|
||||
public class TipoIdentificacionHibernateDAO extends GenericHibernateDAO<TipoIdentificacion, Integer> implements TipoIdentificacionDAO {
|
||||
|
||||
@Autowired
|
||||
public TipoIdentificacionHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) {
|
||||
setSessionFactory(factory);
|
||||
}
|
||||
|
||||
}
|
|
@ -107,6 +107,12 @@ public class Cliente implements Serializable {
|
|||
private String numIdentificaDos;
|
||||
@Column(name = "INDBLOQUEO")
|
||||
private Boolean indBloqueo;
|
||||
@JoinColumn(name = "TIPOIDENTIFICAUNO_ID")
|
||||
@OneToOne
|
||||
private TipoIdentificacion tipoIdentificacionUno;
|
||||
@JoinColumn(name = "TIPOIDENTIFICADOS_ID")
|
||||
@OneToOne
|
||||
private TipoIdentificacion tipoIdentificacionDos;
|
||||
|
||||
public Cliente() {
|
||||
}
|
||||
|
@ -402,4 +408,21 @@ public class Cliente implements Serializable {
|
|||
public String toString() {
|
||||
return "com.rjconsultores.ventaboletos.entidad.Cliente[ clienteId=" + clienteId + " ]";
|
||||
}
|
||||
|
||||
public TipoIdentificacion getTipoIdentificacionUno() {
|
||||
return tipoIdentificacionUno;
|
||||
}
|
||||
|
||||
public void setTipoIdentificacionUno(TipoIdentificacion tipoIdentificacionUno) {
|
||||
this.tipoIdentificacionUno = tipoIdentificacionUno;
|
||||
}
|
||||
|
||||
public TipoIdentificacion getTipoIdentificacionDos() {
|
||||
return tipoIdentificacionDos;
|
||||
}
|
||||
|
||||
public void setTipoIdentificacionDos(TipoIdentificacion tipoIdentificacionDos) {
|
||||
this.tipoIdentificacionDos = tipoIdentificacionDos;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,103 @@
|
|||
package com.rjconsultores.ventaboletos.entidad;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
|
||||
@Entity
|
||||
@Table(name = "TIPO_IDENTIFICACION")
|
||||
public class TipoIdentificacion implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@Column(name = "TIPOIDENTIFICACION_ID")
|
||||
private Integer tipoIdentificacionId;
|
||||
|
||||
@Column(name = "DESCTIPO")
|
||||
private String desctipo;
|
||||
|
||||
@Column(name = "ACTIVO")
|
||||
private Boolean activo;
|
||||
|
||||
@Column(name = "FECMODIF")
|
||||
private Date fecmodif;
|
||||
|
||||
@Column(name = "USUARIO_ID")
|
||||
private Integer usuarioId;
|
||||
|
||||
public Integer getTipoIdentificacionId() {
|
||||
return tipoIdentificacionId;
|
||||
}
|
||||
|
||||
public void setTipoIdentificacionId(Integer tipoIdentificacionId) {
|
||||
this.tipoIdentificacionId = tipoIdentificacionId;
|
||||
}
|
||||
|
||||
public String getDesctipo() {
|
||||
return desctipo;
|
||||
}
|
||||
|
||||
public void setDesctipo(String desctipo) {
|
||||
this.desctipo = desctipo;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getDesctipo();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((tipoIdentificacionId == null) ? 0 : tipoIdentificacionId.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
TipoIdentificacion other = (TipoIdentificacion) obj;
|
||||
if (tipoIdentificacionId == null) {
|
||||
if (other.tipoIdentificacionId != null)
|
||||
return false;
|
||||
} else if (!tipoIdentificacionId.equals(other.tipoIdentificacionId))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
package com.rjconsultores.ventaboletos.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.TipoIdentificacion;
|
||||
|
||||
public interface TipoIdentificacionService {
|
||||
|
||||
public List<TipoIdentificacion> obtenerTodos();
|
||||
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
package com.rjconsultores.ventaboletos.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.rjconsultores.ventaboletos.dao.TipoIdentificacionDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.TipoIdentificacion;
|
||||
import com.rjconsultores.ventaboletos.service.TipoIdentificacionService;
|
||||
|
||||
@Service("tipoIdentificacionService")
|
||||
public class TipoIdentificacionServiceImpl implements TipoIdentificacionService {
|
||||
|
||||
@Autowired
|
||||
private TipoIdentificacionDAO tipoIdentificacionDAO;
|
||||
|
||||
@Override
|
||||
public List<TipoIdentificacion> obtenerTodos() {
|
||||
return tipoIdentificacionDAO.obtenerTodos();
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue