Package tigase.db.beans
Class SDRepositoryBean<A extends DataSourceAware>
java.lang.Object
tigase.db.beans.SDRepositoryBean<A>
- All Implemented Interfaces:
ConfigurationChangedAware,Initializable,RegistrarBean,UnregisterAware
- Direct Known Subclasses:
AbstractSDComponentRepositoryBean,SDRepositoryBeanWithStatistics,SeeOtherHostDB.SeeOtherHostDBSDRepositoryBean
public abstract class SDRepositoryBean<A extends DataSourceAware>
extends Object
implements Initializable, UnregisterAware, ConfigurationChangedAware, RegistrarBean
Abstract class implementing bean to which can be used to create name unaware repository pool. This class is
resposible for creation of correct repository instance for single specified data source.
Created by andrzej on 17.08.2016.
Created by andrzej on 17.08.2016.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbeanConfigurationChanged(Collection<String> changedFields) Method called when configuration was applied to bean.voidMethod called before bean unregister.protected abstract Class<?> findClassForDataSource(DataSource dataSource) getName()protected Aprotected Class<?> voidMethod will be called, when bean will be created, configured and ready to use.protected voidinitializeRepository(A repository) protected voidvoidMethod called when bean is being registered allowing developer to programatically register other beans.voidsetRepository(A repository) voidunregister(Kernel kernel) Method called while bean is being unregistered.
-
Constructor Details
-
SDRepositoryBean
public SDRepositoryBean()
-
-
Method Details
-
getDataSourceName
-
getName
-
beanConfigurationChanged
Description copied from interface:ConfigurationChangedAwareMethod called when configuration was applied to bean.- Specified by:
beanConfigurationChangedin interfaceConfigurationChangedAware- Parameters:
changedFields- collection of field names which were changed
-
register
Description copied from interface:RegistrarBeanMethod called when bean is being registered allowing developer to programatically register other beans.- Specified by:
registerin interfaceRegistrarBean- Parameters:
kernel- - instance from local scope
-
unregister
Description copied from interface:RegistrarBeanMethod called while bean is being unregistered.- Specified by:
unregisterin interfaceRegistrarBean- Parameters:
kernel- - instance from local scope
-
initialize
public void initialize()Description copied from interface:InitializableMethod will be called, when bean will be created, configured and ready to use.- Specified by:
initializein interfaceInitializable
-
beforeUnregister
public void beforeUnregister()Description copied from interface:UnregisterAwareMethod called before bean unregister.- Specified by:
beforeUnregisterin interfaceUnregisterAware
-
findClassForDataSource
- Throws:
DBInitException
-
initializeRepository
-
getRepository
-
setRepository
-
getRepositoryClassName
-
onDataSourceChange
-