Package mondrian.rolap.agg
Class MemberColumnPredicate
- java.lang.Object
-
- mondrian.rolap.agg.AbstractColumnPredicate
-
- mondrian.rolap.agg.ValueColumnPredicate
-
- 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
Constructors Constructor Description MemberColumnPredicate(RolapStar.Column column, RolapMember member)
Creates a MemberColumnPredicate
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 aStringBuilder
.boolean
equals(Object other)
List<RolapStar.Column>
getConstrainedColumnList()
Returns a list of constrained columns.RolapMember
getMember()
Returns theMember
.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
-
-
-
-
Constructor Detail
-
MemberColumnPredicate
public MemberColumnPredicate(RolapStar.Column column, RolapMember member)
Creates a MemberColumnPredicate- Parameters:
column
- Constrained columnmember
- Member to constrain column to; must not be null
-
-
Method Detail
-
toString
public String toString()
- Overrides:
toString
in classValueColumnPredicate
-
getConstrainedColumnList
public List<RolapStar.Column> getConstrainedColumnList()
Description copied from interface:StarPredicate
Returns a list of constrained columns.- Specified by:
getConstrainedColumnList
in interfaceStarPredicate
- Overrides:
getConstrainedColumnList
in classAbstractColumnPredicate
- Returns:
- List of constrained columns
-
getMember
public RolapMember getMember()
Returns theMember
.- Returns:
- Returns the
Member
, not null.
-
equals
public boolean equals(Object other)
- Overrides:
equals
in classValueColumnPredicate
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classValueColumnPredicate
-
describe
public void describe(StringBuilder buf)
Description copied from interface:StarPredicate
Appends a description of this predicate to aStringBuilder
. For example:- =any
- =5
- in (2, 4, 6)
- Specified by:
describe
in interfaceStarPredicate
- Overrides:
describe
in classValueColumnPredicate
- 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 MONDRIAN-313
andbug MONDRIAN-314
are fixed.- Specified by:
cloneWithColumn
in interfaceStarColumnPredicate
- Overrides:
cloneWithColumn
in classValueColumnPredicate
-
-