Package com.qfs.snl.persistence
Interface IDataSourceBuilder
- All Known Implementing Classes:
ADataSourceBuilder
public interface IDataSourceBuilder
Component in charge of building the appropriate data source for the ActiveMonitor databases.
- Author:
- ActiveViam
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build the data source.setDriverClassName
(String driverClassName) Set the JDBC driver class name.setIdentifier
(String datasourceIdentifier) Set the identifier of the data source.setPassword
(String password) Set the JDBC password to use for connecting through the Driver.setProperties
(Properties properties, org.springframework.core.env.Environment env) Set the data source properties.Set the JDBC URL to use for connecting through the Driver.setUserName
(String user) Set the JDBC username to use for connecting through the Driver.
-
Method Details
-
setUrl
Set the JDBC URL to use for connecting through the Driver.- Parameters:
url
- the url to set- Returns:
- the builder
-
setUserName
Set the JDBC username to use for connecting through the Driver.- Parameters:
user
- the username to set- Returns:
- the builder
-
setPassword
Set the JDBC password to use for connecting through the Driver.- Parameters:
password
- the password to set- Returns:
- the builder
-
setProperties
IDataSourceBuilder setProperties(Properties properties, org.springframework.core.env.Environment env) Set the data source properties.- Parameters:
properties
- the properties to setenv
- the spring environment- Returns:
- the builder
-
setIdentifier
Set the identifier of the data source.- Parameters:
datasourceIdentifier
- the identifier to set- Returns:
- the builder
- See Also:
-
setDriverClassName
Set the JDBC driver class name.- Parameters:
driverClassName
- the name to set- Returns:
- the builder
-
build
DataSource build()Build the data source.- Returns:
- the data source
-