public abstract class DatabaseConfigurer extends Object implements org.springframework.beans.factory.config.BeanFactoryPostProcessor, org.springframework.core.Ordered
| Constructor and Description |
|---|
DatabaseConfigurer() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
convertProperties(Map properties)
Convert the given merged properties, converting property values if
necessary.
|
protected String |
convertPropertyValue(String originalValue)
Convert the given property value from the properties source to the value
that should be applied.
|
void |
destroy() |
String |
getKeyColumnName()
Get the name of the column containing property keys.
|
protected org.apache.log4j.Logger |
getLog()
Get the LOG.
|
int |
getOrder()
Get the order value of this object, higher value meaning greater in terms
of sorting.
|
String |
getTableName()
Get the name of the table containing configuration properties.
|
String |
getValueColumnName()
Get The name of the column containing property values.
|
void |
postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory) |
protected abstract void |
processProperties(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory,
Map properties)
Apply the given Properties to the bean factory.
|
void |
setDataSource(DataSource dataSource)
Set the data source used to load properties from.
|
void |
setKeyColumnName(String keyColumnName)
Set the name of the column containing property keys.
|
void |
setOrder(int order)
Set the order value of this object, higher value meaning greater in terms
of sorting.
|
void |
setTableName(String tableName)
Set the name of the table containing configuration properties.
|
void |
setValueColumnName(String valueColumnName)
Set the name of the column containing property values.
|
protected void convertProperties(Map properties)
Convert the given merged properties, converting property values if necessary. The result will then be processed.
Default implementation will invoke convertPropertyValue for
each property value, replacing the original with the converted value.
properties - The properties to convert.convertPropertyValue(java.lang.String),
processProperties(org.springframework.beans.factory.config.ConfigurableListableBeanFactory, java.util.Map)protected String convertPropertyValue(String originalValue)
Convert the given property value from the properties source to the value that should be applied.
Default implementation simply returns the original value. Can be overridden in subclasses, for example to detect encrypted values and decrypt them accordingly.
originalValue - the original value from the properties source
(properties file or local "properties")@PreDestroy public void destroy()
public final String getKeyColumnName()
protected org.apache.log4j.Logger getLog()
public int getOrder()
getOrder in interface org.springframework.core.Orderedpublic final String getTableName()
public final String getValueColumnName()
public void postProcessBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
postProcessBeanFactory in interface org.springframework.beans.factory.config.BeanFactoryPostProcessorbeanFactory - The bean factory the bean is loaded from.protected abstract void processProperties(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory,
Map properties)
beanFactory - the bean factory used by the application contextproperties - the Properties to applypublic final void setDataSource(DataSource dataSource)
dataSource - The data source used to load properties from.public final void setKeyColumnName(String keyColumnName)
keyColumnName - The name of the column containing property keys.public void setOrder(int order)
order - The order value of this object, higher value meaning greater
in terms of sorting.public final void setTableName(String tableName)
tableName - The name of the table containing configuration properties.public final void setValueColumnName(String valueColumnName)
valueColumnName - The name of the column containing property values.Copyright © 2015 Revolution Systems Inc.. All rights reserved.