org.ephman.abra.tools
Class SchemaGenerator

java.lang.Object
  |
  +--org.ephman.abra.tools.GenericSchemaGenerator
        |
        +--org.ephman.abra.tools.SchemaGenerator

public class SchemaGenerator
extends GenericSchemaGenerator

given a base output directory generate a schema file ORACLE specific one !!

Version:
0.0.2
Author:
Paul M. Bethe

Field Summary
(package private)  java.lang.String closeStmt
           
(package private) static java.lang.String dbPackageName
           
(package private)  java.lang.String FUNC_HEADER
           
(package private) static java.lang.String INSERT_PREFIX
           
(package private)  java.lang.String PROC_SUFFIX
           
(package private)  java.lang.String procBody
           
protected  java.io.FileWriter procFile
           
protected  java.lang.String procFileName
           
 
Fields inherited from class org.ephman.abra.tools.GenericSchemaGenerator
cleanup, cleanupConstraints, cleanupFile, constraintList, constraints, END_DATE, END_DATE_TYPE, fileSeperator, outdir, schemaFile, VERSION_NUMBER
 
Constructor Summary
SchemaGenerator(java.lang.String outFileName)
           
 
Method Summary
 void close()
          generic close if you want to write constraints -- override (see Oracle version)
 void generate(JClass currentClass)
           
protected  void writePrimaryKey(JClass currentClass, java.lang.String sqlName)
          generic primary in table creation..
protected  void writeProcedures(JClass currentClass)
           
protected  void writeUniqueConstraint(JClass currentClass, JField jf)
           
 
Methods inherited from class org.ephman.abra.tools.GenericSchemaGenerator
addConstraint, addIndex, cleanUpConstraint, cleanUpIndex, convertFields, getDropSeqStmt, getSqlOutType, inlineField, jToSql, makeConstraintName, needsSequence, writeCheckConstraint, writeFieldSchema, writeForeignKey
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dbPackageName

static java.lang.String dbPackageName

PROC_SUFFIX

final java.lang.String PROC_SUFFIX
See Also:
Constant Field Values

procFileName

protected java.lang.String procFileName

procFile

protected java.io.FileWriter procFile

procBody

java.lang.String procBody

closeStmt

java.lang.String closeStmt

FUNC_HEADER

java.lang.String FUNC_HEADER

INSERT_PREFIX

static java.lang.String INSERT_PREFIX
Constructor Detail

SchemaGenerator

public SchemaGenerator(java.lang.String outFileName)
                throws java.io.IOException,
                       SchemaException
Method Detail

close

public void close()
           throws java.io.IOException,
                  SchemaException
Description copied from class: GenericSchemaGenerator
generic close if you want to write constraints -- override (see Oracle version)

Overrides:
close in class GenericSchemaGenerator
java.io.IOException
SchemaException

generate

public void generate(JClass currentClass)
              throws java.io.IOException,
                     SchemaException
Overrides:
generate in class GenericSchemaGenerator
java.io.IOException
SchemaException

writeUniqueConstraint

protected void writeUniqueConstraint(JClass currentClass,
                                     JField jf)
                              throws java.io.IOException,
                                     SchemaException
Overrides:
writeUniqueConstraint in class GenericSchemaGenerator
java.io.IOException
SchemaException

writePrimaryKey

protected void writePrimaryKey(JClass currentClass,
                               java.lang.String sqlName)
                        throws java.io.IOException
Description copied from class: GenericSchemaGenerator
generic primary in table creation..

Overrides:
writePrimaryKey in class GenericSchemaGenerator
java.io.IOException

writeProcedures

protected void writeProcedures(JClass currentClass)
                        throws java.io.IOException
java.io.IOException