mondrian.rolap.agg
Class MemberColumnPredicate

java.lang.Object
  extended by mondrian.rolap.agg.AbstractColumnPredicate
      extended by mondrian.rolap.agg.ValueColumnPredicate
          extended by mondrian.rolap.agg.MemberColumnPredicate
All Implemented Interfaces:
Comparable, StarColumnPredicate, StarPredicate

public class MemberColumnPredicate
extends ValueColumnPredicate

Column constraint defined by a member.

Since:
Mar 16, 2006
Author:
jhyde
 

Nested Class Summary
 
Nested classes/interfaces inherited from class mondrian.rolap.agg.AbstractColumnPredicate
AbstractColumnPredicate.Factory
 
Nested classes/interfaces inherited from interface mondrian.rolap.StarColumnPredicate
StarColumnPredicate.Overlap
 
Field Summary
 
Fields inherited from class mondrian.rolap.agg.AbstractColumnPredicate
constrainedColumn
 
Fields inherited from interface mondrian.rolap.StarPredicate
WILDCARD
 
Constructor Summary
MemberColumnPredicate(RolapStar.Column column, RolapMember member)
          Creates a MemberColumnPredicate
 
Method Summary
 StarColumnPredicate cloneWithColumn(RolapStar.Column column)
          This method is required because unfortunately some ColumnPredicate objects are created without a column.
 void describe(StringBuilder buf)
          Appends a description of this predicate to a StringBuilder.
 boolean equals(Object other)
           
 List<RolapStar.Column> getConstrainedColumnList()
          Returns a list of constrained columns.
 RolapMember getMember()
          Returns the Member.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class mondrian.rolap.agg.ValueColumnPredicate
checkInList, compareTo, equalConstraint, evaluate, getValue, intersect, mightIntersect, minus, toInListSql, toSql, values
 
Methods inherited from class mondrian.rolap.agg.AbstractColumnPredicate
and, cloneListWithColumn, evaluate, getConstrainedColumn, getConstrainedColumnBitKey, or, orColumn
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MemberColumnPredicate

public MemberColumnPredicate(RolapStar.Column column,
                             RolapMember member)
Creates a MemberColumnPredicate

Parameters:
column - Constrained column
member - Member to constrain column to; must not be null
Method Detail

toString

public String toString()
Overrides:
toString in class ValueColumnPredicate

getConstrainedColumnList

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

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

getMember

public RolapMember getMember()
Returns the Member.

Returns:
Returns the Member, not null.

equals

public boolean equals(Object other)
Overrides:
equals in class ValueColumnPredicate

hashCode

public int hashCode()
Overrides:
hashCode in class ValueColumnPredicate

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
Overrides:
describe in class ValueColumnPredicate
Parameters:
buf - Builder to append to

cloneWithColumn

public StarColumnPredicate cloneWithColumn(RolapStar.Column column)
Description copied from interface: StarColumnPredicate
This method is required because unfortunately some ColumnPredicate objects are created without a column.

We call this method to provide a fake column, then call StarPredicate.toSql(mondrian.rolap.sql.SqlQuery, StringBuilder).

todo: remove this method when bug 1767776 and bug 1767779 are fixed.

Specified by:
cloneWithColumn in interface StarColumnPredicate
Overrides:
cloneWithColumn in class ValueColumnPredicate

SourceForge.net_Logo