SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool

com.solarmetric.rd.kodo.impl.jdbc.schema
Class DynamicSchemaFactory

java.lang.Object
  |
  +--com.solarmetric.rd.kodo.impl.jdbc.schema.NameSet
        |
        +--com.solarmetric.rd.kodo.impl.jdbc.schema.SchemaGroup
              |
              +--com.solarmetric.rd.kodo.impl.jdbc.schema.DynamicSchemaFactory
All Implemented Interfaces:
java.lang.Cloneable, SchemaFactory

public class DynamicSchemaFactory
extends SchemaGroup
implements SchemaFactory

Factory whose schema group dynamically fills itself with information mappings validate themselves in their fromMappingInfo method. Tables are added when SchemaGroup.findTable(java.lang.String) is called. Columns are added to tables when Table.getColumn(java.lang.String) is called. And the column types are set when Column#isComptible is called.


Constructor Summary
DynamicSchemaFactory()
           
 
Method Summary
 com.solarmetric.rd.kodo.impl.jdbc.schema.Table findTable(java.lang.String name)
          Find the table with the given name in the group.
protected  com.solarmetric.rd.kodo.impl.jdbc.schema.Column newColumn(java.lang.String name, com.solarmetric.rd.kodo.impl.jdbc.schema.Table table)
          Return a new column with the given name and owner table.
protected  com.solarmetric.rd.kodo.impl.jdbc.schema.ForeignKey newForeignKey(java.lang.String name, com.solarmetric.rd.kodo.impl.jdbc.schema.Table table)
          Return a new foreign key with the given name and owner table.
protected  com.solarmetric.rd.kodo.impl.jdbc.schema.PrimaryKey newPrimaryKey(java.lang.String name, com.solarmetric.rd.kodo.impl.jdbc.schema.Table table)
          Return a new primary key with the given name and owner table.
protected  com.solarmetric.rd.kodo.impl.jdbc.schema.Table newTable(java.lang.String name, com.solarmetric.rd.kodo.impl.jdbc.schema.Schema schema)
          Return a new table with the given name and owner schema.
 com.solarmetric.rd.kodo.impl.jdbc.schema.SchemaGroup readSchema()
          Return the schema group for the current object model and database.
 void setConfiguration(com.solarmetric.rd.kodo.impl.jdbc.conf.JDBCConfiguration conf)
          Set the configuration for the factory.
 void storeSchema(com.solarmetric.rd.kodo.impl.jdbc.schema.SchemaGroup schema)
          Record the schema group after changes may have been made.
 
Methods inherited from class com.solarmetric.rd.kodo.impl.jdbc.schema.SchemaGroup
addSchema, addSchema, clone, findExportedForeignKeys, getSchema, getSchemas, importSchema, newIndex, newSchema, removeSchema, removeUnusedComponents
 
Methods inherited from class com.solarmetric.rd.kodo.impl.jdbc.schema.NameSet
addName, isNameTaken, removeName
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DynamicSchemaFactory

public DynamicSchemaFactory()
Method Detail

setConfiguration

public void setConfiguration(com.solarmetric.rd.kodo.impl.jdbc.conf.JDBCConfiguration conf)
Description copied from interface: SchemaFactory
Set the configuration for the factory.

Specified by:
setConfiguration in interface SchemaFactory

readSchema

public com.solarmetric.rd.kodo.impl.jdbc.schema.SchemaGroup readSchema()
Description copied from interface: SchemaFactory
Return the schema group for the current object model and database.

Specified by:
readSchema in interface SchemaFactory

storeSchema

public void storeSchema(com.solarmetric.rd.kodo.impl.jdbc.schema.SchemaGroup schema)
Description copied from interface: SchemaFactory
Record the schema group after changes may have been made.

Specified by:
storeSchema in interface SchemaFactory
Parameters:
schema - the schema definition for the entire system

findTable

public com.solarmetric.rd.kodo.impl.jdbc.schema.Table findTable(java.lang.String name)
Description copied from class: SchemaGroup
Find the table with the given name in the group. Returns null if no table found.

Overrides:
findTable in class SchemaGroup

newTable

protected com.solarmetric.rd.kodo.impl.jdbc.schema.Table newTable(java.lang.String name,
                                                                  com.solarmetric.rd.kodo.impl.jdbc.schema.Schema schema)
Description copied from class: SchemaGroup
Return a new table with the given name and owner schema.

Overrides:
newTable in class SchemaGroup

newColumn

protected com.solarmetric.rd.kodo.impl.jdbc.schema.Column newColumn(java.lang.String name,
                                                                    com.solarmetric.rd.kodo.impl.jdbc.schema.Table table)
Description copied from class: SchemaGroup
Return a new column with the given name and owner table.

Overrides:
newColumn in class SchemaGroup

newPrimaryKey

protected com.solarmetric.rd.kodo.impl.jdbc.schema.PrimaryKey newPrimaryKey(java.lang.String name,
                                                                            com.solarmetric.rd.kodo.impl.jdbc.schema.Table table)
Description copied from class: SchemaGroup
Return a new primary key with the given name and owner table.

Overrides:
newPrimaryKey in class SchemaGroup

newForeignKey

protected com.solarmetric.rd.kodo.impl.jdbc.schema.ForeignKey newForeignKey(java.lang.String name,
                                                                            com.solarmetric.rd.kodo.impl.jdbc.schema.Table table)
Description copied from class: SchemaGroup
Return a new foreign key with the given name and owner table.

Overrides:
newForeignKey in class SchemaGroup

SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool

Copyright 2001,2002,2003 SolarMetric, Inc. All Rights Reserved.