From 6c5bde3516d3b49df04ae2f34a1a96ee915bf71b Mon Sep 17 00:00:00 2001 From: Pekka Helenius Date: Thu, 1 Oct 2020 15:35:53 +0300 Subject: [PATCH] Remove unnecessary 'public' access modifier Signed-off-by: Pekka Helenius --- .../bookstore/model/book/AuthorRepository.java | 6 +++--- .../bookstore/model/book/BookHashRepository.java | 4 ++-- .../bookstore/model/book/BookRepository.java | 12 ++++++------ .../bookstore/model/book/CategoryRepository.java | 4 ++-- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/bookstore/src/main/java/com/fjordtek/bookstore/model/book/AuthorRepository.java b/bookstore/src/main/java/com/fjordtek/bookstore/model/book/AuthorRepository.java index e58be42..80d3ea9 100644 --- a/bookstore/src/main/java/com/fjordtek/bookstore/model/book/AuthorRepository.java +++ b/bookstore/src/main/java/com/fjordtek/bookstore/model/book/AuthorRepository.java @@ -24,17 +24,17 @@ import org.springframework.data.rest.core.annotation.RestResource; public interface AuthorRepository extends CrudRepository { @RestResource(path = "fullname", rel = "fullname") - public List findByFirstNameIgnoreCaseContainingAndLastNameIgnoreCaseContaining( + List findByFirstNameIgnoreCaseContainingAndLastNameIgnoreCaseContaining( @Param("firstname") String firstName, @Param("lastname") String lastName ); @RestResource(path = "firstname", rel = "firstname") - public List findByFirstNameIgnoreCaseContaining( + List findByFirstNameIgnoreCaseContaining( @Param("firstname") String firstName ); @RestResource(path = "lastname", rel = "lastname") - public List findByLastNameIgnoreCaseContaining( + List findByLastNameIgnoreCaseContaining( @Param("lastname") String lastName ); diff --git a/bookstore/src/main/java/com/fjordtek/bookstore/model/book/BookHashRepository.java b/bookstore/src/main/java/com/fjordtek/bookstore/model/book/BookHashRepository.java index 9d3a98e..f66682c 100644 --- a/bookstore/src/main/java/com/fjordtek/bookstore/model/book/BookHashRepository.java +++ b/bookstore/src/main/java/com/fjordtek/bookstore/model/book/BookHashRepository.java @@ -22,7 +22,7 @@ import org.springframework.data.rest.core.annotation.RepositoryRestResource; ) public interface BookHashRepository extends CrudRepository { - public BookHash findByHashId(String bookHashId); + BookHash findByHashId(String bookHashId); /* * We need to override native delete method. @@ -33,6 +33,6 @@ public interface BookHashRepository extends CrudRepository { value = "DELETE FROM BOOK_HASH i WHERE i.book_id = :bookid", nativeQuery = true ) - public void deleteByBookId(@Param("bookid") Long bookId); + void deleteByBookId(@Param("bookid") Long bookId); } \ No newline at end of file diff --git a/bookstore/src/main/java/com/fjordtek/bookstore/model/book/BookRepository.java b/bookstore/src/main/java/com/fjordtek/bookstore/model/book/BookRepository.java index a829e80..aa3a0a2 100644 --- a/bookstore/src/main/java/com/fjordtek/bookstore/model/book/BookRepository.java +++ b/bookstore/src/main/java/com/fjordtek/bookstore/model/book/BookRepository.java @@ -28,10 +28,10 @@ public interface BookRepository extends CrudRepository { @Override //@RestResource(exported = false) - public Optional findById(Long id); + Optional findById(Long id); @RestResource(path = "title", rel = "title") - public List findByTitleIgnoreCaseContaining(@Param("name") String title); + List findByTitleIgnoreCaseContaining(@Param("name") String title); /* Assume a single book with a single ISBN, or multiple books with possibly duplicate ISBNs? * For meanwhile, we have a UNIQUE constraint for ISBN values. If this policy changes, @@ -40,13 +40,13 @@ public interface BookRepository extends CrudRepository { */ //public List findByIsbn(String isbn); @RestResource(exported = false) - public Book findByIsbn(String isbn); + Book findByIsbn(String isbn); @RestResource(exported = false) - public boolean existsByIsbn(String isbn); + boolean existsByIsbn(String isbn); @Override - public List findAll(); + List findAll(); /* * We need to override native delete method due to book hash id usage. @@ -58,6 +58,6 @@ public interface BookRepository extends CrudRepository { value = "DELETE FROM BOOK i WHERE i.id = :id", nativeQuery = true ) - public void deleteById(@Param("id") Long id); + void deleteById(@Param("id") Long id); } \ No newline at end of file diff --git a/bookstore/src/main/java/com/fjordtek/bookstore/model/book/CategoryRepository.java b/bookstore/src/main/java/com/fjordtek/bookstore/model/book/CategoryRepository.java index 580b522..3c3ed29 100644 --- a/bookstore/src/main/java/com/fjordtek/bookstore/model/book/CategoryRepository.java +++ b/bookstore/src/main/java/com/fjordtek/bookstore/model/book/CategoryRepository.java @@ -24,9 +24,9 @@ import org.springframework.data.rest.core.annotation.RestResource; public interface CategoryRepository extends CrudRepository { @RestResource(exported = false) - public List findByName(@Param("name") String name); + List findByName(@Param("name") String name); @RestResource(path = "category", rel = "category") - public List findByNameIgnoreCaseContaining(@Param("name") String name); + List findByNameIgnoreCaseContaining(@Param("name") String name); } \ No newline at end of file