KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > mondrian > rolap > sql > MemberChildrenConstraint


1 /*
2 // $Id: //open/mondrian/src/main/mondrian/rolap/sql/MemberChildrenConstraint.java#6 $
3 // This software is subject to the terms of the Common Public License
4 // Agreement, available at the following URL:
5 // http://www.opensource.org/licenses/cpl.html.
6 // Copyright (C) 2004-2005 TONBELLER AG
7 // All Rights Reserved.
8 // You must accept the terms of that agreement to use this software.
9 */

10 package mondrian.rolap.sql;
11
12 import java.util.List JavaDoc;
13 import java.util.Map JavaDoc;
14
15 import mondrian.rolap.RolapLevel;
16 import mondrian.rolap.RolapMember;
17 import mondrian.rolap.RolapStar;
18 import mondrian.rolap.aggmatcher.AggStar;
19
20 /**
21  * Restricts the SQL result of a MembersChildren query in SqlMemberSource.
22  *
23  * @see mondrian.rolap.SqlMemberSource
24  *
25  * @author av
26  * @since Nov 2, 2005
27  * @version $Id: //open/mondrian/src/main/mondrian/rolap/sql/MemberChildrenConstraint.java#6 $
28  */

29 public interface MemberChildrenConstraint extends SqlConstraint {
30
31     /**
32      * Modifies a <code>Member.Children</code> query so that only the children
33      * of <code>parent</code> will be returned in the result set.
34      *
35      * @param sqlQuery the query to modify
36      * @param levelToColumnMap where to find each level's key
37      * @param aggStar Aggregate star, if we are reading from an aggregate table,
38      * @param parent the parent member that restricts the returned children
39      */

40     public void addMemberConstraint(
41         SqlQuery sqlQuery,
42         Map JavaDoc<RolapLevel, RolapStar.Column> levelToColumnMap,
43         AggStar aggStar,
44         RolapMember parent);
45
46     /**
47      * Modifies a <code>Member.Children</code> query so that (all or some)
48      * children of <em>all</em> parent members contained in <code>parents</code>
49      * will be returned in the result set.
50      *
51      * @param sqlQuery the query to modify
52      * @param levelToColumnMap where to find each level's key
53      * @param aggStar Aggregate table, or null if query is against fact table
54      * @param parents list of parent members that restrict the returned children.
55      */

56     public void addMemberConstraint(
57         SqlQuery sqlQuery,
58         Map JavaDoc<RolapLevel, RolapStar.Column> levelToColumnMap,
59         AggStar aggStar,
60         List JavaDoc<RolapMember> parents);
61
62     /**
63      * Will be called once for the level that contains the
64      * children of a Member.Children query. If the condition requires so,
65      * it may join the levels table to the fact table.
66      *
67      * @param query the query to modify
68      * @param aggStar Aggregate table, or null if query is against fact table
69      * @param level the level that contains the children
70      * @param levelToColumnMap set in the case of a virtual cube; use this
71      */

72     public void addLevelConstraint(
73         SqlQuery query,
74         AggStar aggStar,
75         RolapLevel level,
76         Map JavaDoc<RolapLevel, RolapStar.Column> levelToColumnMap);
77
78 }
79
80 // End MemberChildrenConstraint.java
81
Popular Tags