Class AuditableSchemaInstaller

java.lang.Object
com.foreach.across.modules.hibernate.installers.AuditableSchemaInstaller

@InstallerGroup("schema") public abstract class AuditableSchemaInstaller extends Object

Convenience installer that creates the necessary columns for the default implementation of the Auditable interface. Supports multiple table names and will add the auditable columns to each of those tables.

Author:
Andy Somers, Arne Vandamme
See Also:
  • Constructor Details

    • AuditableSchemaInstaller

      public AuditableSchemaInstaller()
    • AuditableSchemaInstaller

      protected AuditableSchemaInstaller(com.foreach.across.core.database.SchemaConfiguration schemaConfiguration)
  • Method Details

    • getTableNames

      protected abstract Collection<String> getTableNames()
    • getSchemaConfiguration

      protected com.foreach.across.core.database.SchemaConfiguration getSchemaConfiguration()
    • setSchemaConfiguration

      protected void setSchemaConfiguration(com.foreach.across.core.database.SchemaConfiguration schemaConfiguration)
    • setDefaultSchema

      protected void setDefaultSchema(String defaultSchema)
      Sets the default Schema that will be used during the liquibase update

      This will override the defaultSchema configured in SchemaConfiguration.getDefaultSchema()

      Parameters:
      defaultSchema - The default db schema name
      See Also:
      • SpringLiquibase.setDefaultSchema(String)
    • getDefaultSchema

      protected String getDefaultSchema()
      Returns:
      The db schema name that will be used as default schema during the liquibase update
    • getDataSource

      protected DataSource getDataSource()
    • setDataSource

      protected void setDataSource(DataSource dataSource)
      Override the dataSource this installer should use (defaults to the installer datasource otherwise).
      Parameters:
      dataSource - instance
    • setBeanFactory

      @Autowired protected void setBeanFactory(org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
    • install

      @InstallerMethod public void install() throws liquibase.exception.LiquibaseException
      Throws:
      liquibase.exception.LiquibaseException