mondrian.rolap
Class ChildByNameConstraint
java.lang.Object
mondrian.rolap.DefaultMemberChildrenConstraint
mondrian.rolap.ChildByNameConstraint
- All Implemented Interfaces:
- MemberChildrenConstraint, SqlConstraint
class ChildByNameConstraint
- extends DefaultMemberChildrenConstraint
Constraint which optimizes the search for a child by name. This is used
whenever the string representation of a member is parsed, e.g.
[Customers].[USA].[CA]. Restricts the result to
the member we are searching for.
- Author:
- avix
ChildByNameConstraint
public ChildByNameConstraint(Id.Segment childName)
- Creates a
ChildByNameConstraint.
- Parameters:
childName - Name of child
hashCode
public int hashCode()
- Overrides:
hashCode in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals in class Object
addLevelConstraint
public void addLevelConstraint(SqlQuery query,
RolapCube baseCube,
AggStar aggStar,
RolapLevel level)
- Description copied from interface:
MemberChildrenConstraint
- Will be called once for the level that contains the
children of a Member.Children query. If the condition requires so,
it may join the levels table to the fact table.
- Specified by:
addLevelConstraint in interface MemberChildrenConstraint- Overrides:
addLevelConstraint in class DefaultMemberChildrenConstraint
- Parameters:
query - the query to modifybaseCube - base cube for virtual membersaggStar - Aggregate table, or null if query is against fact tablelevel - the level that contains the children
toString
public String toString()
- Overrides:
toString in class DefaultMemberChildrenConstraint
getCacheKey
public Object getCacheKey()
- Description copied from interface:
SqlConstraint
- Returns a key that becomes part of the key for caching the
result of the SQL query. So SqlConstraint instances that
produce the same SQL resultset must return equal keys
in terms of equal() and hashCode().
- Specified by:
getCacheKey in interface SqlConstraint- Overrides:
getCacheKey in class DefaultMemberChildrenConstraint
- Returns:
- valid key or null to prevent the result from being cached