Package com.evolveum.midpoint.repo.sql
Class SqlRepositoryFactory
- java.lang.Object
-
- com.evolveum.midpoint.repo.sql.SqlRepositoryFactory
-
- All Implemented Interfaces:
RepositoryServiceFactory
public class SqlRepositoryFactory extends Object implements RepositoryServiceFactory
- Author:
- lazyman
-
-
Constructor Summary
Constructors Constructor Description SqlRepositoryFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RepositoryService
createRepositoryService()
void
destroy()
@NotNull SqlRepositoryConfiguration
getSqlConfiguration()
void
init(org.apache.commons.configuration2.Configuration configuration)
Initialization called by central repository factory from system-init.
-
-
-
Method Detail
-
init
public void init(org.apache.commons.configuration2.Configuration configuration) throws RepositoryServiceFactoryException
Initialization called by central repository factory from system-init. This IS called as a part of Spring bean initialization and for this reason thesqlRepositoryService
is initialized lazily increateRepositoryService()
, so it can use other autowired components (some depending on this factory).NOTE: It's kind of circular dependency,
SqlRepositoryBeanConfig
depends on this when in fact it can only depend onSqlRepositoryConfiguration
, but that is not a managed component (Spring bean).- Specified by:
init
in interfaceRepositoryServiceFactory
- Throws:
RepositoryServiceFactoryException
-
destroy
public void destroy()
- Specified by:
destroy
in interfaceRepositoryServiceFactory
-
getSqlConfiguration
@NotNull public @NotNull SqlRepositoryConfiguration getSqlConfiguration()
-
createRepositoryService
public RepositoryService createRepositoryService()
- Specified by:
createRepositoryService
in interfaceRepositoryServiceFactory
-
-