2004.04.29


com.jdc.rdb
Class DatabaseType

java.lang.Object
  |
  +--com.jdc.lang.Object
        |
        +--com.jdc.lang.SerializableObject
              |
              +--com.jdc.rdb.DatabaseType
All Implemented Interfaces:
DatabaseType, Serializable

public class DatabaseType
extends SerializableObject
implements DatabaseType

The application database type. The DatabaseType class represents the type of application database in use. The current supported database types are:

Only the IBM DB2 database type is implemented in AbstractDatabase. The Oracle and MySQL database types will be implemented in a future release.

Version:
1.0
Author:
Jay Damon
See Also:
Serialized Form

Field Summary
static DatabaseType IBM_DB2
          Identifies an IBM DB2 database.
static String LOCAL
          A local database type.
static DatabaseType MY_SQL
          Identifies a MySQL database.
static DatabaseType ORACLE
          Identifies an Oracle database.
static String REMOTE
          A remote database type.
 
Fields inherited from class com.jdc.lang.Object
string
 
Method Summary
 boolean equals(Object object)
          Compares this database type to the specified object.
 String getDriverName(String type)
          Returns the appropriate Driver class name for a local or remote database type.
static DatabaseType getInstance(String name)
          Returns the DatabaseType for the specified database name.
 String getURL(String url, String port, String name)
          Returns a complete database Uniform Resource Locator (URL) String.
 String toString()
          Returns a String representing this database type.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

IBM_DB2

public static final DatabaseType IBM_DB2
Identifies an IBM DB2 database.


ORACLE

public static final DatabaseType ORACLE
Identifies an Oracle database.


MY_SQL

public static final DatabaseType MY_SQL
Identifies a MySQL database.


LOCAL

public static final String LOCAL
A local database type.

See Also:
Constant Field Values

REMOTE

public static final String REMOTE
A remote database type.

See Also:
Constant Field Values
Method Detail

equals

public boolean equals(Object object)
Compares this database type to the specified object. Returns true if a specified database type is equal to this type.

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

getDriverName

public String getDriverName(String type)
Returns the appropriate Driver class name for a local or remote database type.

Returns:
The appropriate Driver class name.

getInstance

public static DatabaseType getInstance(String name)
Returns the DatabaseType for the specified database name.

Returns:
The DatabaseType for the specified database name.

getURL

public String getURL(String url,
                     String port,
                     String name)
Returns a complete database Uniform Resource Locator (URL) String.

Returns:
A complete database Uniform Resource Locator (URL).

toString

public String toString()
Returns a String representing this database type.

Overrides:
toString in class Object
Returns:
A String representing this database type.

2004.04.29



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