net.sf.jaxme.generator.sg.impl
Class JaxMeJdbcSG

java.lang.Object
  extended bynet.sf.jaxme.generator.sg.impl.SGFactoryChainImpl
      extended bynet.sf.jaxme.generator.sg.impl.JaxMeJdbcSG
All Implemented Interfaces:
SGFactoryChain

public class JaxMeJdbcSG
extends SGFactoryChainImpl

A schema writer for creation of an object relational mapping.

Author:
Jochen Wiedmann

Nested Class Summary
 class JaxMeJdbcSG.ConnectionDetails
           
protected  class JaxMeJdbcSG.CustomColumnData
           
protected  class JaxMeJdbcSG.CustomTableData
           
static class JaxMeJdbcSG.Mode
           
 class JaxMeJdbcSG.TableDetails
           
 
Field Summary
static java.lang.String JAXME_JDBC_SCHEMA_URI
          Namespace URI of the JDBC schema writer.
 
Constructor Summary
protected JaxMeJdbcSG(SGFactoryChain o)
           
 
Method Summary
protected  AttributeSG addColumn(ComplexTypeSG pTypeSG, net.sf.jaxme.xs.XSType pType, java.lang.String pTable, java.lang.String pColumn, java.lang.Integer pSqlType, java.lang.Integer pNullable)
           
protected  JaxMeJdbcSG.CustomTableData addTableData(ComplexTypeSG pTypeSG, net.sf.jaxme.xs.XSType pType, JaxMeJdbcSG.TableDetails pTableDetails)
           
protected  JaxMeJdbcSG.Mode getDatabaseMode(JaxMeJdbcSG.ConnectionDetails pDetails, java.sql.Connection pConn)
           
protected  int getDbType(JaxMeJdbcSG.Mode pDbMode, int pDbType, int pScale, int pPrecision)
          Guess an SQL type, based on reported type, scale and precision.
 Generator getGenerator(SGFactory pFactory)
           
protected  SGFactory getSGFactory()
           
 void init(SGFactory pFactory)
           
 java.lang.Object newTypeSG(SGFactory pController, net.sf.jaxme.xs.XSType pType)
           
 java.lang.Object newTypeSG(SGFactory pController, net.sf.jaxme.xs.XSType pType, Context pClassContext, net.sf.jaxme.xs.xml.XsQName pName)
           
 
Methods inherited from class net.sf.jaxme.generator.sg.impl.SGFactoryChainImpl
getGroups, getGroupSG, getGroupSG, getObjects, getObjectSG, getObjectSG, getSchemaSG, getSchemaSG, getTypes, getTypeSG, getTypeSG, getTypeSG, newFacet, newGroupSG, newGroupSG, newObjectSG, newObjectSG, newSchemaSG, newTypeSG, newXSParser
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JAXME_JDBC_SCHEMA_URI

public static final java.lang.String JAXME_JDBC_SCHEMA_URI

Namespace URI of the JDBC schema writer.

See Also:
Constant Field Values
Constructor Detail

JaxMeJdbcSG

protected JaxMeJdbcSG(SGFactoryChain o)
Method Detail

init

public void init(SGFactory pFactory)
Specified by:
init in interface SGFactoryChain
Overrides:
init in class SGFactoryChainImpl

getSGFactory

protected SGFactory getSGFactory()

getGenerator

public Generator getGenerator(SGFactory pFactory)
Specified by:
getGenerator in interface SGFactoryChain
Overrides:
getGenerator in class SGFactoryChainImpl

getDatabaseMode

protected JaxMeJdbcSG.Mode getDatabaseMode(JaxMeJdbcSG.ConnectionDetails pDetails,
                                           java.sql.Connection pConn)
                                    throws java.sql.SQLException
Throws:
java.sql.SQLException

getDbType

protected int getDbType(JaxMeJdbcSG.Mode pDbMode,
                        int pDbType,
                        int pScale,
                        int pPrecision)

Guess an SQL type, based on reported type, scale and precision.


addColumn

protected AttributeSG addColumn(ComplexTypeSG pTypeSG,
                                net.sf.jaxme.xs.XSType pType,
                                java.lang.String pTable,
                                java.lang.String pColumn,
                                java.lang.Integer pSqlType,
                                java.lang.Integer pNullable)
                         throws SAXException
Throws:
SAXException

addTableData

protected JaxMeJdbcSG.CustomTableData addTableData(ComplexTypeSG pTypeSG,
                                                   net.sf.jaxme.xs.XSType pType,
                                                   JaxMeJdbcSG.TableDetails pTableDetails)
                                            throws SAXException
Throws:
SAXException

newTypeSG

public java.lang.Object newTypeSG(SGFactory pController,
                                  net.sf.jaxme.xs.XSType pType)
                           throws SAXException
Specified by:
newTypeSG in interface SGFactoryChain
Overrides:
newTypeSG in class SGFactoryChainImpl
Throws:
SAXException

newTypeSG

public java.lang.Object newTypeSG(SGFactory pController,
                                  net.sf.jaxme.xs.XSType pType,
                                  Context pClassContext,
                                  net.sf.jaxme.xs.xml.XsQName pName)
                           throws SAXException
Specified by:
newTypeSG in interface SGFactoryChain
Overrides:
newTypeSG in class SGFactoryChainImpl
Throws:
SAXException