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


Java RolapStar.Measure方法代码示例

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


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

示例1: DrillThroughCellRequest

import mondrian.rolap.RolapStar; //导入方法依赖的package包/类
public DrillThroughCellRequest(
    RolapStar.Measure measure,
    boolean extendedContext, List<OlapElement> nonApplicableFields)
{
    super(measure, extendedContext, true);
    this.nonApplicableMembers = nonApplicableFields;
}
 
开发者ID:OSBI,项目名称:mondrian,代码行数:8,代码来源:DrillThroughCellRequest.java

示例2: includeInSelect

import mondrian.rolap.RolapStar; //导入方法依赖的package包/类
public boolean includeInSelect(RolapStar.Measure measure) {
    if (drillThroughColumns.size() == 0
        && drillThroughMeasures.size() == 0)
    {
        return true;
    }
    return drillThroughMeasures.contains(measure);
}
 
开发者ID:OSBI,项目名称:mondrian,代码行数:9,代码来源:DrillThroughCellRequest.java

示例3: addMeasure

import mondrian.rolap.RolapStar; //导入方法依赖的package包/类
/**
 * Adds a measure to a query.
 *
 * @param i Ordinal of measure
 * @param sqlQuery Query object
 */
protected void addMeasure(final int i, final SqlQuery sqlQuery) {
    RolapStar.Measure measure = getMeasure(i);
    Util.assertTrue(measure.getTable() == getStar().getFactTable());
    measure.getTable().addToFrom(sqlQuery, false, true);

    String exprInner =
        measure.getExpression() == null
            ? "*"
            : measure.generateExprString(sqlQuery);
    String exprOuter = measure.getAggregator().getExpression(exprInner);
    sqlQuery.addSelect(exprOuter, getMeasureAlias(i));
}
 
开发者ID:Twixer,项目名称:mondrian-3.1.5,代码行数:19,代码来源:AbstractQuerySpec.java

示例4: getDistinctMeasureCount

import mondrian.rolap.RolapStar; //导入方法依赖的package包/类
/**
 * Returns the number of measures whose aggregation function is
 * distinct-count.
 *
 * @return Number of distinct-count measures
 */
protected int getDistinctMeasureCount() {
    int k = 0;
    for (int i = 0, count = getMeasureCount(); i < count; i++) {
        RolapStar.Measure measure = getMeasure(i);
        if (measure.getAggregator().isDistinct()) {
            ++k;
        }
    }
    return k;
}
 
开发者ID:Twixer,项目名称:mondrian-3.1.5,代码行数:17,代码来源:AbstractQuerySpec.java

示例5: addMeasure

import mondrian.rolap.RolapStar; //导入方法依赖的package包/类
protected void addMeasure(final int i, final SqlQuery sqlQuery) {
    RolapStar.Measure measure = getMeasure(i);

    Util.assertTrue(measure.getTable() == getStar().getFactTable());
    measure.getTable().addToFrom(sqlQuery, false, true);

    String expr = measure.generateExprString(sqlQuery);
    sqlQuery.addSelect(expr, getMeasureAlias(i));
}
 
开发者ID:Twixer,项目名称:mondrian-3.1.5,代码行数:10,代码来源:DrillThroughQuerySpec.java

示例6: addDrillThroughMeasure

import mondrian.rolap.RolapStar; //导入方法依赖的package包/类
public void addDrillThroughMeasure(RolapStar.Measure measure) {
    this.drillThroughMeasures.add(measure);
}
 
开发者ID:OSBI,项目名称:mondrian,代码行数:4,代码来源:DrillThroughCellRequest.java

示例7: getDrillThroughMeasures

import mondrian.rolap.RolapStar; //导入方法依赖的package包/类
public List<RolapStar.Measure> getDrillThroughMeasures() {
    return Collections.unmodifiableList(drillThroughMeasures);
}
 
开发者ID:OSBI,项目名称:mondrian,代码行数:4,代码来源:DrillThroughCellRequest.java

示例8: getMeasure

