Class DatasourcePropertiesUtil
java.lang.Object
com.blueriq.component.api.datasource.DatasourcePropertiesUtil
Util class for creating a properties object for hibernate settings (like the dialect) based for a specific
datasource.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Properties
getHibernateProperties
(org.springframework.core.env.ConfigurableEnvironment configurableEnv, String dataSourceName) This method returns the hibernate properties for a datasource.
-
Method Details
-
getHibernateProperties
public static Properties getHibernateProperties(org.springframework.core.env.ConfigurableEnvironment configurableEnv, String dataSourceName) This method returns the hibernate properties for a datasource. The properties are combined from the global hibernate properties (hibernate.*) and the datasource specific hibernate properties (blueriq.hibernate.[dataSourceName].*). The datasource specific properties will override the global properties. For example the property blueriq.hibernate.main.dialect=org.hibernate.dialect.SQLServer2012Dialect will be added as hibernate.dialect=org.hibernate.dialect.SQLServer2012Dialect- Parameters:
configurableEnv
- the Spring environment containing all the properties;dataSourceName
- the name of the datasource- Returns:
- the hibernate properties
-