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)
ConfigurationChangedAwarebeanConfigurationChanged in interface ConfigurationChangedAwarechangedFields - collection of field names which were changedpublic void register(Kernel kernel)
RegistrarBeanregister in interface RegistrarBeankernel - - instance from local scopepublic void unregister(Kernel kernel)
RegistrarBeanunregister in interface RegistrarBeankernel - - instance from local scopepublic void initialize()
Initializableinitialize in interface Initializablepublic void beforeUnregister()
UnregisterAwarebeforeUnregister in interface UnregisterAwareprotected abstract Class<?> findClassForDataSource(DataSource dataSource) throws DBInitException
DBInitExceptionprotected 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–2020 "Tigase, Inc.". All rights reserved.