Package ch.tocco.nice2.dbrefactoring.api
Interface ModuleSupport
- All Known Implementing Classes:
ModuleSupportImpl
public interface ModuleSupport
Support dealing with modules and db changelogs.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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.Generates one changelog that represents the current state of the application.generateInitialChangelog
(String module) Generates an initial changelog file for the specified module.generateInitialValues
(String query, int limit) Generates a changelog file that contains all results from the specified query.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.Returns a set of table names currently available at the configured database.
-
Method Details
-
generateInitialChangelog
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
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
Generates a changelog file that contains all results from the specified query.- Parameters:
query
- a querylimit
- the query limit- Throws:
DbRefactoringException
-
generateInitialValuesFromLookupEntities
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
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
Returns a set of table names currently available at the configured database.
-