From 33613a85afc4b1481367fbe92a17ee59c240250b Mon Sep 17 00:00:00 2001 From: Sven Eisenhauer Date: Fri, 10 Nov 2023 15:11:48 +0100 Subject: add new repo --- .../h_da/library/borrowing/usecase/Borrowing.html | 253 +++++++++++++++++++++ 1 file changed, 253 insertions(+) create mode 100644 Master/Reference Architectures and Patterns/doc/de/h_da/library/borrowing/usecase/Borrowing.html (limited to 'Master/Reference Architectures and Patterns/doc/de/h_da/library/borrowing/usecase/Borrowing.html') diff --git a/Master/Reference Architectures and Patterns/doc/de/h_da/library/borrowing/usecase/Borrowing.html b/Master/Reference Architectures and Patterns/doc/de/h_da/library/borrowing/usecase/Borrowing.html new file mode 100644 index 0000000..4790e8e --- /dev/null +++ b/Master/Reference Architectures and Patterns/doc/de/h_da/library/borrowing/usecase/Borrowing.html @@ -0,0 +1,253 @@ + + + + + + +Borrowing + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +de.h_da.library.borrowing.usecase +
+Interface Borrowing

+
+
+
public interface Borrowing
+ + +

+[usecase] This use case comprises all library customer functionality for + borrowing and returning books. +

+ +

+


+ +

+ + + + + + + + + + + + + + + + +
+Method Summary
+ intborrowBook(int bookOnStockId, + int customerId) + +
+          [command] Generates a new Loan object.
+ voidreturnBook(int loanId) + +
+          [command] Marks a Loan as being returned.
+  +

+ + + + + + + + +
+Method Detail
+ +

+borrowBook

+
+int borrowBook(int bookOnStockId,
+               int customerId)
+
+
[command] Generates a new Loan object. +

+

+
Parameters:
bookOnStockId - [in] id of BookOnStock to be borrowed
customerId - [in] id of Customer who borrows the book +
Returns:
[out] id of generated Loan object + +
+    [pre exists Customer c: c.id == customerId
+     pre exists BookOnStock boS: boS.id == bookOnStockId
+     post exists new Loan l:
+       l.id == result
+       && l.loanDate is current date
+       && l.dueDate is current date plus 30 days
+       && l.customer.id == customerId
+       && l.bookOnStock.id == bookOnStockId
+       && l.reminder == null
+       && l.status == LoanStatus.BORROWED
+     ]
+ 
+
+
+
+ +

+returnBook

+
+void returnBook(int loanId)
+
+
[command] Marks a Loan as being returned. +

+

+
Parameters:
loanId - [in] id of Loan object + +
+   [pre exists Loan l (l.id == loanId)
+    pre l.status == LoanStatus.BORROWED
+    post l.status == LoanStatus.RETURNED
+   ]
+ 
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + -- cgit v1.2.3