|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object mondrian.rolap.agg.AbstractQuerySpec
public abstract class AbstractQuerySpec
Base class for QuerySpec
implementations.
Field Summary | |
---|---|
protected boolean |
countOnly
|
Constructor Summary | |
---|---|
protected |
AbstractQuerySpec(RolapStar star,
boolean countOnly)
Creates an AbstractQuerySpec. |
Method Summary | |
---|---|
protected void |
addGroupingFunction(SqlQuery sqlQuery)
|
protected void |
addGroupingSets(SqlQuery sqlQuery)
|
protected void |
addMeasure(int i,
SqlQuery sqlQuery)
Adds a measure to a query. |
protected void |
distinctGenerateSql(SqlQuery outerSqlQuery,
boolean countOnly)
Generates a SQL query to retrieve the values in this segment using an algorithm which converts distinct-aggregates to non-distinct aggregates over subqueries. |
protected void |
extraPredicates(SqlQuery sqlQuery)
Adds predicates not associated with columns. |
String |
generateSqlQuery()
|
protected int |
getDistinctMeasureCount()
Returns the number of measures whose aggregation function is distinct-count. |
protected List<StarPredicate> |
getPredicateList()
Returns a list of predicates not associated with a particular column. |
RolapStar |
getStar()
|
protected abstract boolean |
isAggregate()
|
protected boolean |
isOrdered()
Whether to add an ORDER BY clause to make results deterministic. |
protected SqlQuery |
newSqlQuery()
Creates a query object. |
protected void |
nonDistinctGenerateSql(SqlQuery sqlQuery)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface mondrian.rolap.agg.QuerySpec |
---|
getColumnAlias, getColumnPredicate, getColumns, getMeasure, getMeasureAlias, getMeasureCount |
Field Detail |
---|
protected final boolean countOnly
Constructor Detail |
---|
protected AbstractQuerySpec(RolapStar star, boolean countOnly)
star
- Star which defines columns of interest and their
relationshipscountOnly
- If true, generate no GROUP BY clause, so the query
returns a single row containing a grand totalMethod Detail |
---|
protected SqlQuery newSqlQuery()
public RolapStar getStar()
getStar
in interface QuerySpec
protected void addMeasure(int i, SqlQuery sqlQuery)
i
- Ordinal of measuresqlQuery
- Query objectprotected abstract boolean isAggregate()
protected void nonDistinctGenerateSql(SqlQuery sqlQuery)
protected boolean isOrdered()
public String generateSqlQuery()
generateSqlQuery
in interface QuerySpec
protected void addGroupingFunction(SqlQuery sqlQuery)
protected void addGroupingSets(SqlQuery sqlQuery)
protected int getDistinctMeasureCount()
protected void distinctGenerateSql(SqlQuery outerSqlQuery, boolean countOnly)
outerSqlQuery
- Query to modifycountOnly
- If true, only generate a single row: no need to
generate a GROUP BY clause or put any constraining columns in the
SELECT clauseprotected void extraPredicates(SqlQuery sqlQuery)
sqlQuery
- Queryprotected List<StarPredicate> getPredicateList()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |