本文整理汇总了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;
}
示例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);
}
示例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));
}
示例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;
}
示例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));
}
示例6: addDrillThroughMeasure
import mondrian.rolap.RolapStar; //导入方法依赖的package包/类
public void addDrillThroughMeasure(RolapStar.Measure measure) {
this.drillThroughMeasures.add(measure);
}
示例7: getDrillThroughMeasures
import mondrian.rolap.RolapStar; //导入方法依赖的package包/类
public List<RolapStar.Measure> getDrillThroughMeasures() {
return Collections.unmodifiableList(drillThroughMeasures);
}
示例8: getMeasure
import mondrian.rolap.RolapStar; //导入方法依赖的package包/类
public RolapStar.Measure getMeasure(final int i) {
return segments[i].measure;
}
示例9: getMeasure
import mondrian.rolap.RolapStar; //导入方法依赖的package包/类
public RolapStar.Measure getMeasure(final int i) {
Util.assertTrue(i == 0);
return request.getMeasure();
}
示例10: MondrianMeasure
import mondrian.rolap.RolapStar; //导入方法依赖的package包/类
public MondrianMeasure(MondrianTable table, RolapStar.Measure measure) {
this.table = table;
this.measure = measure;
}
示例11: getRolapStarMeasure
import mondrian.rolap.RolapStar; //导入方法依赖的package包/类
public RolapStar.Measure getRolapStarMeasure() {
return measure;
}
示例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;
}
示例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);
}
示例14: getMeasure
import mondrian.rolap.RolapStar; //导入方法依赖的package包/类
RolapStar.Measure getMeasure(int i);