net.sourceforge.addam.ddlgen.generic
Class InsertGenerator

java.lang.Object
  extended by net.sourceforge.addam.ddlgen.generic.VelocityGenerator
      extended by net.sourceforge.addam.ddlgen.generic.InsertGenerator
All Implemented Interfaces:
Generator

public class InsertGenerator
extends VelocityGenerator

User: mkrishna Date: Nov 18, 2004


Field Summary
private  List rows
           
 
Constructor Summary
InsertGenerator()
           
 
Method Summary
 void generate(String catalog, String schema, String object, String vendor, Connection connection, DatabaseMetaData metadata, BufferedWriter writer)
          writes a SQL/DDL scripts for the given object to the writer
protected  org.apache.velocity.VelocityContext getContext(String catalog, String schema, String object, Connection connection, DatabaseMetaData metadata)
           
protected  String getFormattedString(String unformattedString, int sqlType)
           
private  List<String> getRow(ResultSet resultSet)
           
protected  List getRows()
           
 
Methods inherited from class net.sourceforge.addam.ddlgen.generic.VelocityGenerator
getObjects, getTemplate, getTemplateName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rows

private List rows
Constructor Detail

InsertGenerator

public InsertGenerator()
Method Detail

generate

public void generate(String catalog,
                     String schema,
                     String object,
                     String vendor,
                     Connection connection,
                     DatabaseMetaData metadata,
                     BufferedWriter writer)
              throws Exception
Description copied from interface: Generator
writes a SQL/DDL scripts for the given object to the writer

Specified by:
generate in interface Generator
Overrides:
generate in class VelocityGenerator
Parameters:
catalog - the database object's catalog
schema - the database object's schema
object - the database object to generate
connection - the database connection
metadata - database metadata for the connection
writer - what to write the generated SQL/DDL to
Throws:
Exception

getContext

protected org.apache.velocity.VelocityContext getContext(String catalog,
                                                         String schema,
                                                         String object,
                                                         Connection connection,
                                                         DatabaseMetaData metadata)
                                                  throws Exception
Specified by:
getContext in class VelocityGenerator
Throws:
Exception

getRow

private List<String> getRow(ResultSet resultSet)
                     throws SQLException
Throws:
SQLException

getFormattedString

protected String getFormattedString(String unformattedString,
                                    int sqlType)

getRows

protected List getRows()


Copyright © 2005-2006 ADDAM Project Team. All Rights Reserved.