From: Roland Häder Date: Thu, 8 Jun 2017 20:48:29 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=62dde4228080913e31bc139cb529517108987708;p=jbonuscard-lib.git Continued: - added new business methods allUsersReceipts() and addReceipt() Signed-off-by: Roland Häder --- 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; + }