Interface ModuleSupport

All Known Implementing Classes:
ModuleSupportImpl

public interface ModuleSupport
Support dealing with modules and db changelogs.
  • Method Details

    • generateInitialChangelog

      Changelog generateInitialChangelog(String module) throws DbRefactoringException

      Generates an initial changelog file for the specified module.

      Visits all entity models defined in the specified module and generates a db changelog file from this information.

      Parameters:
      module - the modulename
      Throws:
      DbRefactoringException - on any error
    • generateInitialChangelog

      Changelog generateInitialChangelog(Changelog.Xsd xsd) throws DbRefactoringException
      Generates one changelog that represents the current state of the application. Note, that this changelog is one big file, which is not splittet around the modules, but rather represents the current state of all modules together.
      Throws:
      DbRefactoringException
    • generateInitialValues

      Changelog generateInitialValues(String query, int limit) throws DbRefactoringException
      Generates a changelog file that contains all results from the specified query.
      Parameters:
      query - a query
      limit - the query limit
      Throws:
      DbRefactoringException
    • generateInitialValuesFromLookupEntities

      Changelog generateInitialValuesFromLookupEntities(Set<String> module) throws DbRefactoringException
      Goes through all entities of type "lookup" of the given module and creates a changelog with inserts of the values that are obtained from the current connection.
      Throws:
      DbRefactoringException
    • createChangelogResourceOutline

      void createChangelogResourceOutline(String module, boolean overwrite)
      Generates the initial db changelog together with values from lookup entities and stores them in the file system of the module.
      Parameters:
      overwrite - true to overwrite existing files
    • getTableNames

      Set<String> getTableNames()
      Returns a set of table names currently available at the configured database.