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


Java RolapStar.Table方法代码示例

本文整理汇总了Java中mondrian.rolap.RolapStar.Table方法的典型用法代码示例。如果您正苦于以下问题:Java RolapStar.Table方法的具体用法?Java RolapStar.Table怎么用?Java RolapStar.Table使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在mondrian.rolap.RolapStar的用法示例。


在下文中一共展示了RolapStar.Table方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: extraPredicates

import mondrian.rolap.RolapStar; //导入方法依赖的package包/类
/**
 * Adds predicates not associated with columns.
 *
 * @param sqlQuery Query
 */
protected void extraPredicates(SqlQuery sqlQuery) {
    List<StarPredicate> predicateList = getPredicateList();
    for (StarPredicate predicate : predicateList) {
        for (RolapStar.Column column
            : predicate.getConstrainedColumnList())
        {
            final RolapStar.Table table = column.getTable();
            table.addToFrom(sqlQuery, false, true);
        }
        StringBuilder buf = new StringBuilder();
        predicate.toSql(sqlQuery, buf);
        final String where = buf.toString();
        if (!where.equals("true")) {
            sqlQuery.addWhere(where);
        }
    }
}
 
开发者ID:Twixer,项目名称:mondrian-3.1.5,代码行数:23,代码来源:AbstractQuerySpec.java

示例2: lookupInChildren

import mondrian.rolap.RolapStar; //导入方法依赖的package包/类
protected RolapStar.Column lookupInChildren(
    final RolapStar.Table table,
    final String factColumnName)
{
    // This can happen if we are looking at a collapsed dimension
    // table, and the collapsed dimension in question in the
    // fact table is a snowflake (not just a star), so we
    // must look deeper...
    for (RolapStar.Table child : table.getChildren()) {
        RolapStar.Column rc = child.lookupColumn(factColumnName);
        if (rc != null) {
            return rc;
        } else {
            rc = lookupInChildren(child, factColumnName);
            if (rc != null) {
                return rc;
            }
        }
    }
    return null;
}
 
开发者ID:Twixer,项目名称:mondrian-3.1.5,代码行数:22,代码来源:Recognizer.java

示例3: MondrianSchema

import mondrian.rolap.RolapStar; //导入方法依赖的package包/类
public MondrianSchema(RolapConnection conn, RolapCube cube) {
  this.connection = conn;
  this.cube = cube;
  RolapStar star = cube.getStar();
  dialect = new MondrianDialect(star.getSqlQueryDialect());
  final RolapStar.Table factTable = star.getFactTable();
  final Locus locus =
      new Locus(
          new Execution(conn.getInternalStatement(),0),
          "MondrianSchema.init",
          "while loading the MondrianSchema into the Aggregation Designer.");
  Locus.push(locus);
  try {
      doTable(null, factTable);
      doCube(cube);
  } finally {
      Locus.pop(locus);
  }
}
 
开发者ID:pentaho,项目名称:pentaho-aggdesigner,代码行数:20,代码来源:MondrianSchema.java

示例4: getFactTable

import mondrian.rolap.RolapStar; //导入方法依赖的package包/类
protected RolapStar.Table getFactTable() {
    return star.getFactTable();
}
 
开发者ID:OSBI,项目名称:mondrian,代码行数:4,代码来源:AggGen.java

示例5: getTable

import mondrian.rolap.RolapStar; //导入方法依赖的package包/类
protected JdbcSchema.Table getTable(JdbcSchema db, RolapStar.Table rt) {
    JdbcSchema.Table jt = getTable(db, rt.getAlias());
    return (jt == null)
        ? getTable(db, rt.getTableName())
        : jt;
}
 
开发者ID:OSBI,项目名称:mondrian,代码行数:7,代码来源:AggGen.java

示例6: nonDistinctGenerateSql

import mondrian.rolap.RolapStar; //导入方法依赖的package包/类
protected void nonDistinctGenerateSql(SqlQuery sqlQuery)
{
    // add constraining dimensions
    RolapStar.Column[] columns = getColumns();
    int arity = columns.length;
    if (countOnly) {
        sqlQuery.addSelect("count(*)");
    }
    for (int i = 0; i < arity; i++) {
        RolapStar.Column column = columns[i];
        RolapStar.Table table = column.getTable();
        if (table.isFunky()) {
            // this is a funky dimension -- ignore for now
            continue;
        }
        table.addToFrom(sqlQuery, false, true);

        String expr = column.generateExprString(sqlQuery);

        StarColumnPredicate predicate = getColumnPredicate(i);
        final String where = RolapStar.Column.createInExpr(
            expr,
            predicate,
            column.getDatatype(),
            sqlQuery);
        if (!where.equals("true")) {
            sqlQuery.addWhere(where);
        }

        if (countOnly) {
            continue;
        }

        // some DB2 (AS400) versions throw an error, if a column alias is
        // there and *not* used in a subsequent order by/group by
        final Dialect dialect = sqlQuery.getDialect();
        final String alias;
        final Dialect.DatabaseProduct databaseProduct =
            dialect.getDatabaseProduct();
        if (databaseProduct == Dialect.DatabaseProduct.DB2_AS400) {
            alias = sqlQuery.addSelect(expr, null);
        } else {
            alias = sqlQuery.addSelect(expr, getColumnAlias(i));
        }

        if (isAggregate()) {
            sqlQuery.addGroupBy(expr, alias);
        }

        // Add ORDER BY clause to make the results deterministic.
        // Derby has a bug with ORDER BY, so ignore it.
        if (isOrdered()) {
            sqlQuery.addOrderBy(expr, true, false, false);
        }
    }

    // Add compound member predicates
    extraPredicates(sqlQuery);

    // add measures
    if (!countOnly) {
        for (int i = 0, count = getMeasureCount(); i < count; i++) {
            addMeasure(i, sqlQuery);
        }
    }
}
 
开发者ID:Twixer,项目名称:mondrian-3.1.5,代码行数:67,代码来源:AbstractQuerySpec.java

示例7: MondrianTable

import mondrian.rolap.RolapStar; //导入方法依赖的package包/类
public MondrianTable(MondrianTable parent, RolapStar.Table table) {
    this.parent = parent;
    this.table = table;
}
 
开发者ID:pentaho,项目名称:pentaho-aggdesigner,代码行数:5,代码来源:MondrianTable.java

示例8: getStarTable

import mondrian.rolap.RolapStar; //导入方法依赖的package包/类
public RolapStar.Table getStarTable() {
    return table;
}
 
开发者ID:pentaho,项目名称:pentaho-aggdesigner,代码行数:4,代码来源:MondrianTable.java


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