Package io.surati.gap.payment.base.db
Class DbThirdPartyBankAccounts
- java.lang.Object
-
- io.surati.gap.payment.base.db.DbThirdPartyBankAccounts
-
- All Implemented Interfaces:
BankAccounts
public final class DbThirdPartyBankAccounts extends Object implements BankAccounts
Bank accounts of a third party in Database.- Since:
- 3.0
-
-
Constructor Summary
Constructors Constructor Description DbThirdPartyBankAccounts(DataSource source, ThirdParty holder)
Ctor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BankAccount
add(Bank bank, String branchcode, String number, String key)
Add a new account.BankAccount
get(Long id)
Get account by ID.BankAccount
get(String fullnumber)
Get account by full number (24 digits).boolean
has(String fullnumber)
Checks if account of full number (24 digits) exists.Iterable<BankAccount>
iterate()
Iterate all accounts.void
remove(Long id)
Remove an account.
-
-
-
Constructor Detail
-
DbThirdPartyBankAccounts
public DbThirdPartyBankAccounts(DataSource source, ThirdParty holder)
Ctor.- Parameters:
source
-
-
-
Method Detail
-
has
public boolean has(String fullnumber)
Description copied from interface:BankAccounts
Checks if account of full number (24 digits) exists.- Specified by:
has
in interfaceBankAccounts
- Parameters:
fullnumber
- Full number- Returns:
- boolean exits
-
get
public BankAccount get(String fullnumber)
Description copied from interface:BankAccounts
Get account by full number (24 digits).- Specified by:
get
in interfaceBankAccounts
- Parameters:
fullnumber
- Full number- Returns:
- Account
-
get
public BankAccount get(Long id)
Description copied from interface:BankAccounts
Get account by ID.- Specified by:
get
in interfaceBankAccounts
- Parameters:
id
- Identifier- Returns:
- Account
-
add
public BankAccount add(Bank bank, String branchcode, String number, String key)
Description copied from interface:BankAccounts
Add a new account.- Specified by:
add
in interfaceBankAccounts
- Parameters:
bank
- Bank associatedbranchcode
- Branch codenumber
- Numberkey
- Key
-
remove
public void remove(Long id)
Description copied from interface:BankAccounts
Remove an account.- Specified by:
remove
in interfaceBankAccounts
- Parameters:
id
- Identifier
-
iterate
public Iterable<BankAccount> iterate()
Description copied from interface:BankAccounts
Iterate all accounts.- Specified by:
iterate
in interfaceBankAccounts
- Returns:
- All accounts
-
-