当前位置: 首页>>代码示例>>Java>>正文


Java DialectManager类代码示例

本文整理汇总了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);
}
 
开发者ID:Twixer,项目名称:mondrian-3.1.5,代码行数:22,代码来源:RolapEvaluatorRoot.java

示例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;
}
 
开发者ID:OSBI,项目名称:mondrian,代码行数:30,代码来源:DBLoader.java

示例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);
}
 
开发者ID:Twixer,项目名称:mondrian-3.1.5,代码行数:44,代码来源:TestContext.java

示例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;
}
 
开发者ID:Twixer,项目名称:mondrian-3.1.5,代码行数:28,代码来源:DBLoader.java

示例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);
}
 
开发者ID:OSBI,项目名称:mondrian,代码行数:6,代码来源:SqlQuery.java

示例6: getDialect

import mondrian.spi.DialectManager; //导入依赖的package包/类
protected Dialect getDialect() {
    if (dialect == null) {
        dialect = DialectManager.createDialect(getDataSource(), null);
    }
    return dialect;
}
 
开发者ID:OSBI,项目名称:mondrian,代码行数:7,代码来源:DialectTest.java

示例7: getDialect

import mondrian.spi.DialectManager; //导入依赖的package包/类
public Dialect getDialect() {
  return DialectManager.createDialect( null, connection );
}
 
开发者ID:pentaho,项目名称:mondrian-tck,代码行数:4,代码来源:SqlContext.java

示例8: getDialectInternal

import mondrian.spi.DialectManager; //导入依赖的package包/类
private Dialect getDialectInternal() {
    DataSource dataSource = getConnection().getDataSource();
    return DialectManager.createDialect(dataSource, null);
}
 
开发者ID:Twixer,项目名称:mondrian-3.1.5,代码行数:5,代码来源:TestContext.java


注:本文中的mondrian.spi.DialectManager类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。