File tree Expand file tree Collapse file tree 4 files changed +10
-20
lines changed
src/main/java/com/api/rest/microelectronica Expand file tree Collapse file tree 4 files changed +10
-20
lines changed Original file line number Diff line number Diff line change 11package com .api .rest .microelectronica .controllers ;
22
3- import java .util .List ;
4-
53import org .springframework .beans .factory .annotation .Autowired ;
64import org .springframework .data .domain .Page ;
75import org .springframework .data .domain .Pageable ;
@@ -52,9 +50,9 @@ public void deleteComponente(@PathVariable("id") int id) {
5250 // ---GET---
5351 // --- LISTADO PAGINADO Y COMPLETO ---
5452 @ GetMapping ("/listado" )
55- public List <ComponenteCapacitorElectroliticoEntity > getAll (Pageable pageable ) {
53+ public Page <ComponenteCapacitorElectroliticoEntity > getAll (Pageable pageable ) {
5654
57- return componenteCapacitorElectroliticoService .getAllCapacitorElectrolitico (pageable );
55+ return componenteCapacitorElectroliticoService .getAll (pageable );
5856 }
5957
6058
Original file line number Diff line number Diff line change 11package com .api .rest .microelectronica .controllers ;
22
3- import java . util . List ;
3+
44
55import org .springframework .beans .factory .annotation .Autowired ;
66import org .springframework .data .domain .Page ;
@@ -51,7 +51,7 @@ public boolean deleteComponenteDetalle(@PathVariable("id") int id) {
5151 // ---GET---
5252 // --- LISTADO PAGINADO Y COMPLETO ---
5353 @ GetMapping ("/listado" )
54- public List <ComponenteTransistorBipolarEntity > getAll (Pageable pageable ) {
54+ public Page <ComponenteTransistorBipolarEntity > getAll (Pageable pageable ) {
5555
5656 return componenteTransistorBipolarService .getAllComponente (pageable );
5757 }
Original file line number Diff line number Diff line change 11package com .api .rest .microelectronica .services ;
22
3- import java . util . List ;
3+
44
55import org .apache .logging .log4j .Logger ;
66import org .springframework .beans .factory .annotation .Autowired ;
1111import com .api .rest .microelectronica .entities .ComponenteCapacitorElectroliticoEntity ;
1212import com .api .rest .microelectronica .exceptions .capacitor .electrolitico .CapacitorElectroliticoIdMismatchException ;
1313import com .api .rest .microelectronica .exceptions .capacitor .electrolitico .CapacitorElectroliticoNotFoundException ;
14- import com .api .rest .microelectronica .exceptions .componentes .detalles .ComponenteDetalleIdMismatchException ;
15- import com .api .rest .microelectronica .exceptions .componentes .detalles .ComponenteDetalleNotFoundException ;
1614import com .api .rest .microelectronica .repositories .I_ComponenteCapacitorElectroliticoRepository ;
1715
1816@ Service
@@ -96,9 +94,9 @@ public void deleteCapacitorElectrolitico(int id) {
9694 // ===================
9795
9896 // ------- LISTADO PAGINADO ---------
99- public List <ComponenteCapacitorElectroliticoEntity > getAllCapacitorElectrolitico (Pageable pageable ) {
97+ public Page <ComponenteCapacitorElectroliticoEntity > getAll (Pageable pageable ) {
10098
101- return iCapacitorElectroliticoRepository .findAll (pageable ). getContent () ;
99+ return iCapacitorElectroliticoRepository .findAll (pageable );
102100 }
103101
104102 // =============== MÉTODOS DE BUSQUEDA ====================
Original file line number Diff line number Diff line change 11package com .api .rest .microelectronica .services ;
22
3- import java . util . List ;
3+
44
55import org .apache .logging .log4j .Logger ;
66import org .springframework .beans .factory .annotation .Autowired ;
@@ -75,18 +75,12 @@ public boolean deleteComponente(int id) {
7575 }
7676 }
7777
78- // ------ SELECT --------
79- //------- LISTADO COMPLETO ---------
80- public List <ComponenteTransistorBipolarEntity > getAllComponente () {
81-
82- return iTransistorBipolarRepository .findAll ();
83- }
8478
8579 // ------ SELECT --------
8680 //------- LISTADO PAGINADO ---------
87- public List <ComponenteTransistorBipolarEntity > getAllComponente (Pageable pageable ) {
81+ public Page <ComponenteTransistorBipolarEntity > getAllComponente (Pageable pageable ) {
8882
89- return iTransistorBipolarRepository .findAll (pageable ). getContent () ;
83+ return iTransistorBipolarRepository .findAll (pageable );
9084 }
9185
9286 // =============== MÉTODOS DE BUSQUEDA ====================
You can’t perform that action at this time.
0 commit comments