mondrian.rolap.agg
Class DrillThroughQuerySpec

java.lang.Object
  extended by mondrian.rolap.agg.AbstractQuerySpec
      extended by mondrian.rolap.agg.DrillThroughQuerySpec
All Implemented Interfaces:
QuerySpec

 class DrillThroughQuerySpec
extends AbstractQuerySpec

Provides the information necessary to generate SQL for a drill-through request.

Author:
jhyde, Richard M. Emberson

Field Summary
 
Fields inherited from class mondrian.rolap.agg.AbstractQuerySpec
countOnly
 
Constructor Summary
DrillThroughQuerySpec(DrillThroughCellRequest request, StarPredicate starPredicateSlicer, boolean countOnly)
           
 
Method Summary
protected  void addMeasure(int i, SqlQuery sqlQuery)
          Adds a measure to a query.
 Pair<String,List<SqlStatement.Type>> generateSqlQuery()
           
 String getColumnAlias(int i)
           
 StarColumnPredicate getColumnPredicate(int i)
          Returns the predicate on the ith column.
 RolapStar.Column[] getColumns()
           
 RolapStar.Measure getMeasure(int i)
           
 String getMeasureAlias(int i)
           
 int getMeasureCount()
           
protected  List<StarPredicate> getPredicateList()
          Returns a list of predicates not associated with a particular column.
protected  boolean isAggregate()
           
protected  boolean isOrdered()
          Whether to add an ORDER BY clause to make results deterministic.
protected  boolean isPartOfSelect(RolapStar.Column col)
          Allows subclasses to specify if a given column must be returned as part of the result set, in the select clause.
protected  boolean isPartOfSelect(RolapStar.Measure measure)
          Allows subclasses to specify if a given column must be returned as part of the result set, in the select clause.
 
Methods inherited from class mondrian.rolap.agg.AbstractQuerySpec
addGroupingFunction, addGroupingSets, distinctGenerateSql, extraPredicates, getDistinctMeasureCount, getStar, newSqlQuery, nonDistinctGenerateSql
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DrillThroughQuerySpec

public DrillThroughQuerySpec(DrillThroughCellRequest request,
                             StarPredicate starPredicateSlicer,
                             boolean countOnly)
Method Detail

isPartOfSelect

protected boolean isPartOfSelect(RolapStar.Column col)
Description copied from class: AbstractQuerySpec
Allows subclasses to specify if a given column must be returned as part of the result set, in the select clause.

Overrides:
isPartOfSelect in class AbstractQuerySpec

isPartOfSelect

protected boolean isPartOfSelect(RolapStar.Measure measure)
Description copied from class: AbstractQuerySpec
Allows subclasses to specify if a given column must be returned as part of the result set, in the select clause.

Overrides:
isPartOfSelect in class AbstractQuerySpec

getMeasureCount

public int getMeasureCount()

getMeasure

public RolapStar.Measure getMeasure(int i)

getMeasureAlias

public String getMeasureAlias(int i)

getColumns

public RolapStar.Column[] getColumns()

getColumnAlias

public String getColumnAlias(int i)

getColumnPredicate

public StarColumnPredicate getColumnPredicate(int i)
Description copied from interface: QuerySpec
Returns the predicate on the ith column.

If the column is unconstrained, returns LiteralStarPredicate(true).

Parameters:
i - Column ordinal
Returns:
Constraint on column

generateSqlQuery

public Pair<String,List<SqlStatement.Type>> generateSqlQuery()
Specified by:
generateSqlQuery in interface QuerySpec
Overrides:
generateSqlQuery in class AbstractQuerySpec

addMeasure

protected void addMeasure(int i,
                          SqlQuery sqlQuery)
Description copied from class: AbstractQuerySpec
Adds a measure to a query.

Overrides:
addMeasure in class AbstractQuerySpec
Parameters:
i - Ordinal of measure
sqlQuery - Query object

isAggregate

protected boolean isAggregate()
Specified by:
isAggregate in class AbstractQuerySpec

isOrdered

protected boolean isOrdered()
Description copied from class: AbstractQuerySpec
Whether to add an ORDER BY clause to make results deterministic. Necessary if query returns more than one row and results are for human consumption.

Overrides:
isOrdered in class AbstractQuerySpec
Returns:
whether to sort query

getPredicateList

protected List<StarPredicate> getPredicateList()
Description copied from class: AbstractQuerySpec
Returns a list of predicates not associated with a particular column.

Overrides:
getPredicateList in class AbstractQuerySpec
Returns:
list of non-column predicates

Get Mondrian at SourceForge.net. Fast, secure and free Open Source software downloads