org.apache.ws.jaxme.sqls.impl

Class SchemaImpl

Implemented Interfaces:
Schema
Known Direct Subclasses:
DB2SchemaImpl, HsqlDbSchemaImpl

public class SchemaImpl
extends java.lang.Object
implements Schema

Implementation of a schema.
Author:
Jochen Wiedmann

Nested Class Summary

static class
SchemaImpl.NameImpl

Constructor Summary

SchemaImpl(SQLFactory pFactory, Schema.Name pName)
Creates a new instance of SchemaImpl.

Method Summary

boolean
equals(Object o)
Schema.Name
getName()
Returns the schema name.
SQLFactory
getSQLFactory()
Returns the SQLFactory that created this instance of Schema.
Table
getTable(String pName)
Returns the table with the given name or null, if no such table exists in the schema.
Table
getTable(Table.Name pName)
Returns the table with the given name or null, if no such table exists in the schema.
Iterator
getTables()
Returns an Iterator to all tables in the schema.
int
hashCode()
Table
newTable(String pName)
Creates a new table with the given name in the schema.
Table
newTable(Table.Name pName)
Creates a new table with the given name in the schema.

Constructor Details

SchemaImpl

protected SchemaImpl(SQLFactory pFactory,
                     Schema.Name pName)
Creates a new instance of SchemaImpl.
Parameters:
pFactory - The SQLFactory creating this instance.
pName - The schema name.

Method Details

equals

public boolean equals(Object o)

getName

public Schema.Name getName()
Returns the schema name.
Specified by:
getName in interface Schema

getSQLFactory

public SQLFactory getSQLFactory()
Returns the SQLFactory that created this instance of Schema.
Specified by:
getSQLFactory in interface Schema

getTable

public Table getTable(String pName)
Returns the table with the given name or null, if no such table exists in the schema.
Specified by:
getTable in interface Schema

getTable

public Table getTable(Table.Name pName)
Returns the table with the given name or null, if no such table exists in the schema.
Specified by:
getTable in interface Schema

getTables

public Iterator getTables()
Returns an Iterator to all tables in the schema.
Specified by:
getTables in interface Schema

hashCode

public int hashCode()

newTable

public Table newTable(String pName)
Creates a new table with the given name in the schema.
Specified by:
newTable in interface Schema

newTable

public Table newTable(Table.Name pName)
Creates a new table with the given name in the schema.
Specified by:
newTable in interface Schema