From 62dde4228080913e31bc139cb529517108987708 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Thu, 8 Jun 2017 22:48:29 +0200 Subject: [PATCH] Continued: - added new business methods allUsersReceipts() and addReceipt() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../FinancialReceiptSessionBeanRemote.java | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/org/mxchange/jfinancials/financial/receipt/FinancialReceiptSessionBeanRemote.java b/src/org/mxchange/jfinancials/financial/receipt/FinancialReceiptSessionBeanRemote.java index ba10685..8cb847d 100644 --- a/src/org/mxchange/jfinancials/financial/receipt/FinancialReceiptSessionBeanRemote.java +++ b/src/org/mxchange/jfinancials/financial/receipt/FinancialReceiptSessionBeanRemote.java @@ -17,7 +17,11 @@ package org.mxchange.jfinancials.financial.receipt; import java.io.Serializable; +import java.util.Collection; import javax.ejb.Remote; +import org.mxchange.jfinancials.exceptions.ReceiptAlreadyAddedException; +import org.mxchange.jfinancials.model.receipt.BillableReceipt; +import org.mxchange.jusercore.model.user.User; /** * A remote interface for financial receipt stuff @@ -27,4 +31,26 @@ import javax.ejb.Remote; @Remote public interface FinancialReceiptSessionBeanRemote extends Serializable { + /** + * Returns a collection of all user's receipts + *

+ * @param user User instance to get all receipts for + *

+ * @return A collection of all user's receipts + */ + Collection allUsersReceipts (final User user); + + /** + * Adds given receipt and returns the updated version. If the receipt has + * already been found, a proper exception is being thrown. + *

+ * @param receipt Receipt being added + *

+ * @return Updated receipt + *

+ * @throws ReceiptAlreadyAddedException If the receipt has already been + * added + */ + BillableReceipt addReceipt (final BillableReceipt receipt) throws ReceiptAlreadyAddedException; + } -- 2.39.5