]> git.mxchange.org Git - jfinancials-lib.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Thu, 8 Jun 2017 20:48:29 +0000 (22:48 +0200)
committerRoland Häder <roland@mxchange.org>
Thu, 8 Jun 2017 20:48:29 +0000 (22:48 +0200)
- added new business methods allUsersReceipts() and addReceipt()

Signed-off-by: Roland Häder <roland@mxchange.org>
src/org/mxchange/jfinancials/financial/receipt/FinancialReceiptSessionBeanRemote.java

index ba106859d25f1bb09b1da2eb0ab3df518e6b1255..8cb847d6d7ddb796a0162b4facaea50f7c8457bc 100644 (file)
 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
+        * <p>
+        * @param user User instance to get all receipts for
+        * <p>
+        * @return A collection of all user's receipts
+        */
+       Collection<? extends BillableReceipt> 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.
+        * <p>
+        * @param receipt Receipt being added
+        * <p>
+        * @return Updated receipt
+        * <p>
+        * @throws ReceiptAlreadyAddedException If the receipt has already been
+        * added
+        */
+       BillableReceipt addReceipt (final BillableReceipt receipt) throws ReceiptAlreadyAddedException;
+
 }