jimm.datavision.testdata.postgres
Class PostgreSQLSchemaGen

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by jimm.datavision.testdata.SchemaGen
          extended by jimm.datavision.testdata.postgres.PostgreSQLSchemaGen
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class PostgreSQLSchemaGen
extends SchemaGen


Field Summary
 
Fields inherited from class jimm.datavision.testdata.SchemaGen
isFirstColumn, notNull, primaryKey, size, type
 
Constructor Summary
PostgreSQLSchemaGen()
           
 
Method Summary
protected  void endTable()
          Outputs the SQL needed to close a create table statement.
static void main(java.lang.String[] args)
           
protected  void makeTable(java.lang.String tableName)
          Outputs the SQL needed to create a database table.
protected  void printNotNull()
          Prints the SQL that defines a column as NOT NULL.
protected  void printPrimaryKey()
          Prints the SQL that defines a column as a primary key.
protected  void printType(java.lang.String type, int size)
          Prints the SQL that defines a column's type.
 
Methods inherited from class jimm.datavision.testdata.SchemaGen
column, endElement, printableName, printColumn, printColumnName, run, startElement, table
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PostgreSQLSchemaGen

public PostgreSQLSchemaGen()
Method Detail

makeTable

protected void makeTable(java.lang.String tableName)
Description copied from class: SchemaGen
Outputs the SQL needed to create a database table. Optionally prints the SQL needed to destroy the table first.

Specified by:
makeTable in class SchemaGen

endTable

protected void endTable()
Description copied from class: SchemaGen
Outputs the SQL needed to close a create table statement.

Specified by:
endTable in class SchemaGen

printType

protected void printType(java.lang.String type,
                         int size)
Description copied from class: SchemaGen
Prints the SQL that defines a column's type.

Specified by:
printType in class SchemaGen

printNotNull

protected void printNotNull()
Description copied from class: SchemaGen
Prints the SQL that defines a column as NOT NULL.

Specified by:
printNotNull in class SchemaGen

printPrimaryKey

protected void printPrimaryKey()
Description copied from class: SchemaGen
Prints the SQL that defines a column as a primary key.

Specified by:
printPrimaryKey in class SchemaGen

main

public static void main(java.lang.String[] args)