com.agimatec.dbtransform
Class ScriptTransformator

java.lang.Object
  extended by com.agimatec.sql.meta.script.DDLScriptSqlMetaFactory
      extended by com.agimatec.dbtransform.ScriptTransformator
All Implemented Interfaces:
SqlMetaFactory, ScriptVisitor

public class ScriptTransformator
extends DDLScriptSqlMetaFactory

Description: Transform a single sql script
User: roman.stumm
Date: 17.12.2007
Time: 13:36:21
Copyright: Agimatec GmbH


Nested Class Summary
protected  class ScriptTransformator.CreateIndexBuilder
           
protected  class ScriptTransformator.DropTableBuilder
           
protected  class ScriptTransformator.DropTriggerBuilder
           
protected  class ScriptTransformator.TableAlterColumnsBuilder
           
protected  class ScriptTransformator.TransformDezignCreateTableBuilder
           
 
Nested classes/interfaces inherited from class com.agimatec.sql.meta.script.DDLScriptSqlMetaFactory
DDLScriptSqlMetaFactory.CatalogBuilder, DDLScriptSqlMetaFactory.DezignCreateTableBuilder
 
Constructor Summary
ScriptTransformator(DDLExpressions ddlSpecification, PrintWriter target, CatalogConversion catalogConversion, FreemarkerFileGenerator templateEngine)
           
 
Method Summary
 void doCommit()
           
 void doRollback()
           
protected  void init()
           
 void visitComment(String theComment)
           
 int visitStatement(String statement)
          parse the statement and create the adequate parts of the Catalog
 
Methods inherited from class com.agimatec.sql.meta.script.DDLScriptSqlMetaFactory
compileExpressions, fillCatalog, getBuilders, getCatalog, getDdlSpec, getExtractor, setCatalog
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScriptTransformator

public ScriptTransformator(DDLExpressions ddlSpecification,
                           PrintWriter target,
                           CatalogConversion catalogConversion,
                           FreemarkerFileGenerator templateEngine)
Method Detail

init

protected void init()
Overrides:
init in class DDLScriptSqlMetaFactory

visitComment

public void visitComment(String theComment)
                  throws SQLException
Specified by:
visitComment in interface ScriptVisitor
Overrides:
visitComment in class DDLScriptSqlMetaFactory
Throws:
SQLException

visitStatement

public int visitStatement(String statement)
                   throws SQLException
parse the statement and create the adequate parts of the Catalog

Specified by:
visitStatement in interface ScriptVisitor
Overrides:
visitStatement in class DDLScriptSqlMetaFactory
Parameters:
statement - - a DDL statement (Oracle syntax)
Returns:
0
Throws:
SQLException

doCommit

public void doCommit()
              throws SQLException
Specified by:
doCommit in interface ScriptVisitor
Overrides:
doCommit in class DDLScriptSqlMetaFactory
Throws:
SQLException

doRollback

public void doRollback()
                throws SQLException
Specified by:
doRollback in interface ScriptVisitor
Overrides:
doRollback in class DDLScriptSqlMetaFactory
Throws:
SQLException


Copyright © 2008-2012. All Rights Reserved.