ccc.cli
Enum DatabaseVendor

java.lang.Object
  extended by java.lang.Enum<DatabaseVendor>
      extended by ccc.cli.DatabaseVendor
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<DatabaseVendor>

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

An enumeration of the supported database vendors.

Author:
Civic Computing Ltd.

Enum Constant Summary
H2
          H2 DB vendor.
MYSQL
          MySQL DB vendor.
ORACLE
          Oracle DB vendor.
SQLSERVER
          SqlServer DB vendor.
 
Method Summary
abstract  java.lang.String driverClassName()
          Accessor.
static DatabaseVendor forConnectionString(java.lang.String conString)
          Determine the driver class based on connection string.
static DatabaseVendor valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static DatabaseVendor[] 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

ORACLE

public static final DatabaseVendor ORACLE
Oracle DB vendor.


H2

public static final DatabaseVendor H2
H2 DB vendor.


MYSQL

public static final DatabaseVendor MYSQL
MySQL DB vendor.


SQLSERVER

public static final DatabaseVendor SQLSERVER
SqlServer DB vendor.

Method Detail

values

public static DatabaseVendor[] 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 (DatabaseVendor c : DatabaseVendor.values())
    System.out.println(c);

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

valueOf

public static DatabaseVendor 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

driverClassName

public abstract java.lang.String driverClassName()
Accessor.

Returns:
The DB vendor's driver class name.

forConnectionString

public static DatabaseVendor forConnectionString(java.lang.String conString)
Determine the driver class based on connection string.

Parameters:
conString - The connection string.
Returns:
The corresponding driver class.


Copyright © 2010. All Rights Reserved.