Package net.sf.basedb.core.hibernate
Class SchemaGenerator.CollectSqlTarget
- java.lang.Object
-
- net.sf.basedb.core.hibernate.SchemaGenerator.CollectSqlTarget
-
- All Implemented Interfaces:
ExecutionOptions
,ScriptTargetOutput
,SourceDescriptor
,TargetDescriptor
- Enclosing class:
- SchemaGenerator
static class SchemaGenerator.CollectSqlTarget extends Object implements ScriptTargetOutput, SourceDescriptor, TargetDescriptor, 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 Dialect
dialect
private SchemaGenerator.Mode
mode
private int
numStatements
-
Constructor Summary
Constructors Constructor Description CollectSqlTarget()
CollectSqlTarget(DbEngine dbEngine, 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()
ExceptionHandler
getExceptionHandler()
int
getNumStatements()
ScriptSourceInput
getScriptSourceInput()
ScriptTargetOutput
getScriptTargetOutput()
SourceType
getSourceType()
List<SchemaGenerator.SqlStatement>
getSql()
EnumSet<TargetType>
getTargetTypes()
void
prepare()
void
release()
boolean
shouldManageNamespaces()
-
-
-
Field Detail
-
allSql
private final List<SchemaGenerator.SqlStatement> allSql
-
dialect
private final 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, 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 interfaceScriptTargetOutput
-
prepare
public void prepare()
- Specified by:
prepare
in interfaceScriptTargetOutput
-
accept
public void accept(String sql)
- Specified by:
accept
in interfaceScriptTargetOutput
-
getScriptSourceInput
public ScriptSourceInput getScriptSourceInput()
- Specified by:
getScriptSourceInput
in interfaceSourceDescriptor
-
getSourceType
public SourceType getSourceType()
- Specified by:
getSourceType
in interfaceSourceDescriptor
-
getTargetTypes
public EnumSet<TargetType> getTargetTypes()
- Specified by:
getTargetTypes
in interfaceTargetDescriptor
-
getScriptTargetOutput
public ScriptTargetOutput getScriptTargetOutput()
- Specified by:
getScriptTargetOutput
in interfaceTargetDescriptor
-
getConfigurationValues
public Map<?,?> getConfigurationValues()
- Specified by:
getConfigurationValues
in interfaceExecutionOptions
-
shouldManageNamespaces
public boolean shouldManageNamespaces()
- Specified by:
shouldManageNamespaces
in interfaceExecutionOptions
-
getExceptionHandler
public ExceptionHandler getExceptionHandler()
- Specified by:
getExceptionHandler
in interfaceExecutionOptions
-
-