001 /* 002 // $Id: //open/mondrian/src/main/mondrian/rolap/sql/MemberChildrenConstraint.java#10 $ 003 // This software is subject to the terms of the Common Public License 004 // Agreement, available at the following URL: 005 // http://www.opensource.org/licenses/cpl.html. 006 // Copyright (C) 2004-2005 TONBELLER AG 007 // All Rights Reserved. 008 // You must accept the terms of that agreement to use this software. 009 */ 010 package mondrian.rolap.sql; 011 012 import java.util.List; 013 014 import mondrian.rolap.RolapCube; 015 import mondrian.rolap.RolapLevel; 016 import mondrian.rolap.RolapMember; 017 import mondrian.rolap.aggmatcher.AggStar; 018 019 /** 020 * Restricts the SQL result of a MembersChildren query in SqlMemberSource. 021 * 022 * @see mondrian.rolap.SqlMemberSource 023 * 024 * @author av 025 * @since Nov 2, 2005 026 * @version $Id: //open/mondrian/src/main/mondrian/rolap/sql/MemberChildrenConstraint.java#10 $ 027 */ 028 public interface MemberChildrenConstraint extends SqlConstraint { 029 030 /** 031 * Modifies a <code>Member.Children</code> query so that only the children 032 * of <code>parent</code> will be returned in the result set. 033 * 034 * @param sqlQuery the query to modify 035 * @param baseCube base cube for virtual members 036 * @param aggStar Aggregate star, if we are reading from an aggregate table, 037 * @param parent the parent member that restricts the returned children 038 */ 039 public void addMemberConstraint( 040 SqlQuery sqlQuery, 041 RolapCube baseCube, 042 AggStar aggStar, 043 RolapMember parent); 044 045 /** 046 * Modifies a <code>Member.Children</code> query so that (all or some) 047 * children of <em>all</em> parent members contained in <code>parents</code> 048 * will be returned in the result set. 049 * 050 * @param sqlQuery the query to modify 051 * @param baseCube base cube for virtual members 052 * @param aggStar Aggregate table, or null if query is against fact table 053 * @param parents list of parent members that restrict the returned children. 054 */ 055 public void addMemberConstraint( 056 SqlQuery sqlQuery, 057 RolapCube baseCube, 058 AggStar aggStar, 059 List<RolapMember> parents); 060 061 /** 062 * Will be called once for the level that contains the 063 * children of a Member.Children query. If the condition requires so, 064 * it may join the levels table to the fact table. 065 * 066 * @param query the query to modify 067 * @param baseCube base cube for virtual members 068 * @param aggStar Aggregate table, or null if query is against fact table 069 * @param level the level that contains the children 070 */ 071 public void addLevelConstraint( 072 SqlQuery query, 073 RolapCube baseCube, 074 AggStar aggStar, 075 RolapLevel level); 076 077 } 078 079 // End MemberChildrenConstraint.java