gleimar 2012-09-06 21:32:47 +00:00
parent 6f5c83dcd3
commit 9793254c16
3 changed files with 54 additions and 1 deletions

View File

@ -1,5 +1,9 @@
package com.rjconsultores.ventaboletos.service; package com.rjconsultores.ventaboletos.service;
import java.util.List;
import com.rjconsultores.ventaboletos.vo.conexion.ConexionVO;
public interface ConexionService { public interface ConexionService {
@ -9,4 +13,5 @@ public interface ConexionService {
*/ */
public void gerarConexiones(); public void gerarConexiones();
public List<ConexionVO> buscarConexiones(Integer origenId,Integer destinoId);
} }

View File

@ -1,5 +1,7 @@
package com.rjconsultores.ventaboletos.service.impl; package com.rjconsultores.ventaboletos.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
@ -7,6 +9,7 @@ import org.springframework.transaction.annotation.Transactional;
import com.rjconsultores.ventaboletos.dao.ConexionDAO; import com.rjconsultores.ventaboletos.dao.ConexionDAO;
import com.rjconsultores.ventaboletos.service.ConexionService; import com.rjconsultores.ventaboletos.service.ConexionService;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado; import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
import com.rjconsultores.ventaboletos.vo.conexion.ConexionVO;
@Service("conexionService") @Service("conexionService")
public class ConexionServiceImpl implements ConexionService { public class ConexionServiceImpl implements ConexionService {
@ -20,4 +23,9 @@ public class ConexionServiceImpl implements ConexionService {
conexionDAO.generarConexiones(UsuarioLogado.getUsuarioLogado().getUsuarioId()); conexionDAO.generarConexiones(UsuarioLogado.getUsuarioLogado().getUsuarioId());
} }
@Override
public List<ConexionVO> buscarConexiones(Integer origenId, Integer destinoId) {
return conexionDAO.buscarConexiones(origenId, destinoId);
}
} }

View File

@ -0,0 +1,40 @@
package com.rjconsultores.ventaboletos.vo.conexion;
public class ConexionVO {
private String conOrigen;
private String conDestino;
private Integer grupo;
private String tramoOrigen;
private String tramoDestino;
public String getConOrigen() {
return conOrigen;
}
public void setConOrigen(String conOrigen) {
this.conOrigen = conOrigen;
}
public String getConDestino() {
return conDestino;
}
public void setConDestino(String conDestino) {
this.conDestino = conDestino;
}
public Integer getGrupo() {
return grupo;
}
public void setGrupo(Integer grupo) {
this.grupo = grupo;
}
public String getTramoOrigen() {
return tramoOrigen;
}
public void setTramoOrigen(String tramoOrigen) {
this.tramoOrigen = tramoOrigen;
}
public String getTramoDestino() {
return tramoDestino;
}
public void setTramoDestino(String tramoDestino) {
this.tramoDestino = tramoDestino;
}
}