package it.yudharta.peminjamanlcd.service;

import it.yudharta.peminjamanlcd.entity.Barang;
import it.yudharta.peminjamanlcd.repository.BarangRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class BarangService {
    @Autowired
    BarangRepository barangRepository;
    
    public Iterable<Barang> findAll() {
        return barangRepository.findAll();
    }
    
}

@@ -210,16 +210,110 @@
 owired;%0A
+import org.springframework.data.domain.Page;%0Aimport org.springframework.data.domain.Pageable;%0A
 import o
@@ -351,16 +351,16 @@
 ervice;%0A
-
 %0A@Servic
@@ -390,16 +390,17 @@
 rvice %7B%0A
+%0A
     @Aut
@@ -445,21 +445,17 @@
 sitory;%0A
-    
 %0A
+
     publ
@@ -535,15 +535,383 @@
 ;%0A    %7D%0A
+%0A
     
+public Page%3CBarang%3E findAll(Pageable pageable) %7B%0A        return barangRepository.findAll(pageable);%0A    %7D%0A    %0A    public Barang findOne(Integer id) %7B%0A        return barangRepository.findOne(id);%0A    %7D%0A%0A    public void save(Barang barang) %7B%0A        barangRepository.save(barang);%0A    %7D%0A%0A    public void delete(Integer id) %7B%0A        barangRepository.delete(id);%0A    %7D%0A
 %0A%7D%0A

update barang service