org.sandev.generator
Class SQLReinitConverterGenerator

java.lang.Object
  extended byorg.sandev.generator.GeneratorCommon
      extended byorg.sandev.generator.AggregateGeneratorBase
          extended byorg.sandev.generator.AggregateMappedGeneratorBase
              extended byorg.sandev.generator.SQLReinitConverterGenerator
All Implemented Interfaces:
org.sandev.sandbuild.SandGenerator

public class SQLReinitConverterGenerator
extends AggregateMappedGeneratorBase
implements org.sandev.sandbuild.SandGenerator

Write a converter that clears all existing data, drops the offending table, and calls back to recreate it.


Field Summary
 
Fields inherited from class org.sandev.generator.AggregateMappedGeneratorBase
structmap, structPrefix
 
Fields inherited from class org.sandev.generator.AggregateGeneratorBase
extra
 
Fields inherited from class org.sandev.generator.GeneratorCommon
CONTEXT_CONFIGURATION, CONTEXT_CONTROL, CONTEXT_FRAMEWORK, CONTEXT_MESSAGING, CONTEXT_PERSISTENCE, CONTEXT_UI, DEFAULT_LINE_LENGTH, MESSAGE_INTERFACES
 
Constructor Summary
SQLReinitConverterGenerator()
           
 
Method Summary
protected  java.lang.String getFileSpec(java.io.File baseDir)
          Return "gen_base/src/org/sandev/tools/JDBC/ReinitConverter.java" or the equivalent filespec for the given platform.
protected  void writeClearData(java.io.PrintStream out, com.sun.javadoc.ClassDoc[] classes)
           
protected  void writeDropRebuildCode(java.io.PrintStream out, com.sun.javadoc.ClassDoc cd, java.lang.String maintablename)
           
protected  void writeFile(java.io.PrintStream out, org.sandev.sandbuild.SandDecl[] decls)
          Write the SchemaVerifier source file
protected  void writeFixTable(java.io.PrintStream out, com.sun.javadoc.ClassDoc[] classes)
           
protected  void writePostamble(java.io.PrintStream out)
           
protected  void writePreamble(java.io.PrintStream out)
           
protected  void writeWorkingMethods(java.io.PrintStream out, org.sandev.sandbuild.SandDecl[] decls)
           
 
Methods inherited from class org.sandev.generator.AggregateMappedGeneratorBase
getMappedFieldName, getMappedFieldRelation, getMappedFieldRelationChild, getMappedFieldRelationIndex, getMappedFieldRelationParent, getMappedFieldType, getMappedStructName, loadStructMapper, loadStructMapper
 
Methods inherited from class org.sandev.generator.AggregateGeneratorBase
addSandAttrValToDecls, cleanup, cleanupSecondaryFiles, generate, getExtra, setExtra, writeSecondaryFiles
 
Methods inherited from class org.sandev.generator.GeneratorCommon
capitalize, copyfile, deletefile, filterHTMLLine, getDeclaredFields, getFields, getInheritanceHierarchy, getLastAppProject, getLastUtilDir, getLongInstanceName, getPrintStream, getSandProject, getShortInstanceName, getUtilPackage, getVisibleFields, isBasic, isLongReferenceArray, isMessageInterface, isParentAbstract, isPrimitive, isRootStruct, isVowel, log, nextToken, pluralize, rangeEscape, removePlatformDecls, trackFileDelete, trackFileWrite, uncapitalize, writeDefaultCtor, writeDescription, writeHTMLContents, writeMessageImports, writeSectionName, writeStandardCommentID, writeXHTMLFooter, writeXHTMLFooter, writeXHTMLHeader, writeXHTMLHeader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.sandev.sandbuild.SandGenerator
cleanup, generate
 

Constructor Detail

SQLReinitConverterGenerator

public SQLReinitConverterGenerator()
Method Detail

getFileSpec

protected java.lang.String getFileSpec(java.io.File baseDir)
Return "gen_base/src/org/sandev/tools/JDBC/ReinitConverter.java" or the equivalent filespec for the given platform.


writeFile

protected void writeFile(java.io.PrintStream out,
                         org.sandev.sandbuild.SandDecl[] decls)
                  throws org.sandev.sandbuild.SandGeneratorException
Write the SchemaVerifier source file

Throws:
org.sandev.sandbuild.SandGeneratorException

writePreamble

protected void writePreamble(java.io.PrintStream out)

writePostamble

protected void writePostamble(java.io.PrintStream out)

writeWorkingMethods

protected void writeWorkingMethods(java.io.PrintStream out,
                                   org.sandev.sandbuild.SandDecl[] decls)

writeClearData

protected void writeClearData(java.io.PrintStream out,
                              com.sun.javadoc.ClassDoc[] classes)

writeFixTable

protected void writeFixTable(java.io.PrintStream out,
                             com.sun.javadoc.ClassDoc[] classes)

writeDropRebuildCode

protected void writeDropRebuildCode(java.io.PrintStream out,
                                    com.sun.javadoc.ClassDoc cd,
                                    java.lang.String maintablename)