mondrian.rolap.agg
Class ListPredicate

java.lang.Object
  extended by mondrian.rolap.agg.ListPredicate
All Implemented Interfaces:
StarPredicate
Direct Known Subclasses:
AndPredicate, OrPredicate

public abstract class ListPredicate
extends Object
implements StarPredicate

Base class for AndPredicate and OrPredicate.

Author:
jhyde
See Also:
ListColumnPredicate
 

Field Summary
protected  List<StarPredicate> children
           
protected  BitKey columnBitKey
           
protected  List<RolapStar.Column> columns
           
 
Fields inherited from interface mondrian.rolap.StarPredicate
WILDCARD
 
Constructor Summary
protected ListPredicate(List<StarPredicate> predicateList)
           
 
Method Summary
 void describe(StringBuilder buf)
          Appends a description of this predicate to a StringBuilder.
 boolean equalConstraint(StarPredicate that)
          Returns whether this Predicate has the same constraining effect as the other constraint.
 List<StarPredicate> getChildren()
           
 BitKey getConstrainedColumnBitKey()
          Returns a bitmap of constrained columns to speed up comparison
 List<RolapStar.Column> getConstrainedColumnList()
          Returns a list of constrained columns.
protected abstract  String getOp()
           
 int hashCode()
           
 StarPredicate minus(StarPredicate predicate)
          Returns the logical inverse of this Predicate.
 void toSql(SqlQuery sqlQuery, StringBuilder buf)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface mondrian.rolap.StarPredicate
and, evaluate, or
 

Field Detail

children

protected final List<StarPredicate> children

columns

protected final List<RolapStar.Column> columns

columnBitKey

protected BitKey columnBitKey
Constructor Detail

ListPredicate

protected ListPredicate(List<StarPredicate> predicateList)
Method Detail

getConstrainedColumnList

public List<RolapStar.Column> getConstrainedColumnList()
Description copied from interface: StarPredicate
Returns a list of constrained columns.

Specified by:
getConstrainedColumnList in interface StarPredicate
Returns:
List of constrained columns

getConstrainedColumnBitKey

public BitKey getConstrainedColumnBitKey()
Description copied from interface: StarPredicate
Returns a bitmap of constrained columns to speed up comparison

Specified by:
getConstrainedColumnBitKey in interface StarPredicate
Returns:
bitmap representing all constraining columns.

getChildren

public List<StarPredicate> getChildren()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equalConstraint

public boolean equalConstraint(StarPredicate that)
Description copied from interface: StarPredicate
Returns whether this Predicate has the same constraining effect as the other constraint. This is weaker than Object.equals(Object): it is possible for two different members to constrain the same column in the same way.

Specified by:
equalConstraint in interface StarPredicate
Parameters:
that - Other predicate
Returns:
whether the other predicate is equivalent

minus

public StarPredicate minus(StarPredicate predicate)
Description copied from interface: StarPredicate
Returns the logical inverse of this Predicate. The result is a Predicate which holds whenever this predicate holds but the other does not.

Specified by:
minus in interface StarPredicate
Parameters:
predicate - Predicate
Returns:
Combined predicate

toSql

public void toSql(SqlQuery sqlQuery,
                  StringBuilder buf)
Specified by:
toSql in interface StarPredicate

getOp

protected abstract String getOp()

describe

public void describe(StringBuilder buf)
Description copied from interface: StarPredicate
Appends a description of this predicate to a StringBuilder. For example:

Specified by:
describe in interface StarPredicate
Parameters:
buf - Builder to append to

toString

public String toString()
Overrides:
toString in class Object

SourceForge.net_Logo