本文整理汇总了Java中mondrian.spi.DialectManager类的典型用法代码示例。如果您正苦于以下问题:Java DialectManager类的具体用法?Java DialectManager怎么用?Java DialectManager使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DialectManager类属于mondrian.spi包,在下文中一共展示了DialectManager类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: RolapEvaluatorRoot
import mondrian.spi.DialectManager; //导入依赖的package包/类
/**
* Creates a RolapEvaluatorRoot.
*
* @param query Query
*/
public RolapEvaluatorRoot(Query query) {
this.query = query;
this.cube = (RolapCube) query.getCube();
this.connection = (RolapConnection) query.getConnection();
this.schemaReader = query.getSchemaReader(true);
this.queryStartTime = new Date();
List<RolapMember> list = new ArrayList<RolapMember>();
for (Dimension dimension : cube.getDimensions()) {
list.add(
(RolapMember) schemaReader.getHierarchyDefaultMember(
dimension.getHierarchy()));
}
this.defaultMembers = list.toArray(new RolapMember[list.size()]);
this.currentDialect =
DialectManager.createDialect(schemaReader.getDataSource(), null);
}
示例2: initialize
import mondrian.spi.DialectManager; //导入依赖的package包/类
public void initialize() throws Exception {
if (this.initialize) {
return;
}
check();
if (this.connection == null) {
RolapUtil.loadDrivers(this.jdbcDriver);
if (this.userName == null) {
this.connection = DriverManager.getConnection(this.jdbcURL);
} else {
this.connection = DriverManager.getConnection(
this.jdbcURL, this.userName, this.password);
}
}
final DatabaseMetaData metaData = this.connection.getMetaData();
String productName = metaData.getDatabaseProductName();
String version = metaData.getDatabaseProductVersion();
LOGGER.info("Output connection is " + productName + ", " + version);
if (!metaData.supportsBatchUpdates()) {
this.batchSize = 1;
}
this.dialect = DialectManager.createDialect(null, this.connection);
this.initialize = true;
}
示例3: getFakeDialect
import mondrian.spi.DialectManager; //导入依赖的package包/类
/**
* Creates a dialect without using a connection.
*
* @return dialect of an Access persuasion
*/
public static Dialect getFakeDialect()
{
final DatabaseMetaData metaData =
(DatabaseMetaData) Proxy.newProxyInstance(
null,
new Class<?>[] {DatabaseMetaData.class},
new DelegatingInvocationHandler() {
public boolean supportsResultSetConcurrency(
int type, int concurrency)
{
return false;
}
public String getDatabaseProductName() {
return "Access";
}
public String getIdentifierQuoteString() {
return "\"";
}
public String getDatabaseProductVersion() {
return "1.0";
}
public boolean isReadOnly() {
return true;
}
}
);
final java.sql.Connection connection =
(java.sql.Connection) Proxy.newProxyInstance(
null,
new Class<?>[] {java.sql.Connection.class},
new DelegatingInvocationHandler() {
public DatabaseMetaData getMetaData() {
return metaData;
}
}
);
return DialectManager.createDialect(null, connection);
}
示例4: initialize
import mondrian.spi.DialectManager; //导入依赖的package包/类
public void initialize() throws Exception {
if (this.initialize) {
return;
}
check();
if (this.connection == null) {
RolapUtil.loadDrivers(this.jdbcDriver);
if (this.userName == null) {
this.connection = DriverManager.getConnection(this.jdbcURL);
} else {
this.connection = DriverManager.getConnection(
this.jdbcURL, this.userName, this.password);
}
}
final DatabaseMetaData metaData = this.connection.getMetaData();
String productName = metaData.getDatabaseProductName();
String version = metaData.getDatabaseProductVersion();
LOGGER.info("Output connection is " + productName + ", " + version);
this.dialect = DialectManager.createDialect(null, this.connection);
this.initialize = true;
}
示例5: newQuery
import mondrian.spi.DialectManager; //导入依赖的package包/类
public static SqlQuery newQuery(DataSource dataSource, String err) {
final Dialect dialect =
DialectManager.createDialect(dataSource, null);
return new SqlQuery(dialect);
}
示例6: getDialect
import mondrian.spi.DialectManager; //导入依赖的package包/类
protected Dialect getDialect() {
if (dialect == null) {
dialect = DialectManager.createDialect(getDataSource(), null);
}
return dialect;
}
示例7: getDialect
import mondrian.spi.DialectManager; //导入依赖的package包/类
public Dialect getDialect() {
return DialectManager.createDialect( null, connection );
}
示例8: getDialectInternal
import mondrian.spi.DialectManager; //导入依赖的package包/类
private Dialect getDialectInternal() {
DataSource dataSource = getConnection().getDataSource();
return DialectManager.createDialect(dataSource, null);
}