org.apache.ws.jaxme.pm.generator.jdbc

Class JaxMeJdbcSG

public class JaxMeJdbcSG extends SGFactoryChainImpl

A schema writer for creation of an object relational mapping.

Author: Jochen Wiedmann

Nested Class Summary
static classJaxMeJdbcSG.Mode
A database mode specifies, how JDBC metadata is being interpreted.
Field Summary
static StringJAXME_JDBC_SCHEMA_URI

Namespace URI of the JDBC schema writer.

Constructor Summary
JaxMeJdbcSG(SGFactoryChain o)
Creates a new instance.
Method Summary
protected ObjectaddColumn(ComplexTypeSG pTypeSG, XSType pType, Column pColumn)

Creates a new attribute or chooses an existing atomic child element.

protected CustomTableDataaddTableData(ComplexTypeSG pTypeSG, XSType pType, TableDetails pTableDetails)
protected JaxMeJdbcSG.ModegetDatabaseMode(ConnectionDetails pDetails, Connection pConn)
protected intgetDbType(JaxMeJdbcSG.Mode pDbMode, int pDbType, long pScale, long pPrecision, String pDbTypeName)

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

GeneratorgetGenerator(SGFactory pFactory)
StringgetKey()
Returns the key, under which the JaxMeJdbcSG is registered in the factory.
protected SGFactorygetSGFactory()
voidinit(SGFactory pFactory)
ObjectnewSchemaSG(SGFactory pController, XSSchema pSchema)
ObjectnewTypeSG(SGFactory pController, XSType pType)
ObjectnewTypeSG(SGFactory pController, XSType pType, XsQName pName)
ObjectnewTypeSG(SGFactory pController, XSType pType, Context pClassContext, XsQName pName)

Field Detail

JAXME_JDBC_SCHEMA_URI

public static final String JAXME_JDBC_SCHEMA_URI

Namespace URI of the JDBC schema writer.

Constructor Detail

JaxMeJdbcSG

public JaxMeJdbcSG(SGFactoryChain o)
Creates a new instance.

Method Detail

addColumn

protected Object addColumn(ComplexTypeSG pTypeSG, XSType pType, Column pColumn)

Creates a new attribute or chooses an existing atomic child element. Returns the AttributeSG or ParticleSG.

addTableData

protected CustomTableData addTableData(ComplexTypeSG pTypeSG, XSType pType, TableDetails pTableDetails)

getDatabaseMode

protected JaxMeJdbcSG.Mode getDatabaseMode(ConnectionDetails pDetails, Connection pConn)

getDbType

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

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

getGenerator

public Generator getGenerator(SGFactory pFactory)

getKey

public String getKey()
Returns the key, under which the JaxMeJdbcSG is registered in the factory.

getSGFactory

protected SGFactory getSGFactory()

init

public void init(SGFactory pFactory)

newSchemaSG

public Object newSchemaSG(SGFactory pController, XSSchema pSchema)

newTypeSG

public Object newTypeSG(SGFactory pController, XSType pType)

newTypeSG

public Object newTypeSG(SGFactory pController, XSType pType, XsQName pName)

newTypeSG

public Object newTypeSG(SGFactory pController, XSType pType, Context pClassContext, XsQName pName)