public abstract class SDRepositoryBean<A extends DataSourceAware> extends Object implements Initializable, UnregisterAware, ConfigurationChangedAware, RegistrarBean
Constructor and Description |
---|
SDRepositoryBean() |
Modifier and Type | Method and Description |
---|---|
void |
beanConfigurationChanged(Collection<String> changedFields)
Method called when configuration was applied to bean.
|
void |
beforeUnregister()
Method called before bean unregister.
|
protected abstract Class<?> |
findClassForDataSource(DataSource dataSource) |
String |
getDataSourceName() |
String |
getName() |
protected A |
getRepository() |
protected Class<?> |
getRepositoryClassName() |
void |
initialize()
Method will be called, when bean will be created, configured and ready to use.
|
protected void |
initializeRepository(A repository) |
protected void |
onDataSourceChange(DataSourceBean.DataSourceChangedEvent event) |
void |
register(Kernel kernel)
Method called when bean is being registered allowing developer to programatically register other beans.
|
void |
setRepository(A repository) |
void |
unregister(Kernel kernel)
Method called while bean is being unregistered.
|
public String getDataSourceName()
public String getName()
public void beanConfigurationChanged(Collection<String> changedFields)
ConfigurationChangedAware
beanConfigurationChanged
in interface ConfigurationChangedAware
changedFields
- collection of field names which were changedpublic void register(Kernel kernel)
RegistrarBean
register
in interface RegistrarBean
kernel
- - instance from local scopepublic void unregister(Kernel kernel)
RegistrarBean
unregister
in interface RegistrarBean
kernel
- - instance from local scopepublic void initialize()
Initializable
initialize
in interface Initializable
public void beforeUnregister()
UnregisterAware
beforeUnregister
in interface UnregisterAware
protected abstract Class<?> findClassForDataSource(DataSource dataSource) throws DBInitException
DBInitException
protected void initializeRepository(A repository)
protected A getRepository()
public void setRepository(A repository)
protected Class<?> getRepositoryClassName() throws DBInitException, ClassNotFoundException
@HandleEvent protected void onDataSourceChange(DataSourceBean.DataSourceChangedEvent event)
Copyright © 2004–2021 "Tigase, Inc.". All rights reserved.