KickJava   Java API By Example, From Geeks To Geeks.

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


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 java.io.Serializable JavaDoc;
16
17 /**
18  * Java Bean object to hold the state of an XMLA MDX session.
19  * Contains parts of XMLA_Model and subordinate objects.
20  */

21 public abstract class Memento implements Serializable JavaDoc {
22
23   private String JavaDoc mdxQuery;
24   
25   boolean axesSwapped = false;
26
27   // sorting
28
int topBottomCount = 0;
29   int sortMode = 0;
30   boolean sorting = false;
31   String JavaDoc[] sortPosMembers = null;
32   int quaxToSort = 0; // this is the Quax to be sorted
33

34   private QuaxBean[] quaxes;
35
36   boolean useQuax = false; // since version 3 (Mondrian)
37

38   /**
39    * Get mdxQuery.
40    * @return mdxQuery
41    */

42   public String JavaDoc getMdxQuery() {
43     return mdxQuery;
44   }
45
46   /**
47    * Set mdxQuery.
48    * @param string
49    */

50   public void setMdxQuery(String JavaDoc mdxQuery) {
51     this.mdxQuery = mdxQuery;
52   }
53
54   /**
55    * Get axesSwapped.
56    * @return axesSwapped
57    */

58   public boolean isAxesSwapped() {
59     return axesSwapped;
60   }
61
62   /**
63    * Set axesSwapped.
64    * @param axesSwapped
65    */

66   public void setAxesSwapped(boolean axesSwapped) {
67     this.axesSwapped = axesSwapped;
68   }
69
70   /**
71    * @return count for Top/Bottom function
72    */

73   public int getTopBottomCount() {
74     return topBottomCount;
75   }
76
77   /**
78    * set count for Top/Bottom function
79    * @param i
80    */

81   public void setTopBottomCount(int topBottomCount) {
82     this.topBottomCount = topBottomCount;
83   }
84
85   /**
86    * @return sort mode
87    */

88   public int getSortMode() {
89     return sortMode;
90   }
91
92   /**
93    * set sort mode
94    * @param sortMode
95    */

96   public void setSortMode(int sortMode) {
97     this.sortMode = sortMode;
98   }
99
100   /**
101    * @return sorting
102    */

103   public boolean isSorting() {
104     return sorting;
105   }
106
107   /**
108    * set sorting true/false
109    * @param sorting
110    */

111   public void setSorting(boolean sorting) {
112     this.sorting = sorting;
113   }
114
115   /**
116    * @return sort position members unique names
117    */

118   public String JavaDoc[] getSortPosMembers() {
119     return sortPosMembers;
120   }
121   
122   /**
123    * @return ordinal of quax to sort
124    */

125   public int getQuaxToSort() {
126     return quaxToSort;
127   }
128
129   /**
130    * set ordinal of quax to sort
131    * @param quaxToSort ordinal of quax
132    */

133   public void setQuaxToSort(int quaxToSort) {
134     this.quaxToSort = quaxToSort;
135   }
136
137
138   /**
139    * set sort position members unique names
140    * @param members unique names
141    */

142   public void setSortPosMembers(String JavaDoc[] members) {
143     sortPosMembers = members;
144   }
145
146   /**
147    * @return quaxes
148    */

149   public QuaxBean[] getQuaxes() {
150     return quaxes;
151   }
152
153   /**
154    * set quaxes
155    * @param beans
156    */

157   public void setQuaxes(QuaxBean[] beans) {
158     quaxes = beans;
159   }
160
161   /**
162    * @return
163    */

164   public boolean isUseQuax() {
165     return useQuax;
166   }
167
168   /**
169    * @param b
170    */

171   public void setUseQuax(boolean b) {
172     useQuax = b;
173   }
174
175   public abstract int getVersion();
176
177   public abstract void setVersion(int i);
178
179 } // Memento
180
Popular Tags