Package org.fcrepo.config
Class FlywayFactory
- java.lang.Object
-
- org.fcrepo.config.FlywayFactory
-
- All Implemented Interfaces:
org.springframework.beans.factory.FactoryBean<org.flywaydb.core.Flyway>
public class FlywayFactory extends Object implements org.springframework.beans.factory.FactoryBean<org.flywaydb.core.Flyway>
Factory to generate a Flyway instance for Fedora.- Author:
- whikloj
-
-
Constructor Summary
Constructors Constructor Description FlywayFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FlywayFactory
create()
Static constructororg.flywaydb.core.Flyway
getObject()
Class<?>
getObjectType()
FlywayFactory
setDatabaseType(String type)
Set the type of database to pick the correct schema files.FlywayFactory
setDataSource(DataSource source)
Set the datasource for use with Flyway.
-
-
-
Constructor Detail
-
FlywayFactory
public FlywayFactory()
-
-
Method Detail
-
create
public static FlywayFactory create()
Static constructor- Returns:
- a new FlywayFactory instance.
-
getObject
public org.flywaydb.core.Flyway getObject() throws Exception
- Specified by:
getObject
in interfaceorg.springframework.beans.factory.FactoryBean<org.flywaydb.core.Flyway>
- Throws:
Exception
-
getObjectType
public Class<?> getObjectType()
- Specified by:
getObjectType
in interfaceorg.springframework.beans.factory.FactoryBean<org.flywaydb.core.Flyway>
-
setDataSource
public FlywayFactory setDataSource(DataSource source)
Set the datasource for use with Flyway.- Parameters:
source
- the data source.- Returns:
- this factory
-
setDatabaseType
public FlywayFactory setDatabaseType(String type)
Set the type of database to pick the correct schema files.- Parameters:
type
- database type- Returns:
- this factory
-
-