File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed
HibernateSpringBootExampleApi/src/main/java/com/bookstore Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -34,14 +34,14 @@ public ApplicationRunner init() {
3434 book .setAuthor ("Olivia Goy" );
3535 book .setPrice (23 );
3636
37- boolean foundAnd = bookstoreService .existsBookAnd (book );
38- System .out .println ("\n Found (and ): " + foundAnd );
37+ boolean foundAnd = bookstoreService .existsBook1 (book );
38+ System .out .println ("Found (existsBook1 ): " + foundAnd + " \n " );
3939
40- boolean foundOr = bookstoreService .existsBookAnd (book );
41- System .out .println ("\n Found (or ): " + foundOr );
40+ boolean foundOr = bookstoreService .existsBook2 (book );
41+ System .out .println ("Found (existsBook2 ): " + foundOr + " \n " );
4242
43- boolean foundIgnorePath = bookstoreService .existsBookIgnorePath (book );
44- System .out .println ("\n Found (ignore path ): " + foundIgnorePath );
43+ boolean foundIgnorePath = bookstoreService .existsBook3 (book );
44+ System .out .println ("Found (existsBook3 ): " + foundIgnorePath + " \n " );
4545 };
4646 }
4747}
Original file line number Diff line number Diff line change @@ -15,20 +15,20 @@ public BookstoreService(BookRepository bookRepository) {
1515 this .bookRepository = bookRepository ;
1616 }
1717
18- public boolean existsBookAnd (Book book ) {
18+ public boolean existsBook1 (Book book ) {
1919
2020 Example <Book > bookExample = Example .of (book );
2121 return bookRepository .exists (bookExample );
2222 }
2323
24- public boolean existsBookOr (Book book ) {
24+ public boolean existsBook2 (Book book ) {
2525
2626 Example <Book > bookExample = Example .of (book ,
2727 ExampleMatcher .matchingAll ().withIgnorePaths ("genre" ).withIgnorePaths ("price" ));
2828 return bookRepository .exists (bookExample );
2929 }
3030
31- public boolean existsBookIgnorePath (Book book ) {
31+ public boolean existsBook3 (Book book ) {
3232
3333 Example <Book > bookExample = Example .of (book ,
3434 ExampleMatcher .matchingAny ().withIgnorePaths ("genre" ).withIgnorePaths ("price" ));
You can’t perform that action at this time.
0 commit comments