-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #65 from anishmu20/feature-add-dto
Feature: added dto layer issue #52
- Loading branch information
Showing
14 changed files
with
582 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
package com.libraryman_api.book; | ||
|
||
public class BookDto { | ||
|
||
|
||
private int bookId; | ||
private String title; | ||
|
||
private String author; | ||
|
||
private String isbn; | ||
|
||
private String publisher; | ||
|
||
|
||
private int publishedYear; | ||
private String genre; | ||
|
||
private int copiesAvailable; | ||
|
||
public BookDto(int bookId, String title, String author, String isbn, String publisher, int publishedYear, String genre, int copiesAvailable) { | ||
this.bookId = bookId; | ||
this.title = title; | ||
this.author = author; | ||
this.isbn = isbn; | ||
this.publisher = publisher; | ||
this.publishedYear = publishedYear; | ||
this.genre = genre; | ||
this.copiesAvailable = copiesAvailable; | ||
} | ||
|
||
public BookDto() { | ||
} | ||
|
||
public int getBookId() { | ||
return bookId; | ||
} | ||
|
||
public void setBookId(int bookId) { | ||
this.bookId = bookId; | ||
} | ||
|
||
public String getTitle() { | ||
return title; | ||
} | ||
|
||
public void setTitle(String title) { | ||
this.title = title; | ||
} | ||
|
||
public String getAuthor() { | ||
return author; | ||
} | ||
|
||
public void setAuthor(String author) { | ||
this.author = author; | ||
} | ||
|
||
public String getIsbn() { | ||
return isbn; | ||
} | ||
|
||
public void setIsbn(String isbn) { | ||
this.isbn = isbn; | ||
} | ||
|
||
public String getPublisher() { | ||
return publisher; | ||
} | ||
|
||
public void setPublisher(String publisher) { | ||
this.publisher = publisher; | ||
} | ||
|
||
public int getPublishedYear() { | ||
return publishedYear; | ||
} | ||
|
||
public void setPublishedYear(int publishedYear) { | ||
this.publishedYear = publishedYear; | ||
} | ||
|
||
public String getGenre() { | ||
return genre; | ||
} | ||
|
||
public void setGenre(String genre) { | ||
this.genre = genre; | ||
} | ||
|
||
public int getCopiesAvailable() { | ||
return copiesAvailable; | ||
} | ||
|
||
public void setCopiesAvailable(int copiesAvailable) { | ||
this.copiesAvailable = copiesAvailable; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "BookDto{" + | ||
"bookId=" + bookId + | ||
", title='" + title + '\'' + | ||
", author='" + author + '\'' + | ||
", isbn='" + isbn + '\'' + | ||
", publisher='" + publisher + '\'' + | ||
", publishedYear=" + publishedYear + | ||
", genre='" + genre + '\'' + | ||
", copiesAvailable=" + copiesAvailable + | ||
'}'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.