public class SchemaGenerator extends java.lang.Object implements Work
DbIndexWork
.
Hibernate generate "not null" constraints for
columns that are added to existing tables and we don't want that.Modifier and Type | Class and Description |
---|---|
(package private) static class |
SchemaGenerator.CollectSqlTarget
Helper class used for collecting SQL statements generated by Hibernate
schema creation/update tools.
|
static class |
SchemaGenerator.Mode
The installation mode.
|
static class |
SchemaGenerator.SqlStatement |
Modifier and Type | Field and Description |
---|---|
private DbEngine |
dbEngine |
private Dialect |
dialect |
private java.util.List<java.lang.String> |
ignoredSql |
private static org.slf4j.Logger |
log |
private org.hibernate.boot.Metadata |
metadata |
private SchemaGenerator.Mode |
mode |
private ProgressReporter |
progress |
Constructor and Description |
---|
SchemaGenerator(org.hibernate.boot.Metadata metadata,
Dialect dialect,
DbEngine dbEngine,
SchemaGenerator.Mode mode,
ProgressReporter progress)
Create a new schema generator.
|
Modifier and Type | Method and Description |
---|---|
void |
execute(java.sql.Connection connection) |
java.util.List<java.lang.String> |
getIgnoredSql()
Get a list with the SQL statements that was ignored in the last run.
|
private static final org.slf4j.Logger log
private final org.hibernate.boot.Metadata metadata
private final Dialect dialect
private final DbEngine dbEngine
private final SchemaGenerator.Mode mode
private final ProgressReporter progress
private java.util.List<java.lang.String> ignoredSql
public SchemaGenerator(org.hibernate.boot.Metadata metadata, Dialect dialect, DbEngine dbEngine, SchemaGenerator.Mode mode, ProgressReporter progress)
metadata
- Information about current configurationdialect
- The dialect of the database we are connecting todbEngine
- The DbEngine for the database we are connecting tomode
- The installation modeprogress
- An optional progress reporterpublic void execute(java.sql.Connection connection) throws java.sql.SQLException
public java.util.List<java.lang.String> getIgnoredSql()