Class semper.payment.generic.Bank
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class semper.payment.generic.Bank

java.lang.Object
   |
   +----semper.payment.generic.Bank

public class Bank
extends Object
Bank
Version:
$Revision: 1.9 $ $Date: 1997/02/25 10:52:58 $
Author:
Jose-Luis Abad-Peiro (jla@zurich.ibm.com)
See Also:
Acquirer, genericModule, genericAccount, genericTransaction, genericpurse

Constructor Index

 o Bank()

Method Index

 o biggerAmount(String, Amount)
Method to check if an amount is bigger than the amount of a given account
 o createAccount(String, Amount, String, String, String)
Method to Create a new Account.
 o deleteAccount(String)
Internal method to delete an account
 o existsAccount(String)
Test of existance of specified accounts.
 o getAccountKey(String)
Get the key associated with the the specified account
 o getAccountNumber(String)
Get the Account's Number by searching the account with a keyword on the accounts database
 o getBalanceAccount(String)
Get the Account's Balance by searching the account with a keyword on the accounts database
 o getCreationDateAccount(String)
Get the Account's Creation Date by searching the account with a keyword on the accounts database
 o getCurrencyAccount(String)
Get the Account's Currency by searching the account with a keyword on the accounts database
 o getExpirationDateAccount(String)
Get the Account's Expiration Date by searching the account with a keyword on the accounts database
 o getOwnerAccount(String)
Get the Account's Owner by searching the account with a keyword on the accounts database
 o initAccountStorage(String)
Method to initialize the Accounts Database.
 o transferAmount(String, String, String, String, String)
Internal Method to transfer money from account to account

Constructors

 o Bank
  public Bank()

Methods

 o createAccount
  public String createAccount(String ownerAccount,
                              Amount initialAmount,
                              String creationDate,
                              String expirationDate,
                              String key)
Method to Create a new Account.
Parameters:
ownerAccount - User who belongs the money, obvious?...
initialAmount - Amount of money to open the account with.
creationDate - Account's Date of creation.
expirationDate - Account's Date of expiration.
Returns:
the new account Number
See Also:
Acquirer
 o getAccountNumber
  public String getAccountNumber(String keyword)
Get the Account's Number by searching the account with a keyword on the accounts database
Parameters:
keyword - used to search for the account
Returns:
the required account Number
See Also:
Acquirer
 o existsAccount
  public boolean existsAccount(String keyword)
Test of existance of specified accounts. Searches in the accounts database via keyword.
Parameters:
keyword - used to search for the account
Returns:
true/false
See Also:
Acquirer
 o getBalanceAccount
  public String getBalanceAccount(String keyword)
Get the Account's Balance by searching the account with a keyword on the accounts database
Parameters:
keyword - used to search for the account
Returns:
the account's balance
See Also:
Acquirer
 o getCurrencyAccount
  public String getCurrencyAccount(String keyword)
Get the Account's Currency by searching the account with a keyword on the accounts database
Parameters:
keyword - used to search for the account
Returns:
the account's currency
See Also:
Acquirer
 o getAccountKey
  public String getAccountKey(String keyword)
Get the key associated with the the specified account
Parameters:
keyword - used to search for the account
Returns:
the key associated with the account
See Also:
Acquirer
 o getOwnerAccount
  public String getOwnerAccount(String keyword)
Get the Account's Owner by searching the account with a keyword on the accounts database
Parameters:
keyword - used to search for the account
Returns:
the account's owner UserName
See Also:
Acquirer
 o getCreationDateAccount
  public String getCreationDateAccount(String keyword)
Get the Account's Creation Date by searching the account with a keyword on the accounts database
Parameters:
keyword - used to search for the account
Returns:
the account's creation date
See Also:
Acquirer
 o getExpirationDateAccount
  public String getExpirationDateAccount(String keyword)
Get the Account's Expiration Date by searching the account with a keyword on the accounts database
Parameters:
keyword - used to search for the account
Returns:
the account's expiration date
See Also:
Acquirer
 o biggerAmount
  public boolean biggerAmount(String account,
                              Amount amount)
Method to check if an amount is bigger than the amount of a given account
Parameters:
account - the account holding the amount to compare with
amount - the amount being compared.
Returns:
true/false it is true when amount is bigger than the amount of the account
See Also:
Acquirer
 o transferAmount
  public synchronized int transferAmount(String accountPayer,
                                         String accountPayee,
                                         String amount,
                                         String currency,
                                         String key)
Internal Method to transfer money from account to account
Parameters:
accountPayer - Account from which the money goes
accountPayee - Account receiving the money
Returns:
integer status (as defined in genericModuleMessage:
e.g. SC_SUCCESS, SC_FAIL_*)
See Also:
Acquirer
 o deleteAccount
  public void deleteAccount(String account)
Internal method to delete an account
Parameters:
account - Account to delete
Returns:
void
See Also:
genericAccount
 o initAccountStorage
  public void initAccountStorage(String database)
Method to initialize the Accounts Database. By default it will be a file defined in _accountFile
Parameters:
database - String containing Database file name
Returns:
void
See Also:
genericAccount

All Packages  Class Hierarchy  This Package  Previous  Next  Index