Class AbstractMigrateUriRegistrySqlCommand
java.lang.Object
org.springframework.cloud.dataflow.common.flyway.SqlCommand
org.springframework.cloud.dataflow.server.db.migration.AbstractMigrateUriRegistrySqlCommand
- Direct Known Subclasses:
Db2MigrateUriRegistrySqlCommand
,MsSqlMigrateUriRegistrySqlCommand
,MysqlMigrateUriRegistrySqlCommand
,OracleMigrateUriRegistrySqlCommand
,PostgresMigrateUriRegistrySqlCommand
public abstract class AbstractMigrateUriRegistrySqlCommand
extends org.springframework.cloud.dataflow.common.flyway.SqlCommand
Base implementation for a
SqlCommand
copying data from
URI_REGISTRY
table into app_registration
table.- Author:
- Janne Valkealahti
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
Raw migration data from uri registry into app registration. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
createAppRegistrationMigrationData
(JdbcTemplate jdbcTemplate) Creates a migration data from URI_REGISTRY table to get inserted into app_registration table.protected void
dropUriRegistryTable
(JdbcTemplate jdbcTemplate) Drop uri registry table.void
handle
(JdbcTemplate jdbcTemplate, Connection connection) protected abstract void
updateAppRegistration
(JdbcTemplate jdbcTemplate, List<AbstractMigrateUriRegistrySqlCommand.AppRegistrationMigrationData> data) Update app registration.Methods inherited from class org.springframework.cloud.dataflow.common.flyway.SqlCommand
from, from, getCommand, getSuppressedErrorCodes
-
Constructor Details
-
AbstractMigrateUriRegistrySqlCommand
public AbstractMigrateUriRegistrySqlCommand()
-
-
Method Details
-
handle
- Overrides:
handle
in classorg.springframework.cloud.dataflow.common.flyway.SqlCommand
-
canHandleInJdbcTemplate
public boolean canHandleInJdbcTemplate()- Overrides:
canHandleInJdbcTemplate
in classorg.springframework.cloud.dataflow.common.flyway.SqlCommand
-
updateAppRegistration
protected abstract void updateAppRegistration(JdbcTemplate jdbcTemplate, List<AbstractMigrateUriRegistrySqlCommand.AppRegistrationMigrationData> data) Update app registration. Actual database implementation of this method is required to insert data based on list ofAppRegistrationMigrationData
's and keephibernate_sequence
up-to-date.- Parameters:
jdbcTemplate
- the jdbc templatedata
- the data
-
createAppRegistrationMigrationData
protected List<AbstractMigrateUriRegistrySqlCommand.AppRegistrationMigrationData> createAppRegistrationMigrationData(JdbcTemplate jdbcTemplate) Creates a migration data from URI_REGISTRY table to get inserted into app_registration table. We're working on a raw data level thus no use hibernate, spring repositories nor entity classes.- Parameters:
jdbcTemplate
- the jdbc template- Returns:
- the list
-
dropUriRegistryTable
Drop uri registry table.- Parameters:
jdbcTemplate
- the jdbc template
-