KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tonbeller > jpivot > test > olap > TestMdxQuery


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

23 public class TestMdxQuery extends TestExtensionSupport implements MdxQuery {
24   
25   String JavaDoc mdxQuery = "valid mdx does not start with 'x'";
26  
27   public String JavaDoc getMdxQuery() {
28     return mdxQuery;
29   }
30
31   /**
32    * @see com.tonbeller.jpivot.olap.navi.MdxQuery#setMdxQuery(String)
33    */

34   public void setMdxQuery(String JavaDoc mdxQuery) {
35     if (mdxQuery.startsWith("x")) {
36       // do not store invalid mdx
37
throw new FormatException("mdx must not start with 'x'");
38     }
39     this.mdxQuery = mdxQuery;
40   }
41
42 }
43
Popular Tags