|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.sandev.generator.GeneratorCommon
org.sandev.generator.AggregateGeneratorBase
org.sandev.generator.AggregateMappedGeneratorBase
org.sandev.generator.SQLQueryProcessorGenerator
public class SQLQueryProcessorGenerator
Generate the query processor.
| 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 | |
|---|---|
SQLQueryProcessorGenerator()
|
|
| Method Summary | |
|---|---|
protected void |
dumpFields(java.io.PrintStream out,
com.sun.javadoc.ClassDoc cd,
java.lang.String name,
boolean recursiveCall)
If recursiveCall is false, then we have no trailing comma after the last field. |
protected void |
dumpJoinExpr(java.io.PrintStream out,
com.sun.javadoc.ClassDoc cd,
com.sun.javadoc.FieldDoc fduid,
boolean recursiveCall)
This is the join statement being inserted after a "WHERE", and we are working off a "preceding AND" model when creating conditions. |
protected void |
dumpRefArrayFills(java.io.PrintStream out,
com.sun.javadoc.ClassDoc cd,
java.lang.String name)
Dump out the reference array population code. |
protected void |
dumpResultSetCalls(java.io.PrintStream out,
com.sun.javadoc.ClassDoc cd,
java.lang.String name,
boolean trailingComma)
When reading a Date from the result set, using a Calendar with the TimeZone for the field ends up double converting. |
protected void |
dumpTables(java.io.PrintStream out,
com.sun.javadoc.ClassDoc cd,
boolean recursiveCall)
If recursiveCall is false, then we have no trailing comma after the table name. |
protected com.sun.javadoc.ClassDoc |
findClassDocForName(java.lang.String name)
Return the ClassDoc corresponding to the reference name. |
static com.sun.javadoc.ClassDoc |
findFieldOwnerClassDoc(com.sun.javadoc.ClassDoc cd,
com.sun.javadoc.FieldDoc fd)
Return the ClassDoc this field is actually part of, within the inheritance tree of the given ClassDoc. |
protected com.sun.javadoc.FieldDoc |
findUniqueIDField(com.sun.javadoc.FieldDoc[] fields)
|
protected java.lang.String |
getFileSpec(java.io.File baseDir)
Return "gen_base/src/org/sandev/tools/JDBC/QueryProcessor.java" or the equivalent filespec for the given platfozm. |
protected boolean |
isAbstractPersistentClass(java.lang.String name)
Return true if the given name is an abstract persistent class. |
protected void |
writeArrayFieldSetterCall(java.io.PrintStream out,
com.sun.javadoc.FieldDoc fd)
|
protected void |
writeClassSubselect(java.io.PrintStream out,
com.sun.javadoc.ClassDoc[] classes)
|
protected void |
writeCollBuilder(java.io.PrintStream out,
com.sun.javadoc.ClassDoc cd,
java.lang.String name)
|
protected void |
writeDoQuery(java.io.PrintStream out,
com.sun.javadoc.ClassDoc[] classes)
|
protected void |
writeFile(java.io.PrintStream out,
org.sandev.sandbuild.SandDecl[] decls)
Write the SchemaVerifier source file |
protected void |
writeGetAggregateFunctionSQL(java.io.PrintStream out)
|
protected void |
writeLoadRefArray(java.io.PrintStream out)
|
protected void |
writeMatchExprToSQL(java.io.PrintStream out)
|
protected void |
writeMiscUtils(java.io.PrintStream out)
Write any additional miscellaneous utility methods |
protected void |
writePostamble(java.io.PrintStream out)
Write the end of the file. |
protected void |
writePreamble(java.io.PrintStream out,
org.sandev.sandbuild.SandDecl[] decls)
|
protected void |
writeQueryProc(java.io.PrintStream out,
com.sun.javadoc.ClassDoc cd,
java.lang.String name)
|
protected void |
writeSetFunctionResult(java.io.PrintStream out)
|
protected void |
writeSQLGenerator(java.io.PrintStream out,
com.sun.javadoc.ClassDoc cd,
java.lang.String name)
Write the base SQL. |
protected void |
writeSQLPreamble(java.io.PrintStream out,
com.sun.javadoc.ClassDoc cd,
java.lang.String name)
|
protected void |
writeStreamTokerMethods(java.io.PrintStream out)
|
protected void |
writeSubselectClause(java.io.PrintStream out,
com.sun.javadoc.ClassDoc cd,
com.sun.javadoc.FieldDoc[] fields)
Write the subselect needed for the given field. |
protected void |
writeUtils(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, 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, findStructDeclByShortname, getDeclaredFields, getFields, getInheritanceHierarchy, getLastAppProject, getLastUtilDir, getLongInstanceName, getPrintStream, getSandProject, getShortInstanceName, getUtilPackage, getVisibleFields, hasSubStructs, isArray, 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 |
|---|
public SQLQueryProcessorGenerator()
| Method Detail |
|---|
protected com.sun.javadoc.ClassDoc findClassDocForName(java.lang.String name)
protected boolean isAbstractPersistentClass(java.lang.String name)
protected java.lang.String getFileSpec(java.io.File baseDir)
getFileSpec in class org.sandev.generator.AggregateGeneratorBase
protected void writeFile(java.io.PrintStream out,
org.sandev.sandbuild.SandDecl[] decls)
throws org.sandev.sandbuild.SandGeneratorException
writeFile in class org.sandev.generator.AggregateGeneratorBaseorg.sandev.sandbuild.SandGeneratorException
protected void writePreamble(java.io.PrintStream out,
org.sandev.sandbuild.SandDecl[] decls)
protected void writePostamble(java.io.PrintStream out)
protected void writeWorkingMethods(java.io.PrintStream out,
org.sandev.sandbuild.SandDecl[] decls)
throws org.sandev.sandbuild.SandGeneratorException
org.sandev.sandbuild.SandGeneratorException
protected void writeDoQuery(java.io.PrintStream out,
com.sun.javadoc.ClassDoc[] classes)
throws org.sandev.sandbuild.SandGeneratorException
org.sandev.sandbuild.SandGeneratorException
protected void writeQueryProc(java.io.PrintStream out,
com.sun.javadoc.ClassDoc cd,
java.lang.String name)
throws org.sandev.sandbuild.SandGeneratorException
org.sandev.sandbuild.SandGeneratorException
protected void dumpRefArrayFills(java.io.PrintStream out,
com.sun.javadoc.ClassDoc cd,
java.lang.String name)
protected void writeSQLGenerator(java.io.PrintStream out,
com.sun.javadoc.ClassDoc cd,
java.lang.String name)
throws org.sandev.sandbuild.SandGeneratorException
org.sandev.sandbuild.SandGeneratorExceptionprotected com.sun.javadoc.FieldDoc findUniqueIDField(com.sun.javadoc.FieldDoc[] fields)
protected void writeSQLPreamble(java.io.PrintStream out,
com.sun.javadoc.ClassDoc cd,
java.lang.String name)
protected void dumpFields(java.io.PrintStream out,
com.sun.javadoc.ClassDoc cd,
java.lang.String name,
boolean recursiveCall)
protected void dumpTables(java.io.PrintStream out,
com.sun.javadoc.ClassDoc cd,
boolean recursiveCall)
protected void dumpJoinExpr(java.io.PrintStream out,
com.sun.javadoc.ClassDoc cd,
com.sun.javadoc.FieldDoc fduid,
boolean recursiveCall)
protected void writeSubselectClause(java.io.PrintStream out,
com.sun.javadoc.ClassDoc cd,
com.sun.javadoc.FieldDoc[] fields)
throws org.sandev.sandbuild.SandGeneratorException
org.sandev.sandbuild.SandGeneratorException
public static com.sun.javadoc.ClassDoc findFieldOwnerClassDoc(com.sun.javadoc.ClassDoc cd,
com.sun.javadoc.FieldDoc fd)
protected void writeCollBuilder(java.io.PrintStream out,
com.sun.javadoc.ClassDoc cd,
java.lang.String name)
protected void dumpResultSetCalls(java.io.PrintStream out,
com.sun.javadoc.ClassDoc cd,
java.lang.String name,
boolean trailingComma)
protected void writeArrayFieldSetterCall(java.io.PrintStream out,
com.sun.javadoc.FieldDoc fd)
protected void writeClassSubselect(java.io.PrintStream out,
com.sun.javadoc.ClassDoc[] classes)
throws org.sandev.sandbuild.SandGeneratorException
org.sandev.sandbuild.SandGeneratorExceptionprotected void writeUtils(java.io.PrintStream out)
protected void writeLoadRefArray(java.io.PrintStream out)
protected void writeStreamTokerMethods(java.io.PrintStream out)
protected void writeMatchExprToSQL(java.io.PrintStream out)
protected void writeGetAggregateFunctionSQL(java.io.PrintStream out)
protected void writeSetFunctionResult(java.io.PrintStream out)
protected void writeMiscUtils(java.io.PrintStream out)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||