public.javadoc.org.spincast.plugins.flywayutils.SpincastFlywayMigrationBase.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spincast-website Show documentation
Show all versions of spincast-website Show documentation
Source code for the https://www.spincast.org website.
SpincastFlywayMigrationBase (org.spincast:spincast-framework 1.2.0 API)
org.spincast.plugins.flywayutils
Class SpincastFlywayMigrationBase
- java.lang.Object
-
- org.spincast.plugins.flywayutils.SpincastFlywayMigrationBase
-
- All Implemented Interfaces:
- SpincastFlywayMigration
public abstract class SpincastFlywayMigrationBase
extends Object
implements SpincastFlywayMigration
-
-
Field Summary
Fields
Modifier and Type
Field and Description
protected org.slf4j.Logger
logger
-
Constructor Summary
Constructors
Constructor and Description
SpincastFlywayMigrationBase(DataSource dataSource,
JdbcUtils jdbcUtils)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods
Modifier and Type
Method and Description
protected DataSource
getDataSource()
protected JdbcUtils
getJdbcUtils()
void
migrate(Connection connection)
Override {runMigration(Connection)
} instead of this
method.
protected abstract void
runMigration(Connection connection)
Runs the migrations inside a scope where the
proper connection will used, even by indirect
components (ex: a service is called that uses
a repository which gets a connection using
JdbcScope.transactional(org.spincast.plugins.jdbc.TransactionalScope)
transactional()).
-
-
Constructor Detail
-
SpincastFlywayMigrationBase
@Inject
public SpincastFlywayMigrationBase(DataSource dataSource,
JdbcUtils jdbcUtils)
-
Method Detail
-
getDataSource
protected DataSource getDataSource()
-
getJdbcUtils
protected JdbcUtils getJdbcUtils()
-
migrate
public final void migrate(Connection connection)
throws Exception
Override {runMigration(Connection)
} instead of this
method.
- Specified by:
migrate
in interface SpincastFlywayMigration
- Throws:
Exception
-
runMigration
protected abstract void runMigration(Connection connection)
Runs the migrations inside a scope where the
proper connection will used, even by indirect
components (ex: a service is called that uses
a repository which gets a connection using
JdbcScope.transactional(org.spincast.plugins.jdbc.TransactionalScope)
transactional()).
Copyright © 2019. All rights reserved.