diff options
| author | Sven Eisenhauer <sven@sven-eisenhauer.net> | 2023-11-10 15:11:48 +0100 |
|---|---|---|
| committer | Sven Eisenhauer <sven@sven-eisenhauer.net> | 2023-11-10 15:11:48 +0100 |
| commit | 33613a85afc4b1481367fbe92a17ee59c240250b (patch) | |
| tree | 670b842326116b376b505ec2263878912fca97e2 /Master/Reference Architectures and Patterns/EJB 3.0 Code/Gerald Examples/src/examples/entity/intro/Bank.java | |
| download | Studium-master.tar.gz Studium-master.tar.bz2 | |
Diffstat (limited to 'Master/Reference Architectures and Patterns/EJB 3.0 Code/Gerald Examples/src/examples/entity/intro/Bank.java')
| -rw-r--r-- | Master/Reference Architectures and Patterns/EJB 3.0 Code/Gerald Examples/src/examples/entity/intro/Bank.java | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/Master/Reference Architectures and Patterns/EJB 3.0 Code/Gerald Examples/src/examples/entity/intro/Bank.java b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Gerald Examples/src/examples/entity/intro/Bank.java new file mode 100644 index 0000000..625978e --- /dev/null +++ b/Master/Reference Architectures and Patterns/EJB 3.0 Code/Gerald Examples/src/examples/entity/intro/Bank.java @@ -0,0 +1,60 @@ +package examples.entity.intro;
+
+import java.util.List;
+
+/**
+ * Business interface of the Bank session bean, a facade for the
+ * Account entity bean.
+ */
+
+public interface Bank {
+
+ /**
+ * List accounts in the bank
+ * @return the list of accounts
+ */
+ List<Account> listAccounts();
+
+ /**
+ * Opens a new account
+ * @param ownerName
+ * @return the account object
+ */
+ Account openAccount(String ownerName);
+
+ Account openAccount(String ownerName, int accNum);
+
+ void printBigAccounts();
+
+ /**
+ * Find out the balance of account with given accountNumber
+ * @param accountNumber
+ * @return the current balance
+ */
+ int getBalance(int accountNumber);
+
+ /**
+ * Increases the balance of account with given accountNumber by amount
+ * @param accountNumber
+ * @param amount the amount
+ */
+ void deposit(int accountNumber, int amount);
+
+ /**
+ * Withdraws a given amount, the current balance permitting
+ * @param accountNumber
+ * @param amount
+ * @return amount, if successful, 0 otherwise
+ */
+ int withdraw(int accountNumber, int amount);
+
+ public void checkBalance(int accountNumber);
+
+ /**
+ * Destroys the entity permanently
+ * @param accountNumber
+ */
+ void close(int accountNumber);
+
+ void update(Account a);
+}
|
