KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tonbeller > jpivot > olap > query > DrillExpandMemberExt


1 /*
2  * ====================================================================
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) 2003-2004 TONBELLER AG.
7  * All Rights Reserved.
8  * You must accept the terms of that agreement to use this software.
9  * ====================================================================
10  *
11  *
12  */

13 package com.tonbeller.jpivot.olap.query;
14
15 import com.tonbeller.jpivot.core.ExtensionSupport;
16 import com.tonbeller.jpivot.olap.model.Member;
17 import com.tonbeller.jpivot.olap.navi.DrillExpandMember;
18
19 /**
20  * @author hh
21  *
22  */

23 public class DrillExpandMemberExt extends ExtensionSupport implements DrillExpandMember {
24   /**
25     * Constructor sets ID
26     */

27   public DrillExpandMemberExt() {
28     super.setId(DrillExpandMember.ID);
29   }
30
31   /**
32    * @see com.tonbeller.jpivot.olap.navi.DrillExpand#canExpand(Member)
33    * @param member the membber to be checked for potential expansion
34    * @return true if the member can be expanded
35    */

36   public boolean canExpand(Member member) {
37     QueryAdapter.QueryAdapterHolder model = (QueryAdapter.QueryAdapterHolder) getModel();
38     return model.getQueryAdapter().canExpand(member);
39   }
40
41   /**
42    * @see com.tonbeller.jpivot.olap.navi.DrillExpand#canCollapse(Member)
43    * @param member member to be expanded
44    * @return true if the member can be collapsed
45    */

46   public boolean canCollapse(Member member) {
47     QueryAdapter.QueryAdapterHolder model = (QueryAdapter.QueryAdapterHolder) getModel();
48     return model.getQueryAdapter().canCollapse(member);
49   }
50
51   /**
52    * @see com.tonbeller.jpivot.olap.navi.DrillExpand#expand(Member)
53    * @param member member to be expanded
54    */

55   public void expand(Member member) {
56     QueryAdapter.QueryAdapterHolder model = (QueryAdapter.QueryAdapterHolder) getModel();
57     model.getQueryAdapter().expand(member);
58   }
59
60   /**
61    * @see com.tonbeller.jpivot.olap.navi.DrillExpand#collapse(Member)
62    * @param member member to be collapsed
63    */

64   public void collapse(Member member) {
65     QueryAdapter.QueryAdapterHolder model = (QueryAdapter.QueryAdapterHolder) getModel();
66     model.getQueryAdapter().collapse(member);
67   }
68
69 } // End DrillExpandMemberExt
70
Popular Tags