This website works better with JavaScript.
Home
Explore
Register
Sign In
Fincer
/
java-bookstore
mirror of
https://github.com/Fincer/java-bookstore
Watch
1
Star
0
Fork
0
Code
Issues
0
Releases
4
Wiki
Activity
Browse Source
Rename method: updateWithoutPrice -> updateWithoutPriceAndWithoutPublish
Signed-off-by: Pekka Helenius <fincer89@hotmail.com>
v0.0.3-alpha
Pekka Helenius
4 years ago
parent
a176f7b1b3
commit
84f58b706e
3 changed files
with
3 additions
and
3 deletions
Unified View
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-1
bookstore/src/main/java/com/fjordtek/bookstore/model/book/BookRepositoryCustom.java
+1
-1
bookstore/src/main/java/com/fjordtek/bookstore/model/book/BookRepositoryImpl.java
+1
-1
bookstore/src/main/java/com/fjordtek/bookstore/web/BookController.java
+ 1
- 1
bookstore/src/main/java/com/fjordtek/bookstore/model/book/BookRepositoryCustom.java
View File
@ -9,7 +9,7 @@ import java.util.List;
public
interface
BookRepositoryCustom
{
public
interface
BookRepositoryCustom
{
void
updateWithoutPrice
(
Book
book
)
;
void
updateWithoutPrice
AndWithoutPublish
(
Book
book
)
;
List
<
Book
>
findAllPublished
(
)
;
List
<
Book
>
findAllPublished
(
)
;
}
}
+ 1
- 1
bookstore/src/main/java/com/fjordtek/bookstore/model/book/BookRepositoryImpl.java
View File
@ -25,7 +25,7 @@ public class BookRepositoryImpl implements BookRepositoryCustom {
*
Hibernate
takes
care
of
entityManager
transactions
(
begin
,
commit
,
rollback
,
close
,
etc
.
)
*
Hibernate
takes
care
of
entityManager
transactions
(
begin
,
commit
,
rollback
,
close
,
etc
.
)
*
/
*
/
@Override
@Override
public
void
updateWithoutPrice
(
Book
book
)
{
public
void
updateWithoutPrice
AndWithoutPublish
(
Book
book
)
{
try
{
try
{
+ 1
- 1
bookstore/src/main/java/com/fjordtek/bookstore/web/BookController.java
View File
@ -354,7 +354,7 @@ public class BookController {
bookAuthorHelper
.
detectAndSaveUpdateAuthorForBook
(
book
)
;
bookAuthorHelper
.
detectAndSaveUpdateAuthorForBook
(
book
)
;
if
(
book
.
getPrice
(
)
=
=
null
)
{
if
(
book
.
getPrice
(
)
=
=
null
)
{
bookRepository
.
updateWithoutPrice
(
book
)
;
bookRepository
.
updateWithoutPrice
AndWithoutPublish
(
book
)
;
}
else
{
}
else
{
bookRepository
.
save
(
book
)
;
bookRepository
.
save
(
book
)
;
}
}
Write
Preview
Loading…
Cancel
Save