From 753b52271dd16fea4a85cb9f2ce5f0c829ff384c Mon Sep 17 00:00:00 2001 From: Joaquin Elias Baranda Ayala Date: Thu, 4 Nov 2021 08:29:18 -0300 Subject: [PATCH] Filtro de postulante por Tecnologia o Nivel --- curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java | 5 +++++ curriculumsearch/src/main/java/com/roshka/modelo/PostulanteTecnologia.java | 6 ------ curriculumsearch/src/main/java/com/roshka/repositorio/PostulanteRepository.java | 9 ++++++++- curriculumsearch/src/main/java/com/roshka/repositorio/PostulanteTecnologiaRepository.java | 3 +++ 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java b/curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java index 7e4eec7..6b37ca2 100644 --- a/curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java +++ b/curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java @@ -1,10 +1,13 @@ package com.roshka.controller; +import java.util.List; + import javax.validation.ConstraintViolationException; import com.roshka.modelo.Postulante; +import com.roshka.modelo.PostulanteTecnologia; import com.roshka.repositorio.PostulanteRepository; import com.roshka.repositorio.TecnologiaRepository; @@ -63,5 +66,7 @@ public class PostulanteController { return ResponseEntity.status(HttpStatus.BAD_REQUEST) .body(ex.getMessage()); } + + } diff --git a/curriculumsearch/src/main/java/com/roshka/modelo/PostulanteTecnologia.java b/curriculumsearch/src/main/java/com/roshka/modelo/PostulanteTecnologia.java index bed7f3c..d1a730b 100644 --- a/curriculumsearch/src/main/java/com/roshka/modelo/PostulanteTecnologia.java +++ b/curriculumsearch/src/main/java/com/roshka/modelo/PostulanteTecnologia.java @@ -63,10 +63,4 @@ public class PostulanteTecnologia { } - - - - - - } diff --git a/curriculumsearch/src/main/java/com/roshka/repositorio/PostulanteRepository.java b/curriculumsearch/src/main/java/com/roshka/repositorio/PostulanteRepository.java index 6ea288f..80c6b1c 100644 --- a/curriculumsearch/src/main/java/com/roshka/repositorio/PostulanteRepository.java +++ b/curriculumsearch/src/main/java/com/roshka/repositorio/PostulanteRepository.java @@ -1,10 +1,17 @@ package com.roshka.repositorio; +import java.util.List; + import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; import com.roshka.modelo.Postulante; +import com.roshka.modelo.PostulanteTecnologia; public interface PostulanteRepository extends JpaRepository { - + @Query("select pos from Postulante pos join PostulanteTecnologia pt on pt.postulante.id=pos.id "+ + "join Tecnologia tec on pt.tecnologia.id=tec.id "+ + "where tec.nombre=?1 and pt.nivel=?2") + public List findByPostulanteTecnologiaM(String tecno,long idt); } diff --git a/curriculumsearch/src/main/java/com/roshka/repositorio/PostulanteTecnologiaRepository.java b/curriculumsearch/src/main/java/com/roshka/repositorio/PostulanteTecnologiaRepository.java index 89f1172..35f4130 100644 --- a/curriculumsearch/src/main/java/com/roshka/repositorio/PostulanteTecnologiaRepository.java +++ b/curriculumsearch/src/main/java/com/roshka/repositorio/PostulanteTecnologiaRepository.java @@ -1,10 +1,13 @@ package com.roshka.repositorio; import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; import com.roshka.modelo.PostulanteTecnologia; public interface PostulanteTecnologiaRepository extends JpaRepository{ + + } -- libgit2 0.26.0