SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool

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

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

public class SchemaGroup
extends NameSet
implements java.lang.Cloneable

Represents a grouping of schemas used in a database.


Constructor Summary
SchemaGroup()
           
 
Method Summary
 com.solarmetric.rd.kodo.impl.jdbc.schema.Schema addSchema()
          Add a schema to the group.
 com.solarmetric.rd.kodo.impl.jdbc.schema.Schema addSchema(java.lang.String name)
          Add a schema to the group.
 java.lang.Object clone()
           
 com.solarmetric.rd.kodo.impl.jdbc.schema.ForeignKey[] findExportedForeignKeys(com.solarmetric.rd.kodo.impl.jdbc.schema.PrimaryKey pk)
          Find all foreign keys exported by a given primary key (all foreign keys that link to the primary key).
 com.solarmetric.rd.kodo.impl.jdbc.schema.Table findTable(java.lang.String name)
          Find the table with the given name in the group.
 com.solarmetric.rd.kodo.impl.jdbc.schema.Schema getSchema(java.lang.String name)
          Return the schema with the given name, or null if none.
 com.solarmetric.rd.kodo.impl.jdbc.schema.Schema[] getSchemas()
          Return all schemas.
 com.solarmetric.rd.kodo.impl.jdbc.schema.Schema importSchema(com.solarmetric.rd.kodo.impl.jdbc.schema.Schema schema)
          Import a schema from another 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.Index newIndex(java.lang.String name, com.solarmetric.rd.kodo.impl.jdbc.schema.Table table)
          Return a new index 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.Schema newSchema(java.lang.String name)
          Return a new schema with the given name.
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.
 boolean removeSchema(com.solarmetric.rd.kodo.impl.jdbc.schema.Schema schema)
          Remove the given schema from the group.
 void removeUnusedComponents()
          Remove unreferenced or emtpy components from the schema.
 
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

SchemaGroup

public SchemaGroup()
Method Detail

getSchemas

public com.solarmetric.rd.kodo.impl.jdbc.schema.Schema[] getSchemas()
Return all schemas.


getSchema

public com.solarmetric.rd.kodo.impl.jdbc.schema.Schema getSchema(java.lang.String name)
Return the schema with the given name, or null if none.


addSchema

public com.solarmetric.rd.kodo.impl.jdbc.schema.Schema addSchema()
Add a schema to the group.


addSchema

public com.solarmetric.rd.kodo.impl.jdbc.schema.Schema addSchema(java.lang.String name)
Add a schema to the group.


removeSchema

public boolean removeSchema(com.solarmetric.rd.kodo.impl.jdbc.schema.Schema schema)
Remove the given schema from the group.

Returns:
true if the schema was removed, false if not in the group

importSchema

public com.solarmetric.rd.kodo.impl.jdbc.schema.Schema importSchema(com.solarmetric.rd.kodo.impl.jdbc.schema.Schema schema)
Import a schema from another group. Foreign keys are not imported.


findTable

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


findExportedForeignKeys

public com.solarmetric.rd.kodo.impl.jdbc.schema.ForeignKey[] findExportedForeignKeys(com.solarmetric.rd.kodo.impl.jdbc.schema.PrimaryKey pk)
Find all foreign keys exported by a given primary key (all foreign keys that link to the primary key).


removeUnusedComponents

public void removeUnusedComponents()
Remove unreferenced or emtpy components from the schema.


clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

newSchema

protected com.solarmetric.rd.kodo.impl.jdbc.schema.Schema newSchema(java.lang.String name)
Return a new schema with the given name.


newTable

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.


newColumn

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.


newPrimaryKey

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.


newIndex

protected com.solarmetric.rd.kodo.impl.jdbc.schema.Index newIndex(java.lang.String name,
                                                                  com.solarmetric.rd.kodo.impl.jdbc.schema.Table table)
Return a new index with the given name and owner table.


newForeignKey

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.


SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool

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