Skip to content

Commit

Permalink
Merge pull request #15 from svetlinas/master
Browse files Browse the repository at this point in the history
Add images
  • Loading branch information
ivannov committed Jan 27, 2015
2 parents 04afb48 + 919809b commit ebabf25
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/main/java/slbedu/library/dao/BookDAO.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public BookDAO(EntityManager em) {
}

public void addBook(Book book) {
EntityTransaction tx = beginTransaciton();
EntityTransaction tx = beginTransaction();
Book foundBook = findByAuthorAndTitle(book.getAuthor(), book.getTitle());
if (foundBook == null) {
em.persist(book);
Expand Down Expand Up @@ -49,7 +49,7 @@ public Book findByAuthorAndTitle(String author, String title) {
}

public void borrowBook(Book bookToBorrow, User userWhoTakesTheBook) {
EntityTransaction tx = beginTransaciton();
EntityTransaction tx = beginTransaction();
Book foundBook = findById(bookToBorrow.getId());
int newAmount = foundBook.getAmount() - 1;
foundBook.setAmount(newAmount);
Expand All @@ -58,7 +58,7 @@ public void borrowBook(Book bookToBorrow, User userWhoTakesTheBook) {
}

public void returnBook(Book book, User user) {
EntityTransaction tx = beginTransaciton();
EntityTransaction tx = beginTransaction();
Book foundBook = findById(book.getId());
int newAmount = book.getAmount() + 1;
foundBook.setAmount(newAmount);
Expand All @@ -67,7 +67,7 @@ public void returnBook(Book book, User user) {
commitTransaction(tx);
}

private EntityTransaction beginTransaciton() {
private EntityTransaction beginTransaction() {
EntityTransaction tx = em.getTransaction();
tx.begin();
return tx;
Expand Down
Binary file added src/main/webapp/images/Research-Library_books.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion src/main/webapp/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@
})
</script>
</head>
<body>
<body background="images/Research-Library_books.jpg">
<div class="main">
<div>
<p class="content" />
</div>
</div>
</body>
</html>
11 changes: 11 additions & 0 deletions src/main/webapp/styles/bootstrap.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ebabf25

Please sign in to comment.