Commit 6f326193 by Rubén Ramírez

fix: [Repositorio*]: Aclarado el código de los repositorios

parent d91eb063
......@@ -76,9 +76,7 @@ public class RepositorioCapitulo {
@Transactional
public void eliminarFuentePorId(Long id) {
FuenteCapitulo fuente = em.find(FuenteCapitulo.class, id);
if (fuente != null) {
em.remove(fuente);
}
if (fuente != null) em.remove(fuente);
}
}
......@@ -31,7 +31,7 @@ public class RepositorioRecurso {
"SELECT r FROM Recurso r WHERE LOWER(r.titulo) LIKE LOWER(:titulo)",
Recurso.class)
.setParameter("titulo", "%" + titulo + "%")
.setMaxResults(maxResults) // Limita la cantidad de resultados
.setMaxResults(maxResults)
.getResultList();
}
......@@ -41,7 +41,7 @@ public class RepositorioRecurso {
"SELECT r FROM Recurso r WHERE LOWER(r.autor) LIKE LOWER(:autor)",
Recurso.class)
.setParameter("autor", "%" + autor + "%")
.setMaxResults(maxResults) // Limita la cantidad de resultados
.setMaxResults(maxResults)
.getResultList();
}
......@@ -61,7 +61,7 @@ public class RepositorioRecurso {
Recurso.class)
.setParameter("inicio", fechaInicio)
.setParameter("fin", fechaFin)
.setMaxResults(maxResults) // Limita la cantidad de resultados
.setMaxResults(maxResults)
.getResultList();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment