java.lang.Object
io.helidon.dbclient.DbClient.Builder
- All Implemented Interfaces:
Builder<DbClient.Builder,
,DbClient> Supplier<DbClient>
- Enclosing interface:
- DbClient
public static final class DbClient.Builder
extends Object
implements Builder<DbClient.Builder,DbClient>
Helidon database handler builder.
-
Method Summary
Modifier and TypeMethodDescriptionaddService
(DbClientService clientService) Add a client service.addService
(Supplier<? extends DbClientService> clientServiceSupplier) Add a client service.addServiceProvider
(DbClientServiceProvider provider) Add an interceptor provider.build()
Build provider specific database handler.Use database connection configuration from configuration file.mapperManager
(MapperManager manager) Mapper manager for generic mapping, such as mapping of parameters to expected types.mapperProvider
(DbMapperProvider provider) Database schema mappers provider.statements
(DbStatements statements) Statements to use either from configuration or manually configured.
-
Method Details
-
build
Build provider specific database handler.- Specified by:
build
in interfaceBuilder<DbClient.Builder,
DbClient> - Returns:
- new database handler instance
-
addServiceProvider
Add an interceptor provider. The provider is only used when configuration is used (config(io.helidon.config.Config)
.- Parameters:
provider
- provider to add to the list of loaded providers- Returns:
- updated builder instance
-
addService
Add a client service.- Parameters:
clientService
- clientService to apply- Returns:
- updated builder instance
-
addService
Add a client service.- Parameters:
clientServiceSupplier
- supplier of client service- Returns:
- updated builder instance
-
config
Use database connection configuration from configuration file.- Parameters:
config
-Config
instance with database connection attributes- Returns:
- database provider builder
-
statements
Statements to use either from configuration or manually configured.- Parameters:
statements
- Statements to use- Returns:
- updated builder instance
-
mapperProvider
Database schema mappers provider. Mappers associated with types in this provider will override existing types associations loaded asDbMapperProvider
Java services.- Parameters:
provider
- database schema mappers provider to use- Returns:
- updated builder instance
-
mapperManager
Mapper manager for generic mapping, such as mapping of parameters to expected types.- Parameters:
manager
- mapper manager- Returns:
- updated builder instance
-