com.agimatec.sql.meta.script
Class DDLScriptSqlMetaFactory

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

public class DDLScriptSqlMetaFactory
extends Object
implements SqlMetaFactory, ScriptVisitor

Description:
User: roman.stumm
Date: 24.04.2007
Time: 19:01:18
Copyright: Agimatec GmbH


Nested Class Summary
protected  class DDLScriptSqlMetaFactory.CatalogBuilder
           
protected  class DDLScriptSqlMetaFactory.DezignCreateTableBuilder
           
 
Constructor Summary
DDLScriptSqlMetaFactory(DDLExpressions ddlSpecification)
           
 
Method Summary
static ExtractExpr[] compileExpressions(String[] statementFormats)
           
 void doCommit()
           
 void doRollback()
           
 void fillCatalog(URL scriptURL)
          API - not thread-safe. only fill one catalog at the same time with this instance.
protected  Map<String,DDLScriptSqlMetaFactory.CatalogBuilder> getBuilders()
           
 CatalogDescription getCatalog()
           
protected  DDLExpressions getDdlSpec()
           
protected  PropertiesExtractor getExtractor()
           
protected  void init()
           
 void setCatalog(CatalogDescription aCatalog)
           
 void visitComment(String theComment)
           
 int visitStatement(String statement)
          parse the statement and create the adequate parts of the Catalog
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DDLScriptSqlMetaFactory

public DDLScriptSqlMetaFactory(DDLExpressions ddlSpecification)
Method Detail

init

protected void init()

compileExpressions

public static ExtractExpr[] compileExpressions(String[] statementFormats)

getBuilders

protected Map<String,DDLScriptSqlMetaFactory.CatalogBuilder> getBuilders()

getDdlSpec

protected DDLExpressions getDdlSpec()

getExtractor

protected PropertiesExtractor getExtractor()

getCatalog

public CatalogDescription getCatalog()

setCatalog

public void setCatalog(CatalogDescription aCatalog)

fillCatalog

public void fillCatalog(URL scriptURL)
                 throws SQLException,
                        IOException
API - not thread-safe. only fill one catalog at the same time with this instance.

Parameters:
scriptURL - - URL to a script to parse
Throws:
IOException - - url not found
SQLException - - error executing SQL

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
Parameters:
statement - - a DDL statement (Oracle syntax)
Returns:
0
Throws:
SQLException

visitComment

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

doCommit

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

doRollback

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


Copyright © 2008-2012. All Rights Reserved.