mondrian.rolap
Class RolapNativeSet.SetConstraint

java.lang.Object
  extended by mondrian.rolap.SqlContextConstraint
      extended by mondrian.rolap.RolapNativeSet.SetConstraint
All Implemented Interfaces:
MemberChildrenConstraint, SqlConstraint, TupleConstraint
Direct Known Subclasses:
RolapNativeCrossJoin.NonEmptyCrossJoinConstraint, RolapNativeFilter.FilterConstraint, RolapNativeTopCount.TopCountConstraint
Enclosing class:
RolapNativeSet

protected abstract static class RolapNativeSet.SetConstraint
extends SqlContextConstraint

Constraint for non empty {crossjoin, member.children, member.descendants, level.members}

 

Field Summary
(package private)  RolapNativeSet.CrossJoinArg[] args
           
 
Fields inherited from class mondrian.rolap.SqlContextConstraint
cacheKey
 
Constructor Summary
RolapNativeSet.SetConstraint(RolapNativeSet.CrossJoinArg[] args, RolapEvaluator evaluator, boolean strict)
           
 
Method Summary
 void addConstraint(SqlQuery sqlQuery, RolapCube baseCube)
          Called from LevelMembers: restricts the SQL resultset to the current context.
 Object getCacheKey()
          returns a key to cache the result
 MemberChildrenConstraint getMemberChildrenConstraint(RolapMember parent)
          Returns null to prevent the member/childern from being cached.
protected  boolean isJoinRequired()
          if there is a crossjoin, we need to join the fact table - even if the evalutaor context is empty.
 
Methods inherited from class mondrian.rolap.SqlContextConstraint
addLevelConstraint, addMemberConstraint, addMemberConstraint, getEvaluator, isValidContext, isValidContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

args

RolapNativeSet.CrossJoinArg[] args
Constructor Detail

RolapNativeSet.SetConstraint

RolapNativeSet.SetConstraint(RolapNativeSet.CrossJoinArg[] args,
                             RolapEvaluator evaluator,
                             boolean strict)
Method Detail

isJoinRequired

protected boolean isJoinRequired()
if there is a crossjoin, we need to join the fact table - even if the evalutaor context is empty.

Overrides:
isJoinRequired in class SqlContextConstraint

addConstraint

public void addConstraint(SqlQuery sqlQuery,
                          RolapCube baseCube)
Description copied from class: SqlContextConstraint
Called from LevelMembers: restricts the SQL resultset to the current context.

Specified by:
addConstraint in interface TupleConstraint
Overrides:
addConstraint in class SqlContextConstraint
Parameters:
sqlQuery - the query to modify
baseCube - base cube for virtual cube constraints

getMemberChildrenConstraint

public MemberChildrenConstraint getMemberChildrenConstraint(RolapMember parent)
Returns null to prevent the member/childern from being cached. There exists no valid MemberChildrenConstraint that would fetch those children that were extracted as a side effect from evaluating a non empty crossjoin

Specified by:
getMemberChildrenConstraint in interface TupleConstraint
Overrides:
getMemberChildrenConstraint in class SqlContextConstraint

getCacheKey

public Object getCacheKey()
returns a key to cache the result

Specified by:
getCacheKey in interface SqlConstraint
Overrides:
getCacheKey in class SqlContextConstraint
Returns:
valid key or null to prevent the result from being cached

SourceForge.net_Logo