de.ispsoft.jaxme.generator.javaclasswriter
Class JdbcTableClassWriter

java.lang.Object
  extended byde.ispsoft.jaxme.generator.javaclasswriter.BasicJavaClassWriter
      extended byde.ispsoft.jaxme.generator.javaclasswriter.JdbcTableClassWriter
All Implemented Interfaces:
JavaClassWriter
Direct Known Subclasses:
JdbcViewClassWriter

public class JdbcTableClassWriter
extends BasicJavaClassWriter

An extension of the Java class writer for JDBC handling.

Author:
Jochen Wiedmann

Field Summary
 
Fields inherited from class de.ispsoft.jaxme.generator.javaclasswriter.BasicJavaClassWriter
sourceWriter
 
Constructor Summary
JdbcTableClassWriter(SourceWriterImpl pSourceWriter, SchemaComplexElement pElement)
          Creates a new instance of JdbcJavaClassWriter
 
Method Summary
protected  int addColumnReadCode(JavaMethod pJm, SqlField pSf, java.lang.String pVariable, java.lang.String pRsVariable, int pTemp, int pCount)
           
protected  void generatePrepareStatements(JavaMethod jm, java.util.List pFields, java.util.List pModes, java.lang.String pQuery)
           
protected  int getContextSize(SqlField sf)
           
protected  JavaMethod getDeleteMethod(JavaSource pJs)
           
protected  JavaMethod getGetFieldListMethod(JavaSource pJs)
           
protected  JavaMethod getGetInsertCreatesPrimaryKeyMethod(JavaSource pJs)
           
protected  JavaMethod getGetTableListMethod(JavaSource pJs)
           
protected  JavaMethod getGetWhereMethod(JavaSource pJs)
           
protected  JavaMethod getInitMethod(JavaSource pJs)
           
protected  JavaMethod getInsertMethod(JavaSource pJs)
           
protected  JavaMethod getListMethod(JdbcListMethod pMethod)
           
protected  JdbcListMethod[] getListMethods()
           
 JavaSource getManagerClass()
          Generates a JMManager class.
protected  JavaComment getManagerClassDocs()
           
protected  JavaMethod getNewPrimaryKeyMethod(JavaSource pJs)
           
protected  SqlField[] getTopLevelFields()
           
protected  SqlField[] getTopLevelKeys()
           
protected  SqlField[] getTopLevelNonKeys()
           
protected  JavaMethod getUpdateMethod(JavaSource pJs)
           
protected  JavaMethod getVoidListMethod(JdbcListMethod pMethod)
           
 
Methods inherited from class de.ispsoft.jaxme.generator.javaclasswriter.BasicJavaClassWriter
addRestrictions, addValidationException, fillPrefixList, generateCloneFor, generateField, generateFields, getAddFieldMethod, getChildMap, getChildsToSAXMethod, getCloneMethod, getDefaultConstructor, getDefaultHandlerConstructor, getFieldDeclaration, getGetAttributeMethod, getGetAttributesMethod, getGetElementMethod, getGetFieldMethod, getGetPrefixListMethod, getHandlerClass, getImports, getLocalNameField, getLogWithLog4j, getMyElemField, getNamespaceUriField, getNewContentHandlerMethod, getNewResultNodeMethod, getPrefixListField, getProcessResultNodeMethod, getProtectedConstructor, getSetAttributeMethod, getSetFieldMethod, getStateField, getValidateMeMethod, getValidateMethod, getXmlClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JdbcTableClassWriter

public JdbcTableClassWriter(SourceWriterImpl pSourceWriter,
                            SchemaComplexElement pElement)
Creates a new instance of JdbcJavaClassWriter

Method Detail

getGetWhereMethod

protected JavaMethod getGetWhereMethod(JavaSource pJs)

getGetTableListMethod

protected JavaMethod getGetTableListMethod(JavaSource pJs)

getGetFieldListMethod

protected JavaMethod getGetFieldListMethod(JavaSource pJs)

getInitMethod

protected JavaMethod getInitMethod(JavaSource pJs)

getContextSize

protected int getContextSize(SqlField sf)

getTopLevelFields

protected SqlField[] getTopLevelFields()

getTopLevelKeys

protected SqlField[] getTopLevelKeys()

getTopLevelNonKeys

protected SqlField[] getTopLevelNonKeys()

getInsertMethod

protected JavaMethod getInsertMethod(JavaSource pJs)

generatePrepareStatements

protected void generatePrepareStatements(JavaMethod jm,
                                         java.util.List pFields,
                                         java.util.List pModes,
                                         java.lang.String pQuery)

getUpdateMethod

protected JavaMethod getUpdateMethod(JavaSource pJs)

getDeleteMethod

protected JavaMethod getDeleteMethod(JavaSource pJs)

getManagerClassDocs

protected JavaComment getManagerClassDocs()

getListMethods

protected JdbcListMethod[] getListMethods()

getListMethod

protected JavaMethod getListMethod(JdbcListMethod pMethod)

getVoidListMethod

protected JavaMethod getVoidListMethod(JdbcListMethod pMethod)

addColumnReadCode

protected int addColumnReadCode(JavaMethod pJm,
                                SqlField pSf,
                                java.lang.String pVariable,
                                java.lang.String pRsVariable,
                                int pTemp,
                                int pCount)

getGetInsertCreatesPrimaryKeyMethod

protected JavaMethod getGetInsertCreatesPrimaryKeyMethod(JavaSource pJs)

getNewPrimaryKeyMethod

protected JavaMethod getNewPrimaryKeyMethod(JavaSource pJs)

getManagerClass

public JavaSource getManagerClass()
Description copied from class: BasicJavaClassWriter

Generates a JMManager class.

Specified by:
getManagerClass in interface JavaClassWriter
Overrides:
getManagerClass in class BasicJavaClassWriter