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 ([email protected])
- See Also:
- Acquirer, genericModule, genericAccount, genericTransaction, genericpurse
-
Bank()
-
-
biggerAmount(String, Amount)
- Method to check if an amount is bigger than the amount
of a given account
-
createAccount(String, Amount, String, String, String)
- Method to Create a new Account.
-
deleteAccount(String)
- Internal method to delete an account
-
existsAccount(String)
- Test of existance of specified accounts.
-
getAccountKey(String)
- Get the key associated with the the specified account
-
getAccountNumber(String)
- Get the Account's Number by searching the account with a keyword
on the accounts database
-
getBalanceAccount(String)
- Get the Account's Balance by searching the account with a keyword
on the accounts database
-
getCreationDateAccount(String)
- Get the Account's Creation Date by searching the account with a
keyword on the accounts database
-
getCurrencyAccount(String)
- Get the Account's Currency by searching the account with a
keyword on the accounts database
-
getExpirationDateAccount(String)
- Get the Account's Expiration Date by searching the account with a
keyword on the accounts database
-
getOwnerAccount(String)
- Get the Account's Owner by searching the account with a
keyword on the accounts database
-
initAccountStorage(String)
- Method to initialize the Accounts Database.
-
transferAmount(String, String, String, String, String)
- Internal Method to transfer money from account to account
Bank
public Bank()
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
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
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
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
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
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
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
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
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
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
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
deleteAccount
public void deleteAccount(String account)
- Internal method to delete an account
- Parameters:
- account - Account to delete
- Returns:
- void
- See Also:
- genericAccount
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