Package mondrian.spi
Class DialectManager
java.lang.Object
mondrian.spi.DialectManager
Manages
Dialect
and DialectFactory
objects.- Since:
- Jan 13, 2009
- Author:
- jhyde
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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
Registers a Dialect class.static void
register
(DialectFactory factory) Registers a DialectFactory.
-
Method Details
-
register
Registers a DialectFactory.- Parameters:
factory
- Dialect factory
-
register
Registers a Dialect class.- Parameters:
dialectClass
- Dialect class
-
createDialect
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
-