Package mondrian.spi
Class DialectManager
- java.lang.Object
-
- mondrian.spi.DialectManager
-
public abstract class DialectManager extends Object
ManagesDialect
andDialectFactory
objects.- Since:
- Jan 13, 2009
- Author:
- jhyde
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Dialect
createDialect(DataSource dataSource, Connection connection)
Creates a Dialect from a JDBC connection.static Dialect
createDialect(DataSource dataSource, Connection connection, String dialectClassName)
Creates a Dialect from a JDBC connection, optionally specifying the name of the dialect class.static void
register(Class<? extends Dialect> dialectClass)
Registers a Dialect class.static void
register(DialectFactory factory)
Registers a DialectFactory.
-
-
-
Method Detail
-
register
public static void register(DialectFactory factory)
Registers a DialectFactory.- Parameters:
factory
- Dialect factory
-
register
public static void register(Class<? extends Dialect> dialectClass)
Registers a Dialect class.- Parameters:
dialectClass
- Dialect class
-
createDialect
public static Dialect createDialect(DataSource dataSource, Connection connection)
Creates a Dialect from a JDBC connection.If the dialect cannot handle this connection, throws. Never returns null.
- Parameters:
dataSource
- Data sourceconnection
- JDBC connection- Returns:
- dialect for this connection
- Throws:
RuntimeException
- if underlying systems give an error, or if cannot create dialect
-
createDialect
public static Dialect createDialect(DataSource dataSource, Connection connection, String dialectClassName)
Creates a Dialect from a JDBC connection, optionally specifying the name of the dialect class.If the dialect cannot handle this connection, throws. Never returns null.
- Parameters:
dataSource
- Data sourceconnection
- JDBC connectiondialectClassName
- Name of class that implementsDialect
, or null- Returns:
- dialect for this connection
- Throws:
RuntimeException
- if underlying systems give an error, or if cannot create dialect
-
-