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
  • Constructor Details

    • AbstractMigrateUriRegistrySqlCommand

      public AbstractMigrateUriRegistrySqlCommand()
  • Method Details

    • handle

      public void handle(JdbcTemplate jdbcTemplate, Connection connection)
      Overrides:
      handle in class org.springframework.cloud.dataflow.common.flyway.SqlCommand
    • canHandleInJdbcTemplate

      public boolean canHandleInJdbcTemplate()
      Overrides:
      canHandleInJdbcTemplate in class org.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 of AppRegistrationMigrationData's and keep hibernate_sequence up-to-date.
      Parameters:
      jdbcTemplate - the jdbc template
      data - 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

      protected void dropUriRegistryTable(JdbcTemplate jdbcTemplate)
      Drop uri registry table.
      Parameters:
      jdbcTemplate - the jdbc template