org.lexevs.dao.database.type
Enum DatabaseType

java.lang.Object
  extended by java.lang.Enum<DatabaseType>
      extended by org.lexevs.dao.database.type.DatabaseType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<DatabaseType>

public enum DatabaseType
extends java.lang.Enum<DatabaseType>

The Enum DatabaseType.

Author:
Kevin Peterson

Enum Constant Summary
DB2
          The D b2.
HSQL
          The HSQL.
MYSQL
          The MYSQL.
ORACLE
          The ORACLE.
POSTGRES
          The POSTGRES.
 
Method Summary
 java.lang.String[] getAliases()
           
static DatabaseType getDatabaseType(javax.sql.DataSource dataSource)
          Gets the database type.
 java.lang.String getProductName()
          Gets the product name.
static DatabaseType toDatabaseType(java.lang.String databaseType)
           
static DatabaseType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static DatabaseType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

DB2

public static final DatabaseType DB2
The D b2.


HSQL

public static final DatabaseType HSQL
The HSQL.


MYSQL

public static final DatabaseType MYSQL
The MYSQL.


ORACLE

public static final DatabaseType ORACLE
The ORACLE.


POSTGRES

public static final DatabaseType POSTGRES
The POSTGRES.

Method Detail

values

public static DatabaseType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (DatabaseType c : DatabaseType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static DatabaseType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

toDatabaseType

public static DatabaseType toDatabaseType(java.lang.String databaseType)

getProductName

public java.lang.String getProductName()
Gets the product name.

Returns:
the product name

getAliases

public java.lang.String[] getAliases()

getDatabaseType

public static DatabaseType getDatabaseType(javax.sql.DataSource dataSource)
                                    throws LBResourceUnavailableException
Gets the database type.

Parameters:
dataSource - the data source
Returns:
the database type
Throws:
LBResourceUnavailableException - the LB resource unavailable exception

Copyright: (c) 2004-2006 Mayo Foundation for Medical Education and Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the triple-shield Mayo logo are trademarks and service marks of MFMER.