KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tonbeller > jpivot > table > navi > MdxQueryUI


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.table.navi;
14
15 import com.tonbeller.jpivot.olap.navi.MdxQuery;
16 import com.tonbeller.jpivot.table.TableComponentExtensionSupport;
17 import com.tonbeller.wcf.format.FormatException;
18
19 /**
20  * @author av
21  */

22 public class MdxQueryUI extends TableComponentExtensionSupport {
23   public static final String JavaDoc ID = "mdxQuery";
24
25   public String JavaDoc getId() {
26     return ID;
27   }
28
29   public boolean isAvailable() {
30     return getExtension() != null;
31   }
32
33   MdxQuery getExtension() {
34     return (MdxQuery) table.getOlapModel().getExtension(MdxQuery.ID);
35   }
36
37   public String JavaDoc getMdxQuery() {
38     MdxQuery ext = getExtension();
39     if (ext == null)
40       return "";
41     return ext.getMdxQuery();
42   }
43
44   public void setMdxQuery(String JavaDoc mdxQuery) throws FormatException {
45     MdxQuery ext = getExtension();
46     if (ext == null)
47       return;
48     ext.setMdxQuery(mdxQuery);
49   }
50
51 }
52
Popular Tags