Package com.example.restapi.service
Class BorrowingService
java.lang.Object
com.example.restapi.service.BorrowingService
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate BookRepositoryprivate BorrowingRepositoryprivate UserRepository -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanborrowBook(Long bookId, User user) voiddeleteByBookUserId(Long bookId, Long userId) getBorrowedBooksByUser(String username) getBorrowingDetails(Long bookId, Long userId) getBorrowingsDetails(Long bookId, Long userId) booleanreturnBook(Long bookId)
-
Field Details
-
bookRepository
-
userRepository
-
borrowingRepository
-
-
Constructor Details
-
BorrowingService
public BorrowingService()
-
-
Method Details
-
getAllBorrowings
-
borrowBook
-
returnBook
-
getBorrowedBooksByUser
-
getBorrowingDetails
-
getBorrowingsDetails
-
deleteByBookUserId
-