2004.04.29


com.jdc.rdb
Class Schema

java.lang.Object
  |
  +--com.jdc.lang.Object
        |
        +--com.jdc.lang.SerializableObject
              |
              +--com.jdc.rdb.Schema
All Implemented Interfaces:
Schema, Serializable
Direct Known Subclasses:
Reference, User

public abstract class Schema
extends SerializableObject
implements Schema

A default implementation of Schema. All application database schema classes should subclass this database Schema class.

An application database Schema is defined by its database schema name and, optionally, an alias.

Note: This class is immutable.

Version:
1.5
Author:
Jay Damon
See Also:
Database, Table, Serialized Form

Field Summary
 
Fields inherited from class com.jdc.lang.Object
string
 
Constructor Summary
Schema(String name)
          Constructs a new AbstractSchema object for the specified database schema name.
Schema(String name, String alias)
          Constructs a new AbstractSchema object for the specified database schema name and alias.
 
Method Summary
 boolean equals(Object object)
          Compares this Schema object to the specified object.
 String getAlias()
          Returns the database schema alias.
abstract  Database getDatabase()
          Returns the Database object for this schema.
 String getName()
          Returns the database schema name.
 int hashCode()
          Returns a hash code value for this Schema object.
 String toString()
          Returns a String representing this Schema object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Schema

public Schema(String name)
Constructs a new AbstractSchema object for the specified database schema name. This schema will have no alias.


Schema

public Schema(String name,
              String alias)
Constructs a new AbstractSchema object for the specified database schema name and alias.

Method Detail

equals

public boolean equals(Object object)
Compares this Schema object to the specified object. Returns true if the specified object is equivalent to this schema object.

Overrides:
equals in class Object
Returns:
True if a specified object is equal to this schema object.
False if the specified object is not equal to this schema object.

See Also:
hashCode()

getAlias

public String getAlias()
Description copied from interface: Schema
Returns the database schema alias.

Specified by:
getAlias in interface Schema
Returns:
The database schema alias.

getDatabase

public abstract Database getDatabase()
Description copied from interface: Schema
Returns the Database object for this schema.

Specified by:
getDatabase in interface Schema
Returns:
The database object for this schema.

getName

public String getName()
Description copied from interface: Schema
Returns the database schema name.

Specified by:
getName in interface Schema
Returns:
The database schema name.

hashCode

public int hashCode()
Returns a hash code value for this Schema object. This method is supported for the benefit of hashtables such as those provided by Hashtable.

Overrides:
hashCode in class Object
Returns:
A hash code value for this schema object.

See Also:
equals(java.lang.Object)

toString

public String toString()
Returns a String representing this Schema object.

Overrides:
toString in class Object
Returns:
A String representing this Schema object.

2004.04.29



Copyright © 2004 J. Damon & Co.; All Rights Reserved WorldWide.