SolarMetric Kodo JDO 3.2.4 generated on January 7 2005

kodo.jdbc.schema
Class Schema

java.lang.Object
  |
  +--kodo.jdbc.schema.Schema
All Implemented Interfaces:
Comparable

public class Schema
extends Object
implements Comparable

Represents a database schema.


Constructor Summary
Schema()
          Default constructor.
Schema(String name, SchemaGroup group)
          Constructor.
 
Method Summary
 Table addTable(String name)
          Add a table to the schema.
 int compareTo(Object other)
           
 String getName()
          Return the name of the schema, or null if none.
 SchemaGroup getSchemaGroup()
          Return the schema's group.
 Table getTable(String name)
          Return the table with the given name, or null if none.
 Table[] getTables()
          Return the schema's tables.
 Table importTable(Table table)
          Import a table from another schema.
 boolean removeTable(Table tab)
          Remove the given table from the schema.
 void setName(String name)
          Set the name of the schema.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Schema

public Schema()
Default constructor.

Schema

public Schema(String name,
              SchemaGroup group)
Constructor.
Parameters:
name - the schema name, if any
group - the schema's owning group
Method Detail

getSchemaGroup

public SchemaGroup getSchemaGroup()
Return the schema's group.

getName

public String getName()
Return the name of the schema, or null if none.

setName

public void setName(String name)
Set the name of the schema. This method can only be used for schemas not attached to a group.

getTables

public Table[] getTables()
Return the schema's tables.

getTable

public Table getTable(String name)
Return the table with the given name, or null if none.

addTable

public Table addTable(String name)
Add a table to the schema.

removeTable

public boolean removeTable(Table tab)
Remove the given table from the schema.
Returns:
true if the table was removed, false if not in the schema

importTable

public Table importTable(Table table)
Import a table from another schema. Note that this method does not import foreign keys or indexes.

compareTo

public int compareTo(Object other)
Specified by:
compareTo in interface Comparable

toString

public String toString()
Overrides:
toString in class Object

SolarMetric Kodo JDO 3.2.4 generated on January 7 2005

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