Package net.sf.basedb.core.hibernate
Class SchemaGenerator.CollectSqlTarget
- java.lang.Object
-
- net.sf.basedb.core.hibernate.SchemaGenerator.CollectSqlTarget
-
- All Implemented Interfaces:
org.hibernate.tool.schema.spi.ExecutionOptions
,org.hibernate.tool.schema.spi.ScriptTargetOutput
,org.hibernate.tool.schema.spi.SourceDescriptor
,org.hibernate.tool.schema.spi.TargetDescriptor
- Enclosing class:
- SchemaGenerator
static class SchemaGenerator.CollectSqlTarget extends Object implements org.hibernate.tool.schema.spi.ScriptTargetOutput, org.hibernate.tool.schema.spi.SourceDescriptor, org.hibernate.tool.schema.spi.TargetDescriptor, org.hibernate.tool.schema.spi.ExecutionOptions
Helper class used for collecting SQL statements generated by Hibernate schema creation/update tools.- Since:
- 3.8
-
-
Field Summary
Fields Modifier and Type Field Description private List<SchemaGenerator.SqlStatement>
allSql
private Map<Object,Object>
config
private DbEngine
dbEngine
private org.hibernate.dialect.Dialect
dialect
private SchemaGenerator.Mode
mode
private int
numStatements
-
Constructor Summary
Constructors Constructor Description CollectSqlTarget()
CollectSqlTarget(DbEngine dbEngine, org.hibernate.dialect.Dialect dialect, SchemaGenerator.Mode mode, Connection connection)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(String sql)
Map<?,?>
getConfigurationValues()
org.hibernate.tool.schema.spi.ExceptionHandler
getExceptionHandler()
int
getNumStatements()
org.hibernate.tool.schema.spi.ScriptSourceInput
getScriptSourceInput()
org.hibernate.tool.schema.spi.ScriptTargetOutput
getScriptTargetOutput()
org.hibernate.tool.schema.SourceType
getSourceType()
List<SchemaGenerator.SqlStatement>
getSql()
EnumSet<org.hibernate.tool.schema.TargetType>
getTargetTypes()
void
prepare()
void
release()
boolean
shouldManageNamespaces()
-
-
-
Field Detail
-
allSql
private final List<SchemaGenerator.SqlStatement> allSql
-
dialect
private final org.hibernate.dialect.Dialect dialect
-
dbEngine
private final DbEngine dbEngine
-
mode
private final SchemaGenerator.Mode mode
-
numStatements
private int numStatements
-
-
Constructor Detail
-
CollectSqlTarget
CollectSqlTarget()
-
CollectSqlTarget
CollectSqlTarget(DbEngine dbEngine, org.hibernate.dialect.Dialect dialect, SchemaGenerator.Mode mode, Connection connection)
-
-
Method Detail
-
getSql
public List<SchemaGenerator.SqlStatement> getSql()
-
getNumStatements
public int getNumStatements()
-
release
public void release()
- Specified by:
release
in interfaceorg.hibernate.tool.schema.spi.ScriptTargetOutput
-
prepare
public void prepare()
- Specified by:
prepare
in interfaceorg.hibernate.tool.schema.spi.ScriptTargetOutput
-
accept
public void accept(String sql)
- Specified by:
accept
in interfaceorg.hibernate.tool.schema.spi.ScriptTargetOutput
-
getScriptSourceInput
public org.hibernate.tool.schema.spi.ScriptSourceInput getScriptSourceInput()
- Specified by:
getScriptSourceInput
in interfaceorg.hibernate.tool.schema.spi.SourceDescriptor
-
getSourceType
public org.hibernate.tool.schema.SourceType getSourceType()
- Specified by:
getSourceType
in interfaceorg.hibernate.tool.schema.spi.SourceDescriptor
-
getTargetTypes
public EnumSet<org.hibernate.tool.schema.TargetType> getTargetTypes()
- Specified by:
getTargetTypes
in interfaceorg.hibernate.tool.schema.spi.TargetDescriptor
-
getScriptTargetOutput
public org.hibernate.tool.schema.spi.ScriptTargetOutput getScriptTargetOutput()
- Specified by:
getScriptTargetOutput
in interfaceorg.hibernate.tool.schema.spi.TargetDescriptor
-
getConfigurationValues
public Map<?,?> getConfigurationValues()
- Specified by:
getConfigurationValues
in interfaceorg.hibernate.tool.schema.spi.ExecutionOptions
-
shouldManageNamespaces
public boolean shouldManageNamespaces()
- Specified by:
shouldManageNamespaces
in interfaceorg.hibernate.tool.schema.spi.ExecutionOptions
-
getExceptionHandler
public org.hibernate.tool.schema.spi.ExceptionHandler getExceptionHandler()
- Specified by:
getExceptionHandler
in interfaceorg.hibernate.tool.schema.spi.ExecutionOptions
-
-