mondrian.spi
Enum Dialect.DatabaseProduct

java.lang.Object
  extended by java.lang.Enum<Dialect.DatabaseProduct>
      extended by mondrian.spi.Dialect.DatabaseProduct
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Dialect.DatabaseProduct>
Enclosing interface:
Dialect

public static enum Dialect.DatabaseProduct
extends java.lang.Enum<Dialect.DatabaseProduct>

Enumeration of common database types.

Branching on this enumeration allows you to write code which behaves differently for different databases. However, since the capabilities of a database can change between versions, it is recommended that conditional code is in terms of capabilities methods in Dialect.

Because there are so many differences between various versions and ports of DB2, we represent them as 3 separate products. If you want to treat them all as one product, note that the getFamily() method for DB2_AS400 and DB2_OLD_AS400 returns DB2.


Enum Constant Summary
ACCESS
           
DB2
           
DB2_AS400
           
DB2_OLD_AS400
           
DERBY
           
FIREBIRD
           
HSQLDB
           
INFOBRIGHT
           
INFORMIX
           
INGRES
           
INTERBASE
           
LUCIDDB
           
MSSQL
           
MYSQL
           
NEOVIEW
           
NETEZZA
           
ORACLE
           
POSTGRESQL
           
SQLSTREAM
           
SYBASE
           
TERADATA
           
UNKNOWN
           
VERTICA
           
 
Method Summary
 Dialect.DatabaseProduct getFamily()
          Return the root of the family of products this database product belongs to.
static Dialect.DatabaseProduct valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Dialect.DatabaseProduct[] 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

ACCESS

public static final Dialect.DatabaseProduct ACCESS

UNKNOWN

public static final Dialect.DatabaseProduct UNKNOWN

DERBY

public static final Dialect.DatabaseProduct DERBY

DB2_OLD_AS400

public static final Dialect.DatabaseProduct DB2_OLD_AS400

DB2_AS400

public static final Dialect.DatabaseProduct DB2_AS400

DB2

public static final Dialect.DatabaseProduct DB2

FIREBIRD

public static final Dialect.DatabaseProduct FIREBIRD

HSQLDB

public static final Dialect.DatabaseProduct HSQLDB

INFORMIX

public static final Dialect.DatabaseProduct INFORMIX

INFOBRIGHT

public static final Dialect.DatabaseProduct INFOBRIGHT

INGRES

public static final Dialect.DatabaseProduct INGRES

INTERBASE

public static final Dialect.DatabaseProduct INTERBASE

LUCIDDB

public static final Dialect.DatabaseProduct LUCIDDB

MSSQL

public static final Dialect.DatabaseProduct MSSQL

NETEZZA

public static final Dialect.DatabaseProduct NETEZZA

NEOVIEW

public static final Dialect.DatabaseProduct NEOVIEW

ORACLE

public static final Dialect.DatabaseProduct ORACLE

POSTGRESQL

public static final Dialect.DatabaseProduct POSTGRESQL

MYSQL

public static final Dialect.DatabaseProduct MYSQL

SQLSTREAM

public static final Dialect.DatabaseProduct SQLSTREAM

SYBASE

public static final Dialect.DatabaseProduct SYBASE

TERADATA

public static final Dialect.DatabaseProduct TERADATA

VERTICA

public static final Dialect.DatabaseProduct VERTICA
Method Detail

values

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

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

valueOf

public static Dialect.DatabaseProduct 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

getFamily

public Dialect.DatabaseProduct getFamily()
Return the root of the family of products this database product belongs to.

For DB2_AS400 and DB2_OLD_AS400 returns DB2; for all other database products, returns the same product.

Returns:
root of family of database products

Get Mondrian at SourceForge.net. Fast, secure and free Open Source software downloads