import mondrian.rolap.RolapStar; //导入方法依赖的package包/类
public RolapStar.Measure getMeasure(final int i) {
    return segments[i].measure;
}
 
开发者ID:Twixer,项目名称:mondrian-3.1.5,代码行数:4,代码来源:SegmentArrayQuerySpec.java

示例9: getMeasure

import mondrian.rolap.RolapStar; //导入方法依赖的package包/类
public RolapStar.Measure getMeasure(final int i) {
    Util.assertTrue(i == 0);
    return request.getMeasure();
}
 
开发者ID:Twixer,项目名称:mondrian-3.1.5,代码行数:5,代码来源:DrillThroughQuerySpec.java

示例10: MondrianMeasure

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

示例11: getRolapStarMeasure

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

示例12: generateMondrianDef

import mondrian.rolap.RolapStar; //导入方法依赖的package包/类
private MondrianDef.AggName generateMondrianDef(Schema schema, Output output) {
    
    AggregateTableOutput tableOutput = (AggregateTableOutput)output;

    MondrianDef.AggName aggName = new MondrianDef.AggName();
    aggName.name = tableOutput.getTableName();
            
    List<MondrianDef.AggMeasure> measures = new ArrayList<MondrianDef.AggMeasure>();
    List<MondrianDef.AggLevel> levels = new ArrayList<MondrianDef.AggLevel>();
    
    int i = -1;
    
    for (AggregateTableOutput.ColumnOutput column : tableOutput.getColumnOutputs()) {
        ++i;
        String columnName = column.getName();
        Attribute attribute = column.getAttribute();
        if (attribute instanceof Measure) {
            Measure measure = (Measure)attribute;
            RolapStar.Measure rolapStarMeasure = ((MondrianMeasure)measure).getRolapStarMeasure();

            if (rolapStarMeasure.getName().equals("fact_count")) {
                // add as fact count
                MondrianDef.AggFactCount aggFactCount = new MondrianDef.AggFactCount();
                aggFactCount.column = columnName;
                aggName.factcount = aggFactCount;
            } else {
                // add as regular measure
                RolapMeasure rolapMeasure = findRolapMeasure(schema, measure);
                MondrianDef.AggMeasure measureDef = new MondrianDef.AggMeasure();
                measureDef.name = rolapMeasure.getUniqueName();
                measureDef.column = columnName;
                measures.add(measureDef);
            }
            
        } else {
            Level level = findLevel(schema, attribute);
            RolapCubeLevel rolapLevel = ((MondrianLevel)level).getRolapCubeLevel();
            
            MondrianDef.AggLevel levelDef = new MondrianDef.AggLevel();
            levelDef.name = rolapLevel.getUniqueName();
            levelDef.column = columnName;
            levels.add(levelDef);
        }
    }
    
    aggName.levels = (MondrianDef.AggLevel[])levels.toArray(new MondrianDef.AggLevel[0]);
    aggName.measures = (MondrianDef.AggMeasure[])measures.toArray(new MondrianDef.AggMeasure[0]);
    
    return aggName;
}
 
开发者ID:pentaho,项目名称:pentaho-aggdesigner,代码行数:51,代码来源:MondrianSchemaGenerator.java

示例13: createMeasure

import mondrian.rolap.RolapStar; //导入方法依赖的package包/类
/**
 * createMeasure is protected so that extenders of MondrianSchema may modify
 * certain characteristics of the measure class, such as getDataType(), etc
 * 
 * @param table
 *          mondrian table parent
 * @param column
 *          mondrian column
 * @param distinctValueCount
 *          number of values in the attribute
 * @return
 */
protected MondrianMeasure createMeasure(MondrianTable table, RolapStar.Measure measure) {
  return new MondrianMeasure(table, measure);
}
 
开发者ID:pentaho,项目名称:pentaho-aggdesigner,代码行数:16,代码来源:MondrianSchema.java

示例14: getMeasure

import mondrian.rolap.RolapStar; //导入方法依赖的package包/类
RolapStar.Measure getMeasure(int i); 
开发者ID:Twixer,项目名称:mondrian-3.1.5,代码行数:2,代码来源:QuerySpec.java


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