Package io.surati.gap.payment.base.db
Class DbThirdParties
- java.lang.Object
-
- io.surati.gap.payment.base.db.DbThirdParties
-
- All Implemented Interfaces:
ThirdParties
public final class DbThirdParties extends Object implements ThirdParties
List of third parties in Database.- Since:
- 3.0
-
-
Constructor Summary
Constructors Constructor Description DbThirdParties(DataSource source)
Ctor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ThirdParty
add(String code, String name, String abbreviated)
Add a new item.Long
count()
ThirdParty
get(Long id)
Get an item.ThirdParty
get(String code)
Get third party.boolean
has(String code)
Checks if a third party with a code exists.Iterable<ThirdParty>
iterate()
Iterate all third parties.void
remove(Long id)
Remove a third party by its identifier.
-
-
-
Constructor Detail
-
DbThirdParties
public DbThirdParties(DataSource source)
Ctor.- Parameters:
source
-
-
-
Method Detail
-
get
public ThirdParty get(String code)
Description copied from interface:ThirdParties
Get third party.- Specified by:
get
in interfaceThirdParties
- Parameters:
code
- Code- Returns:
- Third party found
-
get
public ThirdParty get(Long id)
Description copied from interface:ThirdParties
Get an item.- Specified by:
get
in interfaceThirdParties
- Parameters:
id
- Identifier- Returns:
- Third party found
-
add
public ThirdParty add(String code, String name, String abbreviated)
Description copied from interface:ThirdParties
Add a new item.- Specified by:
add
in interfaceThirdParties
- Parameters:
code
- Codename
- Nameabbreviated
- Abbreviated- Returns:
- Third party created.
-
remove
public void remove(Long id)
Description copied from interface:ThirdParties
Remove a third party by its identifier.- Specified by:
remove
in interfaceThirdParties
- Parameters:
id
- Identifier
-
iterate
public Iterable<ThirdParty> iterate()
Description copied from interface:ThirdParties
Iterate all third parties.- Specified by:
iterate
in interfaceThirdParties
- Returns:
- Iterable of third party.
-
has
public boolean has(String code)
Description copied from interface:ThirdParties
Checks if a third party with a code exists.- Specified by:
has
in interfaceThirdParties
- Returns:
- boolean exits
-
count
public Long count()
- Specified by:
count
in interfaceThirdParties
-
-