Merge pull request 'Se agrega funcionalidad de STATUS SOLICITUD EXPRESO' (!303) from AL-5135 into master
Reviewed-on: adm/ModelWeb#303 Reviewed-by: Lucas Taiã <lucas@rjconsultores.com.br>master
commit
f62d0f31a5
2
pom.xml
2
pom.xml
|
@ -3,7 +3,7 @@
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>br.com.rjconsultores</groupId>
|
<groupId>br.com.rjconsultores</groupId>
|
||||||
<artifactId>ModelWeb</artifactId>
|
<artifactId>ModelWeb</artifactId>
|
||||||
<version>1.121.3</version>
|
<version>1.121.4</version>
|
||||||
|
|
||||||
<distributionManagement>
|
<distributionManagement>
|
||||||
<repository>
|
<repository>
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
package com.rjconsultores.ventaboletos.dao;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.StatusSolicitudExpreso;
|
||||||
|
|
||||||
|
public interface StatusSolicitudExpresosDAO extends GenericDAO<StatusSolicitudExpreso, Integer>{
|
||||||
|
|
||||||
|
StatusSolicitudExpreso obtenerStatusPorDesc(String descripcion);
|
||||||
|
}
|
|
@ -0,0 +1,39 @@
|
||||||
|
package com.rjconsultores.ventaboletos.dao.hibernate;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.hibernate.Criteria;
|
||||||
|
import org.hibernate.SessionFactory;
|
||||||
|
import org.hibernate.criterion.Order;
|
||||||
|
import org.hibernate.criterion.Restrictions;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Qualifier;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.dao.StatusSolicitudExpresosDAO;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.Ciudad;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.StatusSolicitudExpreso;
|
||||||
|
|
||||||
|
@Repository("statusSolicitudExpresosDAO")
|
||||||
|
public class StatusSolicitudExpresosHibernateDAO extends GenericHibernateDAO<StatusSolicitudExpreso, Integer> implements StatusSolicitudExpresosDAO{
|
||||||
|
@Autowired
|
||||||
|
public StatusSolicitudExpresosHibernateDAO(@Qualifier("sessionFactory") SessionFactory factory) {
|
||||||
|
setSessionFactory(factory);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<StatusSolicitudExpreso> obtenerTodos() {
|
||||||
|
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||||
|
|
||||||
|
return c.list();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public StatusSolicitudExpreso obtenerStatusPorDesc(String descripcion) {
|
||||||
|
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||||
|
c.add(Restrictions.eq(ACTIVO, Boolean.TRUE));
|
||||||
|
c.add(Restrictions.eq("descStatusSolicitudExpreso", descripcion));
|
||||||
|
|
||||||
|
return (StatusSolicitudExpreso) c.list().get(0);
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,9 +1,11 @@
|
||||||
package com.rjconsultores.ventaboletos.entidad;
|
package com.rjconsultores.ventaboletos.entidad;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.Id;
|
||||||
import javax.persistence.SequenceGenerator;
|
import javax.persistence.SequenceGenerator;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
import javax.persistence.Temporal;
|
import javax.persistence.Temporal;
|
||||||
|
@ -13,8 +15,11 @@ import br.com.rjconsultores.auditador.annotations.AuditarClasse;
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "STATUS_SOLICITUD_EXPRESO")
|
@Table(name = "STATUS_SOLICITUD_EXPRESO")
|
||||||
public class StatusSolicitudExpreso {
|
public class StatusSolicitudExpreso implements Serializable{
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Id
|
||||||
@Column(name = "STATUSSOLICITUDEXPRESO_ID")
|
@Column(name = "STATUSSOLICITUDEXPRESO_ID")
|
||||||
private Integer statusSolicitudExpresoId;
|
private Integer statusSolicitudExpresoId;
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
package com.rjconsultores.ventaboletos.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.StatusSolicitudExpreso;
|
||||||
|
|
||||||
|
public interface StatusSolicitudExpresosService extends GenericService<StatusSolicitudExpreso, Integer>{
|
||||||
|
|
||||||
|
StatusSolicitudExpreso obtenerStatusPorDesc(String descripcion);
|
||||||
|
}
|
|
@ -0,0 +1,52 @@
|
||||||
|
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.SolicitudExpresosDAO;
|
||||||
|
import com.rjconsultores.ventaboletos.dao.StatusSolicitudExpresosDAO;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.StatusSolicitudExpreso;
|
||||||
|
import com.rjconsultores.ventaboletos.service.StatusSolicitudExpresosService;
|
||||||
|
|
||||||
|
@Service("statusSolicitudExpresosService")
|
||||||
|
public class StatusSolicitudExpresosServiceImpl implements StatusSolicitudExpresosService{
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private StatusSolicitudExpresosDAO statusSolicitudExpresosDAO;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<StatusSolicitudExpreso> obtenerTodos() {
|
||||||
|
return statusSolicitudExpresosDAO.obtenerTodos();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public StatusSolicitudExpreso obtenerStatusPorDesc(String descripcion) {
|
||||||
|
return statusSolicitudExpresosDAO.obtenerStatusPorDesc(descripcion);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public StatusSolicitudExpreso obtenerID(Integer id) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public StatusSolicitudExpreso suscribir(StatusSolicitudExpreso entidad) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public StatusSolicitudExpreso actualizacion(StatusSolicitudExpreso entidad) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void borrar(StatusSolicitudExpreso entidad) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